TF: make staging deploys proactive/prod opportunistic + don't create tor backend service on staging

This commit is contained in:
nitramiz 2022-01-06 09:18:30 -08:00
parent ead897b77c
commit b4ccd902d3
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ resource "google_compute_instance_group_manager" "blc" {
}
update_policy {
type = "PROACTIVE"
type = var.env == "staging" ? "PROACTIVE": "OPPORTUNISTIC"
minimal_action = "RESTART"
replacement_method = "RECREATE"
max_surge_fixed = 0

View file

@ -16,7 +16,7 @@ resource "google_compute_region_instance_group_manager" "satapi-lb" {
}
update_policy {
type = "OPPORTUNISTIC"
type = var.env == "staging" ? "PROACTIVE": "OPPORTUNISTIC"
minimal_action = "RESTART"
replacement_method = "RECREATE"
max_surge_fixed = 0

View file

@ -27,7 +27,7 @@ resource "google_compute_backend_service" "satapi-lb-tor" {
protocol = "HTTP"
port_name = "http81"
project = var.project
count = var.create_resources
count = var.env == "staging" ? 0 : var.create_resources
backend {
group = google_compute_region_instance_group_manager.satapi-lb[0].instance_group