Created
December 27, 2023 18:54
-
-
Save rssnyder/40ebf23bc352a2fbf75005239367abcd to your computer and use it in GitHub Desktop.
run a harness delegate in azure aci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "=3.0.0" | |
} | |
} | |
} | |
provider "azurerm" { | |
features {} | |
} | |
variable "delegate_token" { | |
type = string | |
sensitive = true | |
} | |
variable "harness_account_id" { | |
type = string | |
} | |
variable "resource_group" { | |
type = string | |
} | |
data "azurerm_subscription" "current" {} | |
data "azurerm_resource_group" "this" { | |
name = var.resource_group | |
} | |
resource "azurerm_container_group" "delegate" { | |
name = "harness-delegate-ng" | |
location = data.azurerm_resource_group.this.location | |
resource_group_name = data.azurerm_resource_group.this.name | |
ip_address_type = "None" | |
os_type = "Linux" | |
container { | |
name = "delegate" | |
image = "harness/delegate:23.12.81808" | |
cpu = "1" | |
memory = "2" | |
environment_variables = { | |
DELEGATE_NAME = "aci" | |
NEXT_GEN = "true" | |
DELEGATE_TYPE = "DOCKER" | |
ACCOUNT_ID = var.harness_account_id | |
LOG_STREAMING_SERVICE_URL = "https://app.harness.io/gratis/log-service/" # change based on your account | |
MANAGER_HOST_AND_PORT = "https://app.harness.io/gratis" # change based on your account | |
} | |
secure_environment_variables = { | |
DELEGATE_TOKEN = var.delegate_token | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment