terraform-google-modules / terraform-example-foundation

Shows how the CFT modules can be composed to build a secure cloud foundation
https://cloud.google.com/architecture/security-foundations
Apache License 2.0
1.18k stars 702 forks source link

2 symlinks in 3-n-h-a-s switched from ../../ to ../shared in #1107 nonprod refactor error during #119 #1229

Closed fmichaelobrien closed 1 month ago

fmichaelobrien commented 2 months ago

TL;DR

3-networks-hub-and-spoke

https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars

-../../access_context.auto.tfvars
+../shared/access_context.auto.tfvars

there is a 2nd symlink regression in the same directory in https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars

-../../common.auto.tfvars
+../shared/common.auto.tfvars

I'll raise an issue shortly with the fix after I test a full upstream sync of the TEF.

Screenshot 2024-05-11 at 19 09 03

Expected behavior

Symlinks unmodified

Observed behavior

Same behavior but now running double symlinks for 2 of 8

Terraform Configuration

N/a cb/car default

Terraform Version

1.3.10

Additional information

During an upstream sync from TEF master to pbmm master.

I'll put up a patch tonight

fmichaelobrien commented 2 months ago

patch

fmichaelobrien-macbookpro:terraform-example-foundation fmichaelobrien$ git status
On branch gh1229-fix-symlinks
Your branch is up to date with 'origin/gh1229-fix-symlinks'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars
    modified:   3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars

no changes added to commit (use "git add" and/or "git commit -a")
fmichaelobrien-macbookpro:terraform-example-foundation fmichaelobrien$ git diff
diff --git a/3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars b/3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars
index 59c7aa1..b0cccce 120000
--- a/3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars
+++ b/3-networks-hub-and-spoke/envs/nonproduction/access_context.auto.tfvars
@@ -1 +1 @@
-../shared/access_context.auto.tfvars
\ No newline at end of file
+../../access_context.auto.tfvars
\ No newline at end of file
diff --git a/3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars b/3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars
index 3316647..39aaa46 120000
--- a/3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars
+++ b/3-networks-hub-and-spoke/envs/nonproduction/common.auto.tfvars
@@ -1 +1 @@
-../shared/common.auto.tfvars
\ No newline at end of file
+../../common.auto.tfvars
\ No newline at end of file

testing on 387