update instance_types + don't always refresh different modules

This commit is contained in:
nitramiz 2019-09-03 15:20:15 -07:00
parent 27c7df9e4c
commit 910a73d282
No known key found for this signature in database
GPG key ID: 2352C35346C5D534
3 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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"

View file

@ -1,6 +1,7 @@
data "google_compute_network" "default" {
name = "default"
project = var.project
count = var.create_resources
}
data "template_file" "tor" {