Skip to content

Commit

Permalink
feat: update TPG version constraints to allow 4.0 (#108)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
cloud-foundation-bot and bharathkkb authored Nov 22, 2021
1 parent 28e9123 commit 9b769df
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 51 deletions.
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ timeout: 3600s
steps:
- id: prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && chmod 600 /builder/home/.netrc']
env:
- 'TF_VAR_org_id=$_ORG_ID'
- 'TF_VAR_folder_id=$_FOLDER_ID'
Expand Down
7 changes: 6 additions & 1 deletion examples/dependency_example/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
random = {
source = "hashicorp/random"
}
}
}
4 changes: 0 additions & 4 deletions examples/kubectl_wrapper_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

provider "google" {
version = "~> 3.53"
}

locals {
manifest_path = "${path.module}/manifests"
}
Expand Down
25 changes: 25 additions & 0 deletions examples/kubectl_wrapper_example/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* 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.
*/

terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53"
}
}
required_version = ">= 0.13"
}
4 changes: 0 additions & 4 deletions examples/script_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

provider "google" {
version = "~> 3.53"
}

module "cli" {
source = "../.."

Expand Down
8 changes: 7 additions & 1 deletion examples/script_example/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
}
}
4 changes: 0 additions & 4 deletions examples/simple_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

provider "google" {
version = "~> 3.53"
}

module "cli" {
source = "../.."

Expand Down
8 changes: 7 additions & 1 deletion examples/simple_example/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
}
}
2 changes: 1 addition & 1 deletion modules/kubectl-wrapper/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google = {
source = "hashicorp/google"
version = "~> 3.53"
version = ">= 3.53, < 5.0"
}
}

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/kubectl_wrapper_example/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ output "client_token" {

output "ca_certificate" {
description = "The cluster ca certificate (base64 encoded)"
sensitive = true
value = module.gke.ca_certificate
}

24 changes: 0 additions & 24 deletions test/setup/make_source.sh

This file was deleted.

20 changes: 11 additions & 9 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/

terraform {
required_version = ">= 0.12"
}

provider "google" {
version = "~> 3.53.0"
}

provider "google-beta" {
version = "~> 3.53.0"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53.0"
}
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google = {
source = "hashicorp/google"
version = "~> 3.53"
version = ">= 3.53, < 5.0"
}
}

Expand Down

0 comments on commit 9b769df

Please sign in to comment.