Skip to content

Commit 9b769df

Browse files
feat: update TPG version constraints to allow 4.0 (#108)
* feat: update TPG version constraints to allow 4.0 * pin example using gke to 3.x * Delete make_source.sh * mark ca cert sensitive * fix test .netrc permissions Co-authored-by: bharathkkb <[email protected]>
1 parent 28e9123 commit 9b769df

File tree

13 files changed

+60
-51
lines changed

13 files changed

+60
-51
lines changed

build/int.cloudbuild.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ timeout: 3600s
1616
steps:
1717
- id: prepare
1818
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
19-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']
19+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && chmod 600 /builder/home/.netrc']
2020
env:
2121
- 'TF_VAR_org_id=$_ORG_ID'
2222
- 'TF_VAR_folder_id=$_FOLDER_ID'

examples/dependency_example/versions.tf

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">= 0.12"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
random = {
21+
source = "hashicorp/random"
22+
}
23+
}
1924
}

examples/kubectl_wrapper_example/main.tf

-4
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.53"
19-
}
20-
2117
locals {
2218
manifest_path = "${path.module}/manifests"
2319
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright 2021 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
terraform {
18+
required_providers {
19+
google = {
20+
source = "hashicorp/google"
21+
version = "~> 3.53"
22+
}
23+
}
24+
required_version = ">= 0.13"
25+
}

examples/script_example/main.tf

-4
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.53"
19-
}
20-
2117
module "cli" {
2218
source = "../.."
2319

examples/script_example/versions.tf

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
*/
1616

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

examples/simple_example/main.tf

-4
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.53"
19-
}
20-
2117
module "cli" {
2218
source = "../.."
2319

examples/simple_example/versions.tf

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
*/
1616

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

modules/kubectl-wrapper/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ terraform {
2020

2121
google = {
2222
source = "hashicorp/google"
23-
version = "~> 3.53"
23+
version = ">= 3.53, < 5.0"
2424
}
2525
}
2626

test/fixtures/kubectl_wrapper_example/outputs.tf

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ output "client_token" {
2929

3030
output "ca_certificate" {
3131
description = "The cluster ca certificate (base64 encoded)"
32+
sensitive = true
3233
value = module.gke.ca_certificate
3334
}
3435

test/setup/make_source.sh

-24
This file was deleted.

test/setup/versions.tf

+11-9
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">= 0.12"
19-
}
20-
21-
provider "google" {
22-
version = "~> 3.53.0"
23-
}
24-
25-
provider "google-beta" {
26-
version = "~> 3.53.0"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
google = {
21+
source = "hashicorp/google"
22+
version = "~> 3.53.0"
23+
}
24+
google-beta = {
25+
source = "hashicorp/google-beta"
26+
version = "~> 3.53.0"
27+
}
28+
}
2729
}

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ terraform {
2020

2121
google = {
2222
source = "hashicorp/google"
23-
version = "~> 3.53"
23+
version = ">= 3.53, < 5.0"
2424
}
2525
}
2626

0 commit comments

Comments
 (0)