Skip to content

Commit

Permalink
feat: Update TPG version constraints to allow 4.0 (#50)
Browse files Browse the repository at this point in the history
* Update: provider versions contraints

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Update: provider versions contraints

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Update: refactoring examples code

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Fix: lint

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault authored Feb 2, 2022
1 parent 9792215 commit 1aebd31
Show file tree
Hide file tree
Showing 14 changed files with 146 additions and 74 deletions.
21 changes: 13 additions & 8 deletions examples/gh-org-runner-mig-native-simple/providers.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -14,11 +14,16 @@
* limitations under the License.
*/


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

provider "google-beta" {
version = "~> 3.16"
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53, < 5.0.0"
}
}
required_version = ">= 0.13"
}
11 changes: 0 additions & 11 deletions examples/gh-runner-gke-dind/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@
* limitations under the License.
*/

/*****************************************
Google Provider Configuration
*****************************************/
provider "google" {
version = "~> 3.1"
}

provider "google-beta" {
version = "~> 3.1"
}

/*****************************************
Kubernetes provider configuration
*****************************************/
Expand Down
33 changes: 33 additions & 0 deletions examples/gh-runner-gke-dind/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright 2020 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.1"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.1"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 1.10"
}
}
required_version = ">= 0.13"
}
11 changes: 0 additions & 11 deletions examples/gh-runner-gke-simple/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@
* limitations under the License.
*/

/*****************************************
Google Provider Configuration
*****************************************/
provider "google" {
version = "~> 3.1"
}

provider "google-beta" {
version = "~> 3.1"
}

/*****************************************
Kubernetes provider configuration
*****************************************/
Expand Down
33 changes: 33 additions & 0 deletions examples/gh-runner-gke-simple/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright 2020 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.1"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.1"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 1.10"
}
}
required_version = ">= 0.13"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -14,11 +14,16 @@
* limitations under the License.
*/


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

provider "google-beta" {
version = "~> 3.16"
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53, < 5.0.0"
}
}
required_version = ">= 0.13"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -14,11 +14,16 @@
* limitations under the License.
*/


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

provider "google-beta" {
version = "~> 3.16"
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53, < 5.0.0"
}
}
required_version = ">= 0.13"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -14,11 +14,16 @@
* limitations under the License.
*/


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

provider "google-beta" {
version = "~> 3.16"
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53, < 5.0.0"
}
}
required_version = ">= 0.13"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
* limitations under the License.
*/


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

provider "google-beta" {
version = "~> 3.16"
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.0"
}
}
required_version = ">= 0.13"
}
2 changes: 1 addition & 1 deletion modules/gh-oidc/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.64"
version = ">= 3.64, < 5.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/gh-runner-gke/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.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/gh-runner-mig-container-vm/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.0"
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/gh-runner-mig-vm/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ terraform {

google = {
source = "hashicorp/google"
version = "~> 3.53"
version = "~> 3.53, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53"
version = "~> 3.53, < 5.0.0"
}
}

Expand Down
19 changes: 11 additions & 8 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -16,12 +16,15 @@

terraform {
required_version = ">= 0.12"
}

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

provider "google-beta" {
version = "~> 3.53.0"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.53.0"
}
}
}

0 comments on commit 1aebd31

Please sign in to comment.