Skip to content

Commit

Permalink
fix: upgrade version for dependant CFT modules (#339)
Browse files Browse the repository at this point in the history
* upgrade version for dependant CFT modules

* update terraform version

* Remove replicated blocks
  • Loading branch information
ericyz authored and bharathkkb committed Mar 31, 2021
1 parent 3e95111 commit 02a4ac5
Show file tree
Hide file tree
Showing 39 changed files with 369 additions and 87 deletions.
16 changes: 0 additions & 16 deletions 0-bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@
* limitations under the License.
*/

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

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

provider "null" {
version = "~> 2.1"
}

provider "random" {
version = "~> 2.2"
}

/*************************************************
Bootstrap GCP Organization.
*************************************************/
Expand Down
2 changes: 1 addition & 1 deletion 0-bootstrap/modules/jenkins-agent/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = ">=0.13, <0.14"
required_version = ">= 0.13"

required_providers {
google = "~> 3.5"
Expand Down
17 changes: 16 additions & 1 deletion 0-bootstrap/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,20 @@
*/

terraform {
required_version = ">=0.13, <0.14"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}

random = {
source = "hashicorp/random"
version = "~> 2.3"
}
}
}
12 changes: 6 additions & 6 deletions 1-org/envs/shared/projects.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module "org_billing_logs" {

module "org_secrets" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
default_service_account = "depriviledge"
Expand Down Expand Up @@ -106,7 +106,7 @@ module "org_secrets" {

module "interconnect" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
default_service_account = "depriviledge"
Expand Down Expand Up @@ -136,7 +136,7 @@ module "interconnect" {

module "scc_notifications" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
default_service_account = "depriviledge"
Expand Down Expand Up @@ -166,7 +166,7 @@ module "scc_notifications" {

module "dns_hub" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
default_service_account = "depriviledge"
Expand Down Expand Up @@ -204,7 +204,7 @@ module "dns_hub" {

module "base_network_hub" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
count = var.enable_hub_and_spoke ? 1 : 0
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
Expand Down Expand Up @@ -243,7 +243,7 @@ module "base_network_hub" {

module "restricted_network_hub" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
count = var.enable_hub_and_spoke ? 1 : 0
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
Expand Down
2 changes: 0 additions & 2 deletions 1-org/envs/shared/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

10 changes: 10 additions & 0 deletions 1-org/envs/shared/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@

terraform {
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 2-environments/envs/development/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

29 changes: 29 additions & 0 deletions 2-environments/envs/development/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 2-environments/envs/non-production/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

29 changes: 29 additions & 0 deletions 2-environments/envs/non-production/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 2-environments/envs/production/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

29 changes: 29 additions & 0 deletions 2-environments/envs/production/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 1 addition & 1 deletion 2-environments/modules/env_baseline/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

module "monitoring_project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
name = "${var.project_prefix}-${var.environment_code}-monitoring"
Expand Down
4 changes: 2 additions & 2 deletions 2-environments/modules/env_baseline/networking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

module "base_shared_vpc_host_project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
name = format("%s-%s-shared-base", var.project_prefix, var.environment_code)
Expand Down Expand Up @@ -53,7 +53,7 @@ module "base_shared_vpc_host_project" {

module "restricted_shared_vpc_host_project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
name = format("%s-%s-shared-restricted", var.project_prefix, var.environment_code)
Expand Down
2 changes: 1 addition & 1 deletion 2-environments/modules/env_baseline/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module "env_secrets" {
source = "terraform-google-modules/project-factory/google"
version = "~> 10.0"
version = "~> 10.1"
random_project_id = "true"
impersonate_service_account = var.terraform_service_account
default_service_account = "depriviledge"
Expand Down
2 changes: 0 additions & 2 deletions 3-networks/envs/development/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

12 changes: 11 additions & 1 deletion 3-networks/envs/development/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,15 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 3-networks/envs/non-production/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

12 changes: 11 additions & 1 deletion 3-networks/envs/non-production/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,15 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 3-networks/envs/production/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

12 changes: 11 additions & 1 deletion 3-networks/envs/production/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,15 @@
*/

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google"
version = ">= 3.50"
}
}
}
2 changes: 0 additions & 2 deletions 3-networks/envs/shared/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ data "google_service_account_access_token" "default" {
*****************************************/
provider "google" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

provider "google-beta" {
access_token = data.google_service_account_access_token.default.access_token
version = "~> 3.30"
}

Loading

0 comments on commit 02a4ac5

Please sign in to comment.