Skip to content

Commit aca3400

Browse files
authored
fix: fix location variables for step 4-projects in deploy helper (#1334)
1 parent d295755 commit aca3400

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

helpers/foundation-deployer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Helper tool to deploy the Terraform example foundation using Cloud Build and Clo
1111
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version 2.28.0 or later
1212
- [Terraform](https://www.terraform.io/downloads.html) version 1.5.7 or later
1313
- See `0-bootstrap` README for additional IAM [requirements](../../0-bootstrap/README.md#prerequisites) on the user deploying the Foundation.
14+
- To enable Security Command Center, choose a Security Command Center tier and create and grant permissions for the Security Command Center service account as described in [Setting up Security Command Center](https://cloud.google.com/security-command-center/docs/quickstart-security-command-center).
1415

1516
Your environment need to use the same [Terraform](https://www.terraform.io/downloads.html) version used on the build pipeline.
1617
Otherwise, you might experience Terraform state snapshot lock errors.

helpers/foundation-deployer/global.tfvars.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ target_name_server_addresses = [
142142
// Can be used to override the default region set in 0-bootstrap
143143
// See https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/4-projects/business_unit_1/production/README.md#outputs
144144

145-
gcs_location = "US"
146-
kms_location = "us"
145+
location_kms = "us"
146+
location_gcs = "US"

helpers/foundation-deployer/stages/apply.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ func DeployProjectsStage(t testing.TB, s steps.Steps, tfvars GlobalTFVars, outpu
338338
}
339339
//for each environment
340340
envTfvars := ProjEnvTfvars{
341-
ProjectsKMSLocation: tfvars.ProjectsKMSLocation,
342-
ProjectsGCSLocation: tfvars.ProjectsGCSLocation,
341+
LocationKMS: tfvars.LocationKMS,
342+
LocationGCS: tfvars.LocationGCS,
343343
}
344344
for _, envfile := range []string{
345345
"development.auto.tfvars",

helpers/foundation-deployer/stages/data.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ type GlobalTFVars struct {
152152
EnableHubAndSpoke bool `hcl:"enable_hub_and_spoke"`
153153
EnableHubAndSpokeTransitivity bool `hcl:"enable_hub_and_spoke_transitivity"`
154154
CreateUniqueTagKey bool `hcl:"create_unique_tag_key"`
155-
ProjectsKMSLocation string `hcl:"projects_kms_location"`
156-
ProjectsGCSLocation string `hcl:"projects_gcs_location"`
155+
LocationKMS string `hcl:"location_kms"`
156+
LocationGCS string `hcl:"location_gcs"`
157157
CodeCheckoutPath string `hcl:"code_checkout_path"`
158158
FoundationCodePath string `hcl:"foundation_code_path"`
159159
ValidatorProjectId *string `hcl:"validator_project_id"`
@@ -250,8 +250,8 @@ type ProjSharedTfvars struct {
250250
}
251251

252252
type ProjEnvTfvars struct {
253-
ProjectsKMSLocation string `hcl:"projects_kms_location"`
254-
ProjectsGCSLocation string `hcl:"projects_gcs_location"`
253+
LocationKMS string `hcl:"location_kms"`
254+
LocationGCS string `hcl:"location_gcs"`
255255
}
256256

257257
type AppInfraCommonTfvars struct {

0 commit comments

Comments
 (0)