From 6a43de0c2a3d93b8b91ca4200bb4f189fcf22ddf Mon Sep 17 00:00:00 2001
From: Andrew Peabody <andrewpeabody@google.com>
Date: Mon, 2 Oct 2023 15:24:44 +0000
Subject: [PATCH] fix: lint for dev-tools and CI

---
 Makefile                                    | 2 +-
 build/int.cloudbuild.yaml                   | 2 +-
 build/lint.cloudbuild.yaml                  | 2 +-
 modules/core_project_factory/outputs.tf     | 6 +++---
 modules/gsuite_enabled/main.tf              | 2 +-
 modules/gsuite_group/main.tf                | 2 +-
 test/fixtures/shared_vpc_no_subnets/main.tf | 1 +
 7 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index b1defb5b..3dd54101 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
 # Make will use bash instead of sh
 SHELL := /usr/bin/env bash
 
-DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1
+DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.16
 DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
 REGISTRY_URL := gcr.io/cloud-foundation-cicd
 
diff --git a/build/int.cloudbuild.yaml b/build/int.cloudbuild.yaml
index 20537493..4e5fd88a 100644
--- a/build/int.cloudbuild.yaml
+++ b/build/int.cloudbuild.yaml
@@ -170,7 +170,7 @@ tags:
 - 'integration'
 substitutions:
   _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
-  _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1'
+  _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
 options:
   machineType: 'N1_HIGHCPU_8'
   env:
diff --git a/build/lint.cloudbuild.yaml b/build/lint.cloudbuild.yaml
index 86fc6da2..9b7d9fbe 100644
--- a/build/lint.cloudbuild.yaml
+++ b/build/lint.cloudbuild.yaml
@@ -21,4 +21,4 @@ tags:
 - 'lint'
 substitutions:
   _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
-  _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1'
+  _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
diff --git a/modules/core_project_factory/outputs.tf b/modules/core_project_factory/outputs.tf
index b3d8a930..d5b7557b 100644
--- a/modules/core_project_factory/outputs.tf
+++ b/modules/core_project_factory/outputs.tf
@@ -63,16 +63,16 @@ output "service_account_unique_id" {
 
 output "project_bucket_name" {
   description = "The name of the projec's bucket"
-  value       = google_storage_bucket.project_bucket.*.name
+  value       = google_storage_bucket.project_bucket[*].name
 }
 
 output "project_bucket_self_link" {
-  value       = google_storage_bucket.project_bucket.*.self_link
+  value       = google_storage_bucket.project_bucket[*].self_link
   description = "Project's bucket selfLink"
 }
 
 output "project_bucket_url" {
-  value       = google_storage_bucket.project_bucket.*.url
+  value       = google_storage_bucket.project_bucket[*].url
   description = "Project's bucket url"
 }
 
diff --git a/modules/gsuite_enabled/main.tf b/modules/gsuite_enabled/main.tf
index f918c9bd..2747828f 100644
--- a/modules/gsuite_enabled/main.tf
+++ b/modules/gsuite_enabled/main.tf
@@ -67,7 +67,7 @@ module "project-factory" {
 
   group_email = element(
     compact(
-      concat(gsuite_group.group.*.email, [module.gsuite_group.email]),
+      concat(gsuite_group.group[*].email, [module.gsuite_group.email]),
     ),
     0,
   )
diff --git a/modules/gsuite_group/main.tf b/modules/gsuite_group/main.tf
index 64b5d0ba..2557cadf 100644
--- a/modules/gsuite_group/main.tf
+++ b/modules/gsuite_group/main.tf
@@ -15,7 +15,7 @@
  */
 
 locals {
-  domain_list = concat(data.google_organization.org.*.domain, ["dummy"])
+  domain_list = concat(data.google_organization.org[*].domain, ["dummy"])
   domain      = var.domain == "" ? element(local.domain_list, 0) : var.domain
   email       = var.name == "" ? "" : format("%s@%s", var.name, local.domain)
 }
diff --git a/test/fixtures/shared_vpc_no_subnets/main.tf b/test/fixtures/shared_vpc_no_subnets/main.tf
index 84360ac1..87d8b6d5 100644
--- a/test/fixtures/shared_vpc_no_subnets/main.tf
+++ b/test/fixtures/shared_vpc_no_subnets/main.tf
@@ -34,6 +34,7 @@ terraform {
       version = "~> 3.0"
     }
     gsuite = {
+      source  = "hashicorp/gsuite"
       version = "~> 0.1.12"
     }
   }