Skip to content

Commit af7347b

Browse files
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 <[email protected]>
1 parent 9e48c1f commit af7347b

File tree

50 files changed

+197
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+197
-108
lines changed

autogen/versions.tf.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
terraform {
1818
required_version = ">=0.13.0"
1919
required_providers {
20-
google = ">= 3.43, <4.0"
21-
google-beta = ">= 3.43, <4.0"
20+
google = ">= 3.43, < 5.0"
21+
google-beta = ">= 3.43, < 5.0"
2222
}
2323
provider_meta "google" {
2424
module_name = "blueprints/terraform/terraform-google-vm:{% if mig %}mig{% else %}mig_with_percent{% endif %}/v7.2.0"

examples/compute_instance/disk_snapshot/main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
version = "~> 3.0"
19-
}
20-
2117
# Building the list of disk names in the required format.
2218
# Usually you would build this list from the outputs of the compute_instance module
2319
locals {

examples/compute_instance/disk_snapshot/versions.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">=0.12.6"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
google = {
21+
source = "hashicorp/google"
22+
version = "~> 4.0"
23+
}
24+
}
1925
}

examples/compute_instance/multiple_interfaces/main.tf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
terraform {
18-
required_providers {
19-
google = {
20-
version = ">= 3.45.0"
21-
}
22-
null = {
23-
version = ">= 2.1.0"
24-
}
25-
}
26-
}
27-
2817
# [START compute_vm_with_multiple_interface]
2918
resource "google_compute_instance" "default" {
3019
project = var.project_id # Replace with your project ID in quotes

examples/compute_instance/multiple_interfaces/versions.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,15 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">=0.12.6"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
google = {
21+
source = "hashicorp/google"
22+
version = "~> 4.0"
23+
}
24+
null = {
25+
source = "hashicorp/null"
26+
version = ">= 2.1.0"
27+
}
28+
}
1929
}

examples/compute_instance/next_hop/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
19-
version = "~> 3.0"
20-
}
21-
2217
# [START compute_vm_as_next_hop_create]
2318
resource "google_compute_instance" "default" {
2419
project = var.project_id # Replace this with your project ID in quotes

examples/compute_instance/next_hop/versions.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">=0.12.6"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
google = {
21+
source = "hashicorp/google"
22+
version = "~> 4.0"
23+
}
24+
}
1925
}

examples/compute_instance/simple/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
19-
version = "~> 3.0"
20-
}
21-
2217
module "instance_template" {
2318
source = "../../../modules/instance_template"
2419
region = var.region

examples/compute_instance/simple/versions.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">=0.12.6"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
google = {
21+
source = "hashicorp/google"
22+
version = "~> 4.0"
23+
}
24+
}
1925
}

examples/compute_instance/tags/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
19-
version = "~> 3.0"
20-
}
21-
2217
# [START compute_vm_with_tags_create]
2318
resource "google_compute_instance" "default" {
2419
project = var.project_id # Replace this with your project ID in quotes

0 commit comments

Comments
 (0)