From af7347bab9de2e2ba2a8269cedde5e0ec5cc6d24 Mon Sep 17 00:00:00 2001 From: Jack Whelpton Date: Wed, 24 Nov 2021 13:08:24 -0800 Subject: [PATCH] feat: update TPG version constraints to allow 4.0 (#215) * feat: update TPG version constraints to allow 4.0 * Loosens Google provider constraints * breaking changes in 4.0 are k8s-specific * Updates template * Replaces self_link with id * Corrects documentation Co-authored-by: cloud-foundation-bot --- autogen/versions.tf.tmpl | 4 ++-- .../compute_instance/disk_snapshot/main.tf | 4 ---- .../disk_snapshot/versions.tf | 8 +++++++- .../multiple_interfaces/main.tf | 11 ---------- .../multiple_interfaces/versions.tf | 12 ++++++++++- examples/compute_instance/next_hop/main.tf | 5 ----- .../compute_instance/next_hop/versions.tf | 8 +++++++- examples/compute_instance/simple/main.tf | 5 ----- examples/compute_instance/simple/versions.tf | 8 +++++++- examples/compute_instance/tags/main.tf | 5 ----- examples/compute_instance/tags/versions.tf | 8 +++++++- .../additional_disks/main.tf | 1 - .../additional_disks/versions.tf | 8 +++++++- .../instance_template/alias_ip_range/main.tf | 1 - .../alias_ip_range/versions.tf | 8 +++++++- .../instance_template/encrypted_disks/main.tf | 3 +-- .../encrypted_disks/versions.tf | 8 +++++++- examples/instance_template/simple/main.tf | 1 - examples/instance_template/simple/versions.tf | 8 +++++++- examples/mig/autoscaler/main.tf | 2 -- examples/mig/autoscaler/versions.tf | 12 ++++++++++- examples/mig/full/main.tf | 2 -- examples/mig/full/versions.tf | 12 ++++++++++- examples/mig/healthcheck/main.tf | 8 -------- examples/mig/healthcheck/versions.tf | 16 ++++++++++++++- examples/mig/simple/main.tf | 6 ++---- examples/mig/simple/versions.tf | 12 ++++++++++- examples/mig_with_percent/simple/main.tf | 2 -- examples/mig_with_percent/simple/versions.tf | 12 ++++++++++- .../simple/main.tf | 1 - .../simple/versions.tf | 8 +++++++- examples/umig/full/main.tf | 1 - examples/umig/full/versions.tf | 8 +++++++- examples/umig/named_ports/main.tf | 1 - examples/umig/named_ports/versions.tf | 8 +++++++- examples/umig/simple/main.tf | 1 - examples/umig/simple/versions.tf | 8 +++++++- examples/umig/static_ips/main.tf | 1 - examples/umig/static_ips/versions.tf | 8 +++++++- modules/compute_disk_snapshot/versions.tf | 2 +- modules/compute_instance/versions.tf | 2 +- modules/instance_template/README.md | 2 +- modules/instance_template/variables.tf | 2 +- modules/instance_template/versions.tf | 2 +- modules/mig/versions.tf | 4 ++-- modules/mig_with_percent/versions.tf | 4 ++-- .../versions.tf | 4 ++-- modules/umig/versions.tf | 2 +- test/setup/main.tf | 16 --------------- test/setup/versions.tf | 20 ++++++++++++++++++- 50 files changed, 197 insertions(+), 108 deletions(-) diff --git a/autogen/versions.tf.tmpl b/autogen/versions.tf.tmpl index 265376ef..9f8a98f0 100644 --- a/autogen/versions.tf.tmpl +++ b/autogen/versions.tf.tmpl @@ -17,8 +17,8 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" - google-beta = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" + google-beta = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:{% if mig %}mig{% else %}mig_with_percent{% endif %}/v7.2.0" diff --git a/examples/compute_instance/disk_snapshot/main.tf b/examples/compute_instance/disk_snapshot/main.tf index 5b877b8f..c2f0cbb3 100644 --- a/examples/compute_instance/disk_snapshot/main.tf +++ b/examples/compute_instance/disk_snapshot/main.tf @@ -14,10 +14,6 @@ * limitations under the License. */ -provider "google" { - version = "~> 3.0" -} - # Building the list of disk names in the required format. # Usually you would build this list from the outputs of the compute_instance module locals { diff --git a/examples/compute_instance/disk_snapshot/versions.tf b/examples/compute_instance/disk_snapshot/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/compute_instance/disk_snapshot/versions.tf +++ b/examples/compute_instance/disk_snapshot/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/compute_instance/multiple_interfaces/main.tf b/examples/compute_instance/multiple_interfaces/main.tf index d01ccba1..68dc005e 100644 --- a/examples/compute_instance/multiple_interfaces/main.tf +++ b/examples/compute_instance/multiple_interfaces/main.tf @@ -14,17 +14,6 @@ * limitations under the License. */ -terraform { - required_providers { - google = { - version = ">= 3.45.0" - } - null = { - version = ">= 2.1.0" - } - } -} - # [START compute_vm_with_multiple_interface] resource "google_compute_instance" "default" { project = var.project_id # Replace with your project ID in quotes diff --git a/examples/compute_instance/multiple_interfaces/versions.tf b/examples/compute_instance/multiple_interfaces/versions.tf index fb3fee63..005a3b71 100644 --- a/examples/compute_instance/multiple_interfaces/versions.tf +++ b/examples/compute_instance/multiple_interfaces/versions.tf @@ -15,5 +15,15 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + null = { + source = "hashicorp/null" + version = ">= 2.1.0" + } + } } diff --git a/examples/compute_instance/next_hop/main.tf b/examples/compute_instance/next_hop/main.tf index 3b818029..c0b1a52b 100644 --- a/examples/compute_instance/next_hop/main.tf +++ b/examples/compute_instance/next_hop/main.tf @@ -14,11 +14,6 @@ * limitations under the License. */ -provider "google" { - - version = "~> 3.0" -} - # [START compute_vm_as_next_hop_create] resource "google_compute_instance" "default" { project = var.project_id # Replace this with your project ID in quotes diff --git a/examples/compute_instance/next_hop/versions.tf b/examples/compute_instance/next_hop/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/compute_instance/next_hop/versions.tf +++ b/examples/compute_instance/next_hop/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/compute_instance/simple/main.tf b/examples/compute_instance/simple/main.tf index 8a6d32df..c9f61581 100644 --- a/examples/compute_instance/simple/main.tf +++ b/examples/compute_instance/simple/main.tf @@ -14,11 +14,6 @@ * limitations under the License. */ -provider "google" { - - version = "~> 3.0" -} - module "instance_template" { source = "../../../modules/instance_template" region = var.region diff --git a/examples/compute_instance/simple/versions.tf b/examples/compute_instance/simple/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/compute_instance/simple/versions.tf +++ b/examples/compute_instance/simple/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/compute_instance/tags/main.tf b/examples/compute_instance/tags/main.tf index 7f4a3e0c..6a4284c8 100644 --- a/examples/compute_instance/tags/main.tf +++ b/examples/compute_instance/tags/main.tf @@ -14,11 +14,6 @@ * limitations under the License. */ -provider "google" { - - version = "~> 3.0" -} - # [START compute_vm_with_tags_create] resource "google_compute_instance" "default" { project = var.project_id # Replace this with your project ID in quotes diff --git a/examples/compute_instance/tags/versions.tf b/examples/compute_instance/tags/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/compute_instance/tags/versions.tf +++ b/examples/compute_instance/tags/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/instance_template/additional_disks/main.tf b/examples/instance_template/additional_disks/main.tf index 632d4e3b..0ba3fdbb 100644 --- a/examples/instance_template/additional_disks/main.tf +++ b/examples/instance_template/additional_disks/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/instance_template/additional_disks/versions.tf b/examples/instance_template/additional_disks/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/instance_template/additional_disks/versions.tf +++ b/examples/instance_template/additional_disks/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/instance_template/alias_ip_range/main.tf b/examples/instance_template/alias_ip_range/main.tf index c43618a3..4c6c1904 100644 --- a/examples/instance_template/alias_ip_range/main.tf +++ b/examples/instance_template/alias_ip_range/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } resource "google_compute_address" "ip_address" { diff --git a/examples/instance_template/alias_ip_range/versions.tf b/examples/instance_template/alias_ip_range/versions.tf index eafae9d5..d3d87e5a 100644 --- a/examples/instance_template/alias_ip_range/versions.tf +++ b/examples/instance_template/alias_ip_range/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/instance_template/encrypted_disks/main.tf b/examples/instance_template/encrypted_disks/main.tf index 2bd1085c..6214fb46 100644 --- a/examples/instance_template/encrypted_disks/main.tf +++ b/examples/instance_template/encrypted_disks/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } resource "google_kms_key_ring" "keyring" { @@ -43,7 +42,7 @@ module "instance_template" { service_account = var.service_account name_prefix = "additional-disks" - disk_encryption_key = google_kms_crypto_key.example-key.self_link + disk_encryption_key = google_kms_crypto_key.example-key.id additional_disks = [ { diff --git a/examples/instance_template/encrypted_disks/versions.tf b/examples/instance_template/encrypted_disks/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/instance_template/encrypted_disks/versions.tf +++ b/examples/instance_template/encrypted_disks/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/instance_template/simple/main.tf b/examples/instance_template/simple/main.tf index 91216901..252c1f7b 100644 --- a/examples/instance_template/simple/main.tf +++ b/examples/instance_template/simple/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } resource "google_compute_address" "ip_address" { diff --git a/examples/instance_template/simple/versions.tf b/examples/instance_template/simple/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/instance_template/simple/versions.tf +++ b/examples/instance_template/simple/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/mig/autoscaler/main.tf b/examples/mig/autoscaler/main.tf index 048c971b..e22a38d8 100644 --- a/examples/mig/autoscaler/main.tf +++ b/examples/mig/autoscaler/main.tf @@ -18,14 +18,12 @@ provider "google" { project = var.project_id region = var.region - version = "~>3.0" } provider "google-beta" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/mig/autoscaler/versions.tf b/examples/mig/autoscaler/versions.tf index fb3fee63..396bd738 100644 --- a/examples/mig/autoscaler/versions.tf +++ b/examples/mig/autoscaler/versions.tf @@ -15,5 +15,15 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 4.0" + } + } } diff --git a/examples/mig/full/main.tf b/examples/mig/full/main.tf index e42b5be6..3f50b40e 100644 --- a/examples/mig/full/main.tf +++ b/examples/mig/full/main.tf @@ -18,14 +18,12 @@ provider "google" { project = var.project_id region = var.region - version = "~>3.0" } provider "google-beta" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/mig/full/versions.tf b/examples/mig/full/versions.tf index fb3fee63..396bd738 100644 --- a/examples/mig/full/versions.tf +++ b/examples/mig/full/versions.tf @@ -15,5 +15,15 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 4.0" + } + } } diff --git a/examples/mig/healthcheck/main.tf b/examples/mig/healthcheck/main.tf index 26bf6b27..d54b5d5d 100644 --- a/examples/mig/healthcheck/main.tf +++ b/examples/mig/healthcheck/main.tf @@ -19,19 +19,11 @@ provider "google" { project = var.project_id region = var.region - version = "~>3.0" } provider "google-beta" { project = var.project_id region = var.region - version = "~> 3.0" -} - -/** Random String (optional) **/ - -provider "random" { - version = "~> 2.2" } resource "random_string" "suffix" { diff --git a/examples/mig/healthcheck/versions.tf b/examples/mig/healthcheck/versions.tf index fb3fee63..2ceebb96 100644 --- a/examples/mig/healthcheck/versions.tf +++ b/examples/mig/healthcheck/versions.tf @@ -15,5 +15,19 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 4.0" + } + random = { + source = "hashicorp/random" + version = "~> 2.2" + } + } } diff --git a/examples/mig/simple/main.tf b/examples/mig/simple/main.tf index 5524d91f..24a584f6 100644 --- a/examples/mig/simple/main.tf +++ b/examples/mig/simple/main.tf @@ -16,14 +16,12 @@ provider "google" { - region = var.region - version = "~> 3.0" + region = var.region } provider "google-beta" { - region = var.region - version = "~> 3.0" + region = var.region } module "instance_template" { diff --git a/examples/mig/simple/versions.tf b/examples/mig/simple/versions.tf index fb3fee63..396bd738 100644 --- a/examples/mig/simple/versions.tf +++ b/examples/mig/simple/versions.tf @@ -15,5 +15,15 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 4.0" + } + } } diff --git a/examples/mig_with_percent/simple/main.tf b/examples/mig_with_percent/simple/main.tf index 28dc8585..7b1f333e 100644 --- a/examples/mig_with_percent/simple/main.tf +++ b/examples/mig_with_percent/simple/main.tf @@ -18,14 +18,12 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } provider "google-beta" { project = var.project_id region = var.region - version = "~> 3.0" } module "preemptible_and_regular_instance_templates" { diff --git a/examples/mig_with_percent/simple/versions.tf b/examples/mig_with_percent/simple/versions.tf index fb3fee63..396bd738 100644 --- a/examples/mig_with_percent/simple/versions.tf +++ b/examples/mig_with_percent/simple/versions.tf @@ -15,5 +15,15 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 4.0" + } + } } diff --git a/examples/preemptible_and_regular_instance_templates/simple/main.tf b/examples/preemptible_and_regular_instance_templates/simple/main.tf index 07b11412..8020cd55 100644 --- a/examples/preemptible_and_regular_instance_templates/simple/main.tf +++ b/examples/preemptible_and_regular_instance_templates/simple/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } module "preemptible_and_regular_instance_templates" { diff --git a/examples/preemptible_and_regular_instance_templates/simple/versions.tf b/examples/preemptible_and_regular_instance_templates/simple/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/preemptible_and_regular_instance_templates/simple/versions.tf +++ b/examples/preemptible_and_regular_instance_templates/simple/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/umig/full/main.tf b/examples/umig/full/main.tf index eebdd5f5..3f02f65d 100644 --- a/examples/umig/full/main.tf +++ b/examples/umig/full/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } resource "google_compute_address" "ip_address" { diff --git a/examples/umig/full/versions.tf b/examples/umig/full/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/umig/full/versions.tf +++ b/examples/umig/full/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/umig/named_ports/main.tf b/examples/umig/named_ports/main.tf index 53c29b12..b2c3f207 100644 --- a/examples/umig/named_ports/main.tf +++ b/examples/umig/named_ports/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/umig/named_ports/versions.tf b/examples/umig/named_ports/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/umig/named_ports/versions.tf +++ b/examples/umig/named_ports/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/umig/simple/main.tf b/examples/umig/simple/main.tf index 5c721131..11031285 100644 --- a/examples/umig/simple/main.tf +++ b/examples/umig/simple/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/umig/simple/versions.tf b/examples/umig/simple/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/umig/simple/versions.tf +++ b/examples/umig/simple/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/examples/umig/static_ips/main.tf b/examples/umig/static_ips/main.tf index 2d06c41a..53c53da9 100644 --- a/examples/umig/static_ips/main.tf +++ b/examples/umig/static_ips/main.tf @@ -18,7 +18,6 @@ provider "google" { project = var.project_id region = var.region - version = "~> 3.0" } module "instance_template" { diff --git a/examples/umig/static_ips/versions.tf b/examples/umig/static_ips/versions.tf index fb3fee63..a445fc5d 100644 --- a/examples/umig/static_ips/versions.tf +++ b/examples/umig/static_ips/versions.tf @@ -15,5 +15,11 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + } } diff --git a/modules/compute_disk_snapshot/versions.tf b/modules/compute_disk_snapshot/versions.tf index 87da4f8e..ad724c11 100644 --- a/modules/compute_disk_snapshot/versions.tf +++ b/modules/compute_disk_snapshot/versions.tf @@ -17,7 +17,7 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" null = ">= 2.1" } provider_meta "google" { diff --git a/modules/compute_instance/versions.tf b/modules/compute_instance/versions.tf index b1a2e670..1062ffdd 100644 --- a/modules/compute_instance/versions.tf +++ b/modules/compute_instance/versions.tf @@ -17,7 +17,7 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:compute_instance/v7.2.0" diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index e0d89d55..d619987f 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -19,7 +19,7 @@ See the [simple](../../examples/instance_template/simple) for a usage example. | alias\_ip\_range | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
ip\_cidr\_range: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.
subnetwork\_range\_name: The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
object({
ip_cidr_range = string
subnetwork_range_name = string
})
| `null` | no | | auto\_delete | Whether or not the boot disk should be auto-deleted | `string` | `"true"` | no | | can\_ip\_forward | Enable IP forwarding, for NAT instances for example | `string` | `"false"` | no | -| disk\_encryption\_key | The self link of the encryption key that is stored in Google Cloud KMS to use to encrypt all the disks on this instance | `string` | `null` | no | +| disk\_encryption\_key | The id of the encryption key that is stored in Google Cloud KMS to use to encrypt all the disks on this instance | `string` | `null` | no | | disk\_labels | Labels to be assigned to boot disk, provided as a map | `map(string)` | `{}` | no | | disk\_size\_gb | Boot disk size in GB | `string` | `"100"` | no | | disk\_type | Boot disk type, can be either pd-ssd, local-ssd, or pd-standard | `string` | `"pd-standard"` | no | diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index c28c17c4..1bd1602f 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -106,7 +106,7 @@ variable "disk_labels" { } variable "disk_encryption_key" { - description = "The self link of the encryption key that is stored in Google Cloud KMS to use to encrypt all the disks on this instance" + description = "The id of the encryption key that is stored in Google Cloud KMS to use to encrypt all the disks on this instance" type = string default = null } diff --git a/modules/instance_template/versions.tf b/modules/instance_template/versions.tf index d7b5abea..80c243fe 100644 --- a/modules/instance_template/versions.tf +++ b/modules/instance_template/versions.tf @@ -17,7 +17,7 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:instance_template/v7.2.0" diff --git a/modules/mig/versions.tf b/modules/mig/versions.tf index 05a72077..8bff321b 100644 --- a/modules/mig/versions.tf +++ b/modules/mig/versions.tf @@ -17,8 +17,8 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" - google-beta = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" + google-beta = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:mig/v7.2.0" diff --git a/modules/mig_with_percent/versions.tf b/modules/mig_with_percent/versions.tf index 070de88e..72a9a548 100644 --- a/modules/mig_with_percent/versions.tf +++ b/modules/mig_with_percent/versions.tf @@ -17,8 +17,8 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" - google-beta = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" + google-beta = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:mig_with_percent/v7.2.0" diff --git a/modules/preemptible_and_regular_instance_templates/versions.tf b/modules/preemptible_and_regular_instance_templates/versions.tf index c9cda2e0..e69b2740 100644 --- a/modules/preemptible_and_regular_instance_templates/versions.tf +++ b/modules/preemptible_and_regular_instance_templates/versions.tf @@ -17,8 +17,8 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" - google-beta = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" + google-beta = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:preemptible_and_regular_instance_templates/v7.2.0" diff --git a/modules/umig/versions.tf b/modules/umig/versions.tf index a8b20388..a39b5b01 100644 --- a/modules/umig/versions.tf +++ b/modules/umig/versions.tf @@ -17,7 +17,7 @@ terraform { required_version = ">=0.13.0" required_providers { - google = ">= 3.43, <4.0" + google = ">= 3.43, < 5.0" } provider_meta "google" { module_name = "blueprints/terraform/terraform-google-vm:umig/v7.2.0" diff --git a/test/setup/main.tf b/test/setup/main.tf index c64c7c4b..ab862d55 100644 --- a/test/setup/main.tf +++ b/test/setup/main.tf @@ -14,22 +14,6 @@ * limitations under the License. */ -provider "google" { - version = "~> 3.0" -} - -provider "google-beta" { - version = "~> 3.0" -} - -provider "null" { - version = "~> 2.1" -} - -provider "random" { - version = "~> 2.2" -} - module "project_ci_vm" { source = "terraform-google-modules/project-factory/google" version = "~> 11.0" diff --git a/test/setup/versions.tf b/test/setup/versions.tf index 9b45f9d2..9ab62d60 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -15,5 +15,23 @@ */ terraform { - required_version = ">=0.12.6" + required_version = ">= 0.13" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 3.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "~> 3.0" + } + null = { + source = "hashicorp/null" + version = "~> 2.1" + } + random = { + source = "hashicorp/random" + version = "~> 2.2" + } + } }