diff --git a/terraform/main.tf b/terraform/main.tf index e56ea4b..e62ac9b 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -40,7 +40,7 @@ module "blc-mainnet" { # CI vars region = var.region zone = var.zone - instance_type = var.instance_type[0] + instance_type = var.instance_type[1] timeout = var.timeout prom_service_acct = var.prom_service_acct opsgenie_key = var.opsgenie_key @@ -75,7 +75,7 @@ module "blc-testnet" { # CI vars region = var.region zone = var.zone - instance_type = var.instance_type[0] + instance_type = var.instance_type[1] timeout = var.timeout prom_service_acct = var.prom_service_acct opsgenie_key = var.opsgenie_key @@ -106,7 +106,7 @@ module "lb" { # CI vars region = var.region zone = var.zone - instance_type = var.instance_type[1] + instance_type = var.instance_type[0] host = var.host timeout = var.timeout prom_service_acct = var.prom_service_acct @@ -139,7 +139,7 @@ module "tor" { # CI vars region = var.region zone = var.zone - instance_type = var.instance_type[1] + instance_type = var.instance_type[0] onion_host = var.onion_host prom_service_acct = var.prom_service_acct } @@ -158,7 +158,7 @@ module "prometheus" { # CI vars region = var.region zone = var.zone - instance_type = var.instance_type[2] + instance_type = var.instance_type[1] prom_allowed_source_ip = var.prom_allowed_source_ip opsgenie_key = var.opsgenie_key prom_service_acct = var.prom_service_acct diff --git a/terraform/modules/prometheus/data.tf b/terraform/modules/prometheus/data.tf index 3d4f3f2..feefd55 100644 --- a/terraform/modules/prometheus/data.tf +++ b/terraform/modules/prometheus/data.tf @@ -1,10 +1,12 @@ data "google_compute_network" "default" { name = "default" project = var.project + count = var.create_resources } data "template_file" "prometheus" { template = file("${path.module}/cloud-init/prometheus.yml") + count = var.create_resources vars = { prom_docker = var.prom_docker @@ -17,6 +19,7 @@ data "template_file" "prometheus" { data "template_cloudinit_config" "prometheus" { gzip = false base64_encode = false + count = var.create_resources part { content_type = "text/cloud-config" diff --git a/terraform/modules/tor/data.tf b/terraform/modules/tor/data.tf index 57e2194..58d7c39 100644 --- a/terraform/modules/tor/data.tf +++ b/terraform/modules/tor/data.tf @@ -1,6 +1,7 @@ data "google_compute_network" "default" { name = "default" project = var.project + count = var.create_resources } data "template_file" "tor" {