From bd4d7d43401c257ad64741f3cba894ad7498b94a Mon Sep 17 00:00:00 2001 From: Anna Pendleton Date: Mon, 1 Apr 2024 12:20:45 -0700 Subject: [PATCH] add versions to source modules (#500) Scoped to infra stage-1 for now. Follow up PRs for any other source modules. Avoid breaking changes to main dev branch --- .../infra/stage-1/modules/gke-infra/cluster.tf | 12 ++++-------- benchmarks/infra/stage-1/modules/gke-infra/main.tf | 10 +++++----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/benchmarks/infra/stage-1/modules/gke-infra/cluster.tf b/benchmarks/infra/stage-1/modules/gke-infra/cluster.tf index 6fcbb6121..dc7066193 100644 --- a/benchmarks/infra/stage-1/modules/gke-infra/cluster.tf +++ b/benchmarks/infra/stage-1/modules/gke-infra/cluster.tf @@ -63,14 +63,14 @@ data "google_container_cluster" "cluster" { } module "cluster-service-account" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/iam-service-account" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/iam-service-account?ref=v30.0.0&depth=1" count = local.cluster_create ? 1 : 0 project_id = module.project.project_id name = var.prefix } module "cluster-standard" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-cluster-standard" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-cluster-standard?ref=v30.0.0&depth=1" count = local.cluster_create && !var.gke_autopilot ? 1 : 0 project_id = module.project.project_id name = var.cluster_name @@ -84,10 +84,6 @@ module "cluster-standard" { master_authorized_ranges = var.cluster_create.master_authorized_ranges master_ipv4_cidr_block = var.cluster_create.master_ipv4_cidr_block } - default_nodepool = { - remove_pool = false - initial_node_count = 1 - } private_cluster_config = { enable_private_endpoint = var.enable_private_endpoint master_global_access = true @@ -128,7 +124,7 @@ module "cluster-standard" { } module "cluster-autopilot" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-cluster-autopilot" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-cluster-autopilot?ref=v30.0.0&depth=1" count = local.cluster_create && var.gke_autopilot ? 1 : 0 project_id = module.project.project_id name = var.cluster_name @@ -178,7 +174,7 @@ module "cluster-autopilot" { } module "cluster-nodepool" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-nodepool" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-nodepool?ref=v30.0.0&depth=1" depends_on = [module.cluster-standard] for_each = (local.cluster_create && !var.gke_autopilot) ? var.nodepools : tomap({}) diff --git a/benchmarks/infra/stage-1/modules/gke-infra/main.tf b/benchmarks/infra/stage-1/modules/gke-infra/main.tf index 5237861bb..c6eda93bc 100644 --- a/benchmarks/infra/stage-1/modules/gke-infra/main.tf +++ b/benchmarks/infra/stage-1/modules/gke-infra/main.tf @@ -47,7 +47,7 @@ locals { } module "project" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/project" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/project?ref=v30.0.0&depth=1" parent = try(var.project_create.parent, null) billing_account = try(var.project_create.billing_account, null) name = var.project_id @@ -125,14 +125,14 @@ module "vpc" { } module "fleet-project" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/project" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/project?ref=v30.0.0&depth=1" count = var.fleet_project_id == null ? 0 : 1 name = var.fleet_project_id project_create = false } module "fleet" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-hub" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/gke-hub?ref=v30.0.0&depth=1" project_id = local.fleet_project.project_id clusters = { (var.cluster_name) = ( @@ -144,7 +144,7 @@ module "fleet" { } module "registry" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/artifact-registry" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/artifact-registry?ref=v30.0.0&depth=1" count = var.registry_create ? 1 : 0 project_id = module.project.project_id location = var.region @@ -153,7 +153,7 @@ module "registry" { } module "nat" { - source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/net-cloudnat" + source = "git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git//modules/net-cloudnat?ref=v30.0.0&depth=1" count = local.create_nat ? 1 : 0 project_id = module.project.project_id region = var.region