From 1adb80805d8257c025417117c4afcf70ba3b0fac Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik Date: Wed, 22 Jan 2025 13:28:11 +0000 Subject: [PATCH 1/6] Update project IDs and buckets --- environments/dev/backend.tf | 2 +- environments/dev/terraform.tfvars | 2 +- environments/prod/backend.tf | 2 +- environments/prod/terraform.tfvars | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/environments/dev/backend.tf b/environments/dev/backend.tf index 33a807a336..83b1b7e957 100644 --- a/environments/dev/backend.tf +++ b/environments/dev/backend.tf @@ -15,7 +15,7 @@ terraform { backend "gcs" { - bucket = "PROJECT_ID-tfstate" + bucket = "-tfstate" prefix = "env/dev" } } diff --git a/environments/dev/terraform.tfvars b/environments/dev/terraform.tfvars index cb8a5a1bbc..3a39b2ea8e 100644 --- a/environments/dev/terraform.tfvars +++ b/environments/dev/terraform.tfvars @@ -1 +1 @@ -project="PROJECT_ID" \ No newline at end of file +project="" \ No newline at end of file diff --git a/environments/prod/backend.tf b/environments/prod/backend.tf index 7ed343b1a2..1abb155294 100644 --- a/environments/prod/backend.tf +++ b/environments/prod/backend.tf @@ -15,7 +15,7 @@ terraform { backend "gcs" { - bucket = "PROJECT_ID-tfstate" + bucket = "-tfstate" prefix = "env/prod" } } diff --git a/environments/prod/terraform.tfvars b/environments/prod/terraform.tfvars index cb8a5a1bbc..3a39b2ea8e 100644 --- a/environments/prod/terraform.tfvars +++ b/environments/prod/terraform.tfvars @@ -1 +1 @@ -project="PROJECT_ID" \ No newline at end of file +project="" \ No newline at end of file From 19a7550b9209ba9d4cb9bf2f90848a9328ec1685 Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik <153626672+cdw-madhu-nandyanaik@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:26:40 +0530 Subject: [PATCH 2/6] Update cloudbuild.yaml --- cloudbuild.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 2bca928879..90e4018257 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -11,6 +11,17 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +steps: + - id: 'tf init' + name: 'hashicorp/terraform:1.0.0' + entrypoint: 'sh' + args: + - '-c' + - | + terraform init +options: + logging: GCS_ONLY + logsBucket: 'gs://madnan-project-tfstate' steps: From 42cde5ef6d1b42d1162246609ec557d266b0e0ba Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik <153626672+cdw-madhu-nandyanaik@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:47:19 +0530 Subject: [PATCH 3/6] Update versions.tf --- environments/dev/versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/dev/versions.tf b/environments/dev/versions.tf index 4cc81b29fa..46e170b234 100644 --- a/environments/dev/versions.tf +++ b/environments/dev/versions.tf @@ -14,5 +14,5 @@ terraform { - required_version = "~> 1.0.0" + required_version = "~> 1.0, < 2.0" } From 20600a5d8928663e5f02f945df6cd8b00f074685 Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik <153626672+cdw-madhu-nandyanaik@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:47:51 +0530 Subject: [PATCH 4/6] Update cloudbuild.yaml --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 90e4018257..bd3100625b 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -13,7 +13,7 @@ # limitations under the License. steps: - id: 'tf init' - name: 'hashicorp/terraform:1.0.0' + name: 'hashicorp/terraform:1.5.7' # Update to the version you want to use entrypoint: 'sh' args: - '-c' From d52165c9ddd9da9a66c39ceb780dc29e3c1b0305 Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik <153626672+cdw-madhu-nandyanaik@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:53:03 +0530 Subject: [PATCH 5/6] Update main.tf --- modules/firewall/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/firewall/main.tf b/modules/firewall/main.tf index 5e40f7089f..1d2e549134 100644 --- a/modules/firewall/main.tf +++ b/modules/firewall/main.tf @@ -27,6 +27,6 @@ resource "google_compute_firewall" "allow-http" { ports = ["80"] } - target_tags = ["http-server2"] + target_tags = ["http-server"] source_ranges = ["0.0.0.0/0"] } From 84db300ad882ca7c75191b9960f852d7222916e4 Mon Sep 17 00:00:00 2001 From: cdw-madhu-nandyanaik <153626672+cdw-madhu-nandyanaik@users.noreply.github.com> Date: Wed, 22 Jan 2025 20:00:42 +0530 Subject: [PATCH 6/6] Update cloudbuild.yaml --- cloudbuild.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index bd3100625b..54597cece7 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -11,18 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -steps: - - id: 'tf init' - name: 'hashicorp/terraform:1.5.7' # Update to the version you want to use - entrypoint: 'sh' - args: - - '-c' - - | - terraform init -options: - logging: GCS_ONLY - logsBucket: 'gs://madnan-project-tfstate' - +logs_bucket: gs://build_logs_bucket66 steps: - id: 'branch name'