-
Notifications
You must be signed in to change notification settings - Fork 3
/
harness.tf
31 lines (25 loc) · 1.07 KB
/
harness.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module "harness_delegate" {
count = var.harness_delegate && strcontains(lower(var.aws_account), "indico") ? 1 : 0
depends_on = [
module.cluster,
time_sleep.wait_1_minutes_after_cluster
]
source = "./modules/harness"
account_id = jsondecode(data.vault_kv_secret_v2.delegate_secrets[0].data_json)["DELEGATE_ACCOUNT_ID"]
delegate_token = jsondecode(data.vault_kv_secret_v2.delegate_secrets[0].data_json)["DELEGATE_TOKEN"]
delegate_name = "${var.cluster_name}-harness-delegate"
namespace = "harness-delegate-ng"
manager_endpoint = "https://app.harness.io/gratis"
delegate_image = jsondecode(data.vault_kv_secret_v2.delegate_secrets[0].data_json)["DELEGATE_IMAGE"]
replicas = var.harness_delegate_replicas
upgrader_enabled = false
# Additional optional values to pass to the helm chart
values = yamlencode({
javaOpts : "-Xms64M"
})
}
data "vault_kv_secret_v2" "delegate_secrets" {
count = var.harness_delegate && strcontains(lower(var.aws_account), "indico") ? 1 : 0
mount = var.harness_mount_path
name = "delegate"
}