From 7056f7dc0d5d10367eb2420d97e9f753d27f592a Mon Sep 17 00:00:00 2001 From: Wei Zhong Ye Date: Wed, 18 Sep 2024 09:36:59 -0400 Subject: [PATCH] Pin IAM modules to a specific version. --- .../generated/iam_members/iam_members/main.tf | 25 +++++++++++-------- .../team/additional_iam_members/main.tf | 25 +++++++++++-------- .../generated/team/project_apps/main.tf | 2 +- .../generated/team/project_data/main.tf | 2 +- .../tfengine/components/iam_members/main.tf | 5 ++++ .../resources/project_iam_members/main.tf | 2 +- 6 files changed, 38 insertions(+), 23 deletions(-) diff --git a/examples/tfengine/generated/iam_members/iam_members/main.tf b/examples/tfengine/generated/iam_members/iam_members/main.tf index db0907078..86c367acf 100644 --- a/examples/tfengine/generated/iam_members/iam_members/main.tf +++ b/examples/tfengine/generated/iam_members/iam_members/main.tf @@ -26,8 +26,9 @@ terraform { } module "storage_bucket_iam_members" { - source = "terraform-google-modules/iam/google//modules/storage_buckets_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/storage_buckets_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.storage_bucket_iam_members : idx => member @@ -37,8 +38,9 @@ module "storage_bucket_iam_members" { } module "project_iam_members" { - source = "terraform-google-modules/iam/google//modules/projects_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/projects_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.project_iam_members : idx => member @@ -48,8 +50,9 @@ module "project_iam_members" { } module "folder_iam_members" { - source = "terraform-google-modules/iam/google//modules/folders_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/folders_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.folder_iam_members : idx => member @@ -59,8 +62,9 @@ module "folder_iam_members" { } module "organization_iam_members" { - source = "terraform-google-modules/iam/google//modules/organizations_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/organizations_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.organization_iam_members : idx => member @@ -70,8 +74,9 @@ module "organization_iam_members" { } module "service_account_iam_members" { - source = "terraform-google-modules/iam/google//modules/service_accounts_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/service_accounts_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.service_account_iam_members : idx => member diff --git a/examples/tfengine/generated/team/additional_iam_members/main.tf b/examples/tfengine/generated/team/additional_iam_members/main.tf index 5e3f1759d..d275cdbe0 100644 --- a/examples/tfengine/generated/team/additional_iam_members/main.tf +++ b/examples/tfengine/generated/team/additional_iam_members/main.tf @@ -26,8 +26,9 @@ terraform { } module "storage_bucket_iam_members" { - source = "terraform-google-modules/iam/google//modules/storage_buckets_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/storage_buckets_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.storage_bucket_iam_members : idx => member @@ -37,8 +38,9 @@ module "storage_bucket_iam_members" { } module "project_iam_members" { - source = "terraform-google-modules/iam/google//modules/projects_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/projects_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.project_iam_members : idx => member @@ -48,8 +50,9 @@ module "project_iam_members" { } module "folder_iam_members" { - source = "terraform-google-modules/iam/google//modules/folders_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/folders_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.folder_iam_members : idx => member @@ -59,8 +62,9 @@ module "folder_iam_members" { } module "organization_iam_members" { - source = "terraform-google-modules/iam/google//modules/organizations_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/organizations_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.organization_iam_members : idx => member @@ -70,8 +74,9 @@ module "organization_iam_members" { } module "service_account_iam_members" { - source = "terraform-google-modules/iam/google//modules/service_accounts_iam" - mode = "additive" + source = "terraform-google-modules/iam/google//modules/service_accounts_iam" + version = "~> 7.7.0" + mode = "additive" for_each = { for idx, member in var.service_account_iam_members : idx => member diff --git a/examples/tfengine/generated/team/project_apps/main.tf b/examples/tfengine/generated/team/project_apps/main.tf index cba237a3c..d8a168e5c 100644 --- a/examples/tfengine/generated/team/project_apps/main.tf +++ b/examples/tfengine/generated/team/project_apps/main.tf @@ -233,7 +233,7 @@ module "gke_cluster" { module "project_iam_members" { source = "terraform-google-modules/iam/google//modules/projects_iam" - version = "~> 7.4.0" + version = "~> 7.7.0" projects = [module.project.project_id] mode = "additive" diff --git a/examples/tfengine/generated/team/project_data/main.tf b/examples/tfengine/generated/team/project_data/main.tf index 4f944b54a..1f9fb0b99 100644 --- a/examples/tfengine/generated/team/project_data/main.tf +++ b/examples/tfengine/generated/team/project_data/main.tf @@ -220,7 +220,7 @@ module "healthcare_dataset" { module "project_iam_members" { source = "terraform-google-modules/iam/google//modules/projects_iam" - version = "~> 7.4.0" + version = "~> 7.7.0" projects = [module.project.project_id] mode = "additive" diff --git a/templates/tfengine/components/iam_members/main.tf b/templates/tfengine/components/iam_members/main.tf index 0f311d20b..e1892bbad 100644 --- a/templates/tfengine/components/iam_members/main.tf +++ b/templates/tfengine/components/iam_members/main.tf @@ -14,6 +14,7 @@ limitations under the License. */ -}} module "storage_bucket_iam_members" { source = "terraform-google-modules/iam/google//modules/storage_buckets_iam" + version = "~> 7.7.0" mode = "additive" for_each = { for idx, member in var.storage_bucket_iam_members : @@ -25,6 +26,7 @@ module "storage_bucket_iam_members" { module "project_iam_members" { source = "terraform-google-modules/iam/google//modules/projects_iam" + version = "~> 7.7.0" mode = "additive" for_each = { for idx, member in var.project_iam_members : @@ -36,6 +38,7 @@ module "project_iam_members" { module "folder_iam_members" { source = "terraform-google-modules/iam/google//modules/folders_iam" + version = "~> 7.7.0" mode = "additive" for_each = { for idx, member in var.folder_iam_members : @@ -47,6 +50,7 @@ module "folder_iam_members" { module "organization_iam_members" { source = "terraform-google-modules/iam/google//modules/organizations_iam" + version = "~> 7.7.0" mode = "additive" for_each = { for idx, member in var.organization_iam_members : @@ -58,6 +62,7 @@ module "organization_iam_members" { module "service_account_iam_members" { source = "terraform-google-modules/iam/google//modules/service_accounts_iam" + version = "~> 7.7.0" mode = "additive" for_each = { for idx, member in var.service_account_iam_members : diff --git a/templates/tfengine/components/resources/project_iam_members/main.tf b/templates/tfengine/components/resources/project_iam_members/main.tf index d97acf524..389f127c4 100644 --- a/templates/tfengine/components/resources/project_iam_members/main.tf +++ b/templates/tfengine/components/resources/project_iam_members/main.tf @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} module "project_iam_members" { source = "terraform-google-modules/iam/google//modules/projects_iam" - version = "~> 7.4.0" + version = "~> 7.7.0" projects = [module.project.project_id] mode = "additive"