From 6df856ac49bc0c9c0104232e201eecb15c068116 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sun, 6 Feb 2022 21:36:20 -0500 Subject: [PATCH] scale down bot since rusty-bot uses less resources --- terraform/bot.tf | 9 +++++---- terraform/variables/prod.tfvars | 2 +- terraform/variables/stage.tfvars | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/terraform/bot.tf b/terraform/bot.tf index a6bf2ba..64003b4 100644 --- a/terraform/bot.tf +++ b/terraform/bot.tf @@ -62,9 +62,10 @@ locals { resource "google_compute_instance" "bot" { count = var.deploy_bot == true ? 1 : 0 - name = local.vmName - machine_type = var.bot_instance_size - zone = data.google_compute_zones.gcp_zones.names[random_integer.zone_index.result] + name = local.vmName + machine_type = var.bot_instance_size + zone = data.google_compute_zones.gcp_zones.names[random_integer.zone_index.result] + allow_stopping_for_update = true boot_disk { initialize_params { @@ -88,4 +89,4 @@ resource "google_compute_instance" "bot" { labels = { container-vm = module.gce_container.vm_container_label } -} \ No newline at end of file +} diff --git a/terraform/variables/prod.tfvars b/terraform/variables/prod.tfvars index e9fb46f..b33eaa3 100644 --- a/terraform/variables/prod.tfvars +++ b/terraform/variables/prod.tfvars @@ -1,6 +1,6 @@ environment_tag = "prod" deploy_bot = true -bot_instance_size = "e2-small" +bot_instance_size = "e2-micro" ui_public_uri = "https://roleypoly.com" api_public_uri = "https://api-prod.roleypoly.com" allowed_callback_hosts = "https://roleypoly.com,https://next.roleypoly.com" diff --git a/terraform/variables/stage.tfvars b/terraform/variables/stage.tfvars index 2319fd8..3384742 100644 --- a/terraform/variables/stage.tfvars +++ b/terraform/variables/stage.tfvars @@ -1,6 +1,6 @@ environment_tag = "stage" deploy_bot = true -bot_instance_size = "f1-micro" +bot_instance_size = "e2-micro" ui_public_uri = "https://stage.roleypoly.com" api_public_uri = "https://api-stage.roleypoly.com" allowed_callback_hosts = "https://roleypoly.com,https://stage.roleypoly.com,https://*.roleypoly.pages.dev"