From 912cbb8281e046a7709e3565a10968dbbbf16349 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Tue, 6 Aug 2024 13:21:55 +0200 Subject: [PATCH] Rename 1-vpc-sc stage to 1-vpcsc (#2471) * Rename 1-vpc-sc stage to 1-vpcsc * Fix tests --- fast/stage-links.sh | 4 ++-- fast/stages/{1-vpc-sc => 1-vpcsc}/IAM.md | 0 fast/stages/{1-vpc-sc => 1-vpcsc}/README.md | 2 +- .../data/access-levels/geo.yaml | 0 .../data/restricted-services.yaml | 0 fast/stages/{1-vpc-sc => 1-vpcsc}/diagram.png | Bin fast/stages/{1-vpc-sc => 1-vpcsc}/main.tf | 0 fast/stages/{1-vpc-sc => 1-vpcsc}/outputs.tf | 6 +++--- fast/stages/{1-vpc-sc => 1-vpcsc}/variables-fast.tf | 0 fast/stages/{1-vpc-sc => 1-vpcsc}/variables.tf | 0 fast/stages/README.md | 2 +- tests/fast/stages/s1_vpcsc/simple.yaml | 2 +- tests/fast/stages/s1_vpcsc/tftest.yaml | 4 ++-- 13 files changed, 10 insertions(+), 10 deletions(-) rename fast/stages/{1-vpc-sc => 1-vpcsc}/IAM.md (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/README.md (99%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/data/access-levels/geo.yaml (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/data/restricted-services.yaml (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/diagram.png (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/main.tf (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/outputs.tf (93%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/variables-fast.tf (100%) rename fast/stages/{1-vpc-sc => 1-vpcsc}/variables.tf (100%) diff --git a/fast/stage-links.sh b/fast/stage-links.sh index 4029ba08e..a814fa0f5 100755 --- a/fast/stage-links.sh +++ b/fast/stage-links.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ case $STAGE_NAME in PROVIDER="providers/${STAGE_NAME}-providers.tf" TFVARS="tfvars/0-bootstrap.auto.tfvars.json" ;; -"1-vpc-sc") +"1-vpcsc") PROVIDER="providers/1-vpcsc-providers.tf" TFVARS="tfvars/0-bootstrap.auto.tfvars.json" ;; diff --git a/fast/stages/1-vpc-sc/IAM.md b/fast/stages/1-vpcsc/IAM.md similarity index 100% rename from fast/stages/1-vpc-sc/IAM.md rename to fast/stages/1-vpcsc/IAM.md diff --git a/fast/stages/1-vpc-sc/README.md b/fast/stages/1-vpcsc/README.md similarity index 99% rename from fast/stages/1-vpc-sc/README.md rename to fast/stages/1-vpcsc/README.md index 6c1d20c4f..df8cea697 100644 --- a/fast/stages/1-vpc-sc/README.md +++ b/fast/stages/1-vpcsc/README.md @@ -96,7 +96,7 @@ The commands to link or copy the provider and terraform variable files can be ge ```bash ../../stage-links.sh ~/fast-config -# copy and paste the following commands for '1-vpc-sc' +# copy and paste the following commands for '1-vpcsc' ln -s ~/fast-config/tfvars/0-globals.auto.tfvars.json ./ ln -s ~/fast-config/tfvars/0-bootstrap.auto.tfvars.json ./ diff --git a/fast/stages/1-vpc-sc/data/access-levels/geo.yaml b/fast/stages/1-vpcsc/data/access-levels/geo.yaml similarity index 100% rename from fast/stages/1-vpc-sc/data/access-levels/geo.yaml rename to fast/stages/1-vpcsc/data/access-levels/geo.yaml diff --git a/fast/stages/1-vpc-sc/data/restricted-services.yaml b/fast/stages/1-vpcsc/data/restricted-services.yaml similarity index 100% rename from fast/stages/1-vpc-sc/data/restricted-services.yaml rename to fast/stages/1-vpcsc/data/restricted-services.yaml diff --git a/fast/stages/1-vpc-sc/diagram.png b/fast/stages/1-vpcsc/diagram.png similarity index 100% rename from fast/stages/1-vpc-sc/diagram.png rename to fast/stages/1-vpcsc/diagram.png diff --git a/fast/stages/1-vpc-sc/main.tf b/fast/stages/1-vpcsc/main.tf similarity index 100% rename from fast/stages/1-vpc-sc/main.tf rename to fast/stages/1-vpcsc/main.tf diff --git a/fast/stages/1-vpc-sc/outputs.tf b/fast/stages/1-vpcsc/outputs.tf similarity index 93% rename from fast/stages/1-vpc-sc/outputs.tf rename to fast/stages/1-vpcsc/outputs.tf index df77650df..868e4a082 100644 --- a/fast/stages/1-vpc-sc/outputs.tf +++ b/fast/stages/1-vpcsc/outputs.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,13 +30,13 @@ locals { resource "local_file" "tfvars" { for_each = var.outputs_location == null ? {} : { 1 = 1 } file_permission = "0644" - filename = "${pathexpand(var.outputs_location)}/tfvars/2-vpc-sc.auto.tfvars.json" + filename = "${pathexpand(var.outputs_location)}/tfvars/1-vpcsc.auto.tfvars.json" content = jsonencode(local.tfvars) } resource "google_storage_bucket_object" "tfvars" { bucket = var.automation.outputs_bucket - name = "tfvars/2-vpc-sc.auto.tfvars.json" + name = "tfvars/1-vpcsc.auto.tfvars.json" content = jsonencode(local.tfvars) } diff --git a/fast/stages/1-vpc-sc/variables-fast.tf b/fast/stages/1-vpcsc/variables-fast.tf similarity index 100% rename from fast/stages/1-vpc-sc/variables-fast.tf rename to fast/stages/1-vpcsc/variables-fast.tf diff --git a/fast/stages/1-vpc-sc/variables.tf b/fast/stages/1-vpcsc/variables.tf similarity index 100% rename from fast/stages/1-vpc-sc/variables.tf rename to fast/stages/1-vpcsc/variables.tf diff --git a/fast/stages/README.md b/fast/stages/README.md index b9f6eda9f..8f5800ed8 100644 --- a/fast/stages/README.md +++ b/fast/stages/README.md @@ -27,7 +27,7 @@ To destroy a previous FAST deployment follow the instructions detailed in [clean - [Resource Management](1-resman/README.md) Creates the base resource hierarchy (folders) and the automation resources that will be required later to delegate deployment of each part of the hierarchy to separate stages. This stage also configures resource management tags used in scoping specific IAM roles on the resource hierarchy.\ Exports: folder ids, automation service account emails, tags -- [VPC Service Controls](./1-vpc-sc/README.md) +- [VPC Service Controls](./1-vpcsc/README.md) Optionally configures VPC Service Controls protection for the organization. ## Multitenancy diff --git a/tests/fast/stages/s1_vpcsc/simple.yaml b/tests/fast/stages/s1_vpcsc/simple.yaml index e741d787e..3350d3dc9 100644 --- a/tests/fast/stages/s1_vpcsc/simple.yaml +++ b/tests/fast/stages/s1_vpcsc/simple.yaml @@ -23,7 +23,7 @@ values: detect_md5hash: different hash event_based_hold: null metadata: null - name: tfvars/2-vpc-sc.auto.tfvars.json + name: tfvars/1-vpcsc.auto.tfvars.json retention: [] source: null temporary_hold: null diff --git a/tests/fast/stages/s1_vpcsc/tftest.yaml b/tests/fast/stages/s1_vpcsc/tftest.yaml index 298a3cd9a..f735724ee 100644 --- a/tests/fast/stages/s1_vpcsc/tftest.yaml +++ b/tests/fast/stages/s1_vpcsc/tftest.yaml @@ -1,4 +1,4 @@ -# Copyright 2023 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -module: fast/stages/1-vpc-sc +module: fast/stages/1-vpcsc tests: simple: