GoogleCloudPlatform / pbmm-on-gcp-onboarding

GCP Canadian Public Sector Landing Zone overlay on top of the TEF via CFT modules - a secure cloud foundation
https://cloud.google.com/architecture/security-foundations
Apache License 2.0
39 stars 55 forks source link

Pr mro bootstrap run terraform local 041524 #384

Closed mromascanu123 closed 2 months ago

mromascanu123 commented 2 months ago

Only the basic changes to be able to run TF locally as for ADO. Unfortunately the whole TEF approach relies on code patching Consequently there is a python script included (fix_tfvars_symlinks.py) that has to be run before starting w/ 0-bootstrap, e.g. in the root folder of the distribution python fix_tfvars_symlinks.py .

This will create symlinks whatever.tfvars pointing to whatever.mod.tfvars To verify however that the symlinks terraform.tfvars in subfolders exist (they are broken before running the python script)

The other problem, also due to the code-patch mechanism is that if merged into main codebuild deployment will no longer work renamed the cb-related files as .dont_use). Restore them if need be to run cloudbuild

google-cla[bot] commented 2 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

mromascanu123 commented 2 months ago

Unfortunately there was a type in fix_tfvars_symlinks.py that was fixed now in the same branch. Very simple patch: instead of re_repl_mod_tfvars = r'\1\2' use re_repl_mod_tfvars = r'\1\3'