Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

[bug] global_settings order of preference. #403

Open
nusrath432 opened this issue Jul 25, 2022 · 2 comments
Open

[bug] global_settings order of preference. #403

nusrath432 opened this issue Jul 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nusrath432
Copy link

nusrath432 commented Jul 25, 2022

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] #448

@nusrath432
Copy link
Author

nusrath432 commented Aug 1, 2022

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

@nusrath432
Copy link
Author

nusrath432 commented Sep 15, 2022

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant