Open nusrath432 opened 2 years ago
Note: Until this issue is addressed, as a work around, we can define the following block, to override the lower level passthrough=true
custom_variables = {
passthrough = false
}
This way, the resources will not be destroyed when we reference lower level TF state file.
Remember we have to override not just passthrough but all those values that cause a difference between global_settings {} vs custom_variables {} blocks. For example: prefixes, random_length etc
@arnaudlh @LaurentLesle Could you share your thoughts on this issue please
Do we have any Roadmap or Project board for this project to track - it is a while since we had any new release.
Describe the bug When defining global_settings block for a given landingzone, the current landingzone should take precedence over global_settings defined in lower/other current landingzones. Also, the global_settings should only be imported when global_settings_key is defined. Since a merge function is used, the order of items in the map is important.
To Reproduce Steps to reproduce the behaviour: Create a landingzone with global_settings [passthrough = true;] Create another landingzone with global_settings [passthrough = false; prefix=xyz] Now within the landingzone.tfvars, reference the 1st landingzone within the tfstate block.
Expected behavior passthrough = false, prefix = xyz should take preference and the resources should not be destroy by referencing to lower tfstate.
Pull Request [Global_settings precedence] https://github.com/Azure/caf-terraform-landingzones/pull/448