From b9f0294c755b2a95cf666ef19f21e16c34b3b3d7 Mon Sep 17 00:00:00 2001 From: cloud-foundation-bot Date: Wed, 17 Nov 2021 00:05:34 -0600 Subject: [PATCH 1/3] feat: update TPG version constraints to allow 4.0 --- examples/dlp_api_example/main.tf | 3 +-- examples/dlp_api_example/versions.tf | 14 +++++++++++++- examples/simple_example/main.tf | 3 +-- examples/simple_example/versions.tf | 11 ++++++++++- modules/dataflow_bucket/versions.tf | 2 +- test/setup/main.tf | 4 ---- test/setup/versions.tf | 8 +++++++- versions.tf | 2 +- 8 files changed, 34 insertions(+), 13 deletions(-) diff --git a/examples/dlp_api_example/main.tf b/examples/dlp_api_example/main.tf index 8c41fbd..feda80a 100644 --- a/examples/dlp_api_example/main.tf +++ b/examples/dlp_api_example/main.tf @@ -15,8 +15,7 @@ */ provider "google" { - version = "~> 3.53" - region = var.region + region = var.region } resource "random_id" "random_suffix" { diff --git a/examples/dlp_api_example/versions.tf b/examples/dlp_api_example/versions.tf index 2970427..36e575d 100644 --- a/examples/dlp_api_example/versions.tf +++ b/examples/dlp_api_example/versions.tf @@ -15,5 +15,17 @@ */ terraform { - required_version = ">= 0.12" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + null = { + source = "hashicorp/null" + } + random = { + source = "hashicorp/random" + } + } } diff --git a/examples/simple_example/main.tf b/examples/simple_example/main.tf index 640a4ee..57c8c1e 100644 --- a/examples/simple_example/main.tf +++ b/examples/simple_example/main.tf @@ -15,8 +15,7 @@ */ provider "google" { - version = "~> 3.53" - region = var.region + region = var.region } resource "random_id" "random_suffix" { diff --git a/examples/simple_example/versions.tf b/examples/simple_example/versions.tf index 2970427..bb64662 100644 --- a/examples/simple_example/versions.tf +++ b/examples/simple_example/versions.tf @@ -15,5 +15,14 @@ */ terraform { - required_version = ">= 0.12" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + random = { + source = "hashicorp/random" + } + } } diff --git a/modules/dataflow_bucket/versions.tf b/modules/dataflow_bucket/versions.tf index 4bd0913..2d6a220 100644 --- a/modules/dataflow_bucket/versions.tf +++ b/modules/dataflow_bucket/versions.tf @@ -20,7 +20,7 @@ terraform { google = { source = "hashicorp/google" - version = "~> 3.53" + version = ">= 3.53, < 5.0" } } diff --git a/test/setup/main.tf b/test/setup/main.tf index 7339ea7..21934e6 100644 --- a/test/setup/main.tf +++ b/test/setup/main.tf @@ -14,10 +14,6 @@ * limitations under the License. */ -provider "google" { - version = "~> 3.53" -} - module "project-ci-dataflow" { source = "terraform-google-modules/project-factory/google" version = "~> 10.0" diff --git a/test/setup/versions.tf b/test/setup/versions.tf index 2970427..1921d1d 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">= 0.12" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 3.53" + } + } } diff --git a/versions.tf b/versions.tf index 032d4aa..97c3004 100644 --- a/versions.tf +++ b/versions.tf @@ -20,7 +20,7 @@ terraform { google = { source = "hashicorp/google" - version = "~> 3.53" + version = ">= 3.53, < 5.0" } } From 4314608e01b6fd30b9880ae404eb98277c7214ad Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Wed, 23 Feb 2022 04:01:05 +0000 Subject: [PATCH 2/3] remove kms id in example --- Makefile | 2 +- build/int.cloudbuild.yaml | 2 +- build/lint.cloudbuild.yaml | 2 +- examples/dlp_api_example/main.tf | 2 +- examples/simple_example/main.tf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5b71d3c..2dde908 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # Make will use bash instead of sh SHELL := /usr/bin/env bash -DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.0 +DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.3 DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools REGISTRY_URL := gcr.io/cloud-foundation-cicd diff --git a/build/int.cloudbuild.yaml b/build/int.cloudbuild.yaml index 2ae71ae..b120883 100644 --- a/build/int.cloudbuild.yaml +++ b/build/int.cloudbuild.yaml @@ -38,4 +38,4 @@ tags: - 'integration' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.3' diff --git a/build/lint.cloudbuild.yaml b/build/lint.cloudbuild.yaml index 330796d..56c6800 100644 --- a/build/lint.cloudbuild.yaml +++ b/build/lint.cloudbuild.yaml @@ -21,4 +21,4 @@ tags: - 'lint' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.3' diff --git a/examples/dlp_api_example/main.tf b/examples/dlp_api_example/main.tf index feda80a..2dfe4be 100644 --- a/examples/dlp_api_example/main.tf +++ b/examples/dlp_api_example/main.tf @@ -85,7 +85,7 @@ resource "google_kms_key_ring" "create_kms_ring" { resource "google_kms_crypto_key" "create_kms_key" { count = var.create_key_ring ? 1 : 0 name = var.kms_key_name - key_ring = google_kms_key_ring.create_kms_ring[0].self_link + key_ring = google_kms_key_ring.create_kms_ring[0].id depends_on = [google_kms_key_ring.create_kms_ring] } diff --git a/examples/simple_example/main.tf b/examples/simple_example/main.tf index 57c8c1e..6e73ba5 100644 --- a/examples/simple_example/main.tf +++ b/examples/simple_example/main.tf @@ -28,7 +28,7 @@ locals { module "vpc" { source = "terraform-google-modules/network/google" - version = "~> 3.0" + version = "~> 4.0" project_id = var.project_id network_name = "dataflow-network" From 06be91d85c1ea636846ed4670a69b5bd247d3064 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Wed, 23 Feb 2022 04:15:15 +0000 Subject: [PATCH 3/3] kitchen verify version skip --- .kitchen.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.kitchen.yml b/.kitchen.yml index 99b1a70..85d4738 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -16,6 +16,7 @@ driver: name: "terraform" command_timeout: 1800 + verify_version: false provisioner: name: "terraform"