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

Eliminate network hardcoding (related to #1152, #1153, #1154, #1155) #1226

Open mromascanu123 opened 2 months ago

mromascanu123 commented 2 months ago

TL;DR

Remove the hardcoding at different levels of IPs and configuration options and instead take the values from a configuration object (which may come from a simple yaml file, or injected by a script). For 3-n-h-a-s an example code and configuration attached. Actually this example attached code (base_env-main.tf.zip) was tested working in a POC on derived TEF fork and removed hardcoding. The actual configuration object coming from the calling module e.g. envs/development (development-main.tf.zip). An example (working & tested) config file attached . Just a working example showing this is possible and even potentially beneficial in terms of consolidating the configuration and streamlining configuration. Just examples (although working) certainly can be optimized or done in other more intelligent way

Attachments:

base_env-main.tf.zip development-main.tf.zip vpc_config.yaml.zip

Terraform Resources

N/A

Detailed design

N/A (see TL;DR*)

Additional information

Related to #1152 #1153 #1154 #1155