From ace73acd288728b3ff0b9324db03e26d37123057 Mon Sep 17 00:00:00 2001 From: dswersky Date: Thu, 10 Nov 2022 16:20:58 -0600 Subject: [PATCH 1/6] moved environment settings to terraform.auto.tfvars --- terraform.auto.tfvars.backup | 40 ++++++++++++++++++++++++++++++++++++ variables.tf | 40 ------------------------------------ 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 terraform.auto.tfvars.backup diff --git a/terraform.auto.tfvars.backup b/terraform.auto.tfvars.backup new file mode 100644 index 0000000..2ad78d0 --- /dev/null +++ b/terraform.auto.tfvars.backup @@ -0,0 +1,40 @@ +environment_instance_settings = { + "DEV" = { + machine_type = "f1-micro" + labels = { + environment = "dev" + }, + redis = { + name = "customer-id-cache", + tier = "STANDARD_HA", + memory_size_gb =1, + display_name = "Customer Data Cache" + } + }, + "QA" = { + machine_type = "e2-micro" + labels = { + environment = "qa" + }, + redis = { + name = "customer-id-cache", + tier = "STANDARD_HA", + memory_size_gb = 3, + display_name = "Customer Data Cache" + } + }, + "STAGE" = { + machine_type = "e2-micro" + labels = { + environment = "stage" + }, + redis = {} + }, + "PROD" = { + machine_type = "e2-medium" + labels = { + environment = "prod" + }, + redis = {} + } +} \ No newline at end of file diff --git a/variables.tf b/variables.tf index e34d87e..1c6ca37 100644 --- a/variables.tf +++ b/variables.tf @@ -75,44 +75,4 @@ variable "environment_machine_type" { variable "environment_instance_settings" { type = map(any) - default = { - "DEV" = { - machine_type = "f1-micro" - labels = { - environment = "dev" - }, - redis = { - name = "customer-id-cache", - tier = "STANDARD_HA", - memory_size_gb =1, - display_name = "Customer Data Cache" - } - }, - "QA" = { - machine_type = "e2-micro" - labels = { - environment = "qa" - }, - redis = { - name = "customer-id-cache", - tier = "STANDARD_HA", - memory_size_gb = 3, - display_name = "Customer Data Cache" - } - }, - "STAGE" = { - machine_type = "e2-micro" - labels = { - environment = "stage" - }, - redis = {} - }, - "PROD" = { - machine_type = "e2-medium" - labels = { - environment = "prod" - }, - redis = {} - } - } } \ No newline at end of file From 7988b44014f9dc0a4c18bce2f59a571933b45e6b Mon Sep 17 00:00:00 2001 From: dswersky Date: Thu, 10 Nov 2022 16:29:30 -0600 Subject: [PATCH 2/6] ... --- main.tf | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 88c7440..ba864c5 100644 --- a/main.tf +++ b/main.tf @@ -68,4 +68,4 @@ resource "google_redis_instance" "redis" { memory_size_gb = var.environment_instance_settings[var.target_environment].redis.memory_size_gb location_id = var.zone authorized_network = data.google_compute_network.default.id -} \ No newline at end of file +} diff --git a/variables.tf b/variables.tf index 1c6ca37..06db4a5 100644 --- a/variables.tf +++ b/variables.tf @@ -75,4 +75,4 @@ variable "environment_machine_type" { variable "environment_instance_settings" { type = map(any) -} \ No newline at end of file +} From 26e3d745d7699fe035a526d71ec04e0af578a0d4 Mon Sep 17 00:00:00 2001 From: dswersky Date: Thu, 10 Nov 2022 16:38:10 -0600 Subject: [PATCH 3/6] added terraform.auto.tfvars and updated gitignore --- .gitignore | 2 +- terraform.auto.tfvars.backup => terraform.auto.tfvars | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename terraform.auto.tfvars.backup => terraform.auto.tfvars (100%) diff --git a/.gitignore b/.gitignore index 269bd04..d139523 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ npm-debug.log *.sh *.terraform *.pem -*.tfvars +terraform.tfvars *.tfplan *.tfstate *.tfstate.backup diff --git a/terraform.auto.tfvars.backup b/terraform.auto.tfvars similarity index 100% rename from terraform.auto.tfvars.backup rename to terraform.auto.tfvars From 1b2481ba525e2cf43111eb4e2eefc4b0749b3580 Mon Sep 17 00:00:00 2001 From: dswersky Date: Tue, 15 Nov 2022 10:40:26 -0600 Subject: [PATCH 4/6] added web tag to NGINX proxy --- main.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index a848ccc..eb4c21a 100644 --- a/main.tf +++ b/main.tf @@ -13,7 +13,8 @@ resource "google_compute_instance" "nginx_instance" { labels = { environment = var.environment_map[var.target_environment] } - + tags = var.compute-source-tags + boot_disk { initialize_params { image = "debian-cloud/debian-11" From 58463970a4dc757f1a6903fd1aa6205a3ac22724 Mon Sep 17 00:00:00 2001 From: dswersky Date: Fri, 25 Nov 2022 14:59:21 -0600 Subject: [PATCH 5/6] matching redis branch --- main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/main.tf b/main.tf index eb4c21a..9b2a195 100644 --- a/main.tf +++ b/main.tf @@ -15,6 +15,7 @@ resource "google_compute_instance" "nginx_instance" { } tags = var.compute-source-tags + boot_disk { initialize_params { image = "debian-cloud/debian-11" From 4f000eddfaafbcbe8ffc674794c60e39e73b6a36 Mon Sep 17 00:00:00 2001 From: dswersky Date: Fri, 25 Nov 2022 15:01:31 -0600 Subject: [PATCH 6/6] matching redis branch --- main.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/main.tf b/main.tf index 9b2a195..eb4c21a 100644 --- a/main.tf +++ b/main.tf @@ -15,7 +15,6 @@ resource "google_compute_instance" "nginx_instance" { } tags = var.compute-source-tags - boot_disk { initialize_params { image = "debian-cloud/debian-11"