Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enabled in all modules #15

Merged
merged 2 commits into from
Feb 28, 2021
Merged

Use enabled in all modules #15

merged 2 commits into from
Feb 28, 2021

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Feb 28, 2021

what

  • Use enabled in all modules

why

  • Respect the enabled flag to enable/disable all sub-modules
  • remote-state throws errors when enabled=false and it tries to load YAML config files

inventory of problems (internal notes)

  • in 0.10.0, if you set enabled=false, then the backend module will not get the environment or stage, so it won't find the right stack and will error that i cannot find the stack. So in 0.11.0 we now set count=0 when enabled=false on data resources. This would happen during a terraform apply when enabled=false for some module that depended on remote-state and/or backend, because count was not respected.

  • 0.11.0 we have counts on the data sources, but this is now causing the "count of cannot be computed" type of problems anywhere we use the output of the remote state as an input put to another module that performs a count on that input (nested counts). Historically, counts on data sources has been problematic.

components need to work with remote state all returning null (which most of them don't), or disabling them does not remove the requirement that the remote state exists.

@aknysh aknysh requested review from osterman and Nuru February 28, 2021 06:49
@aknysh aknysh self-assigned this Feb 28, 2021
@aknysh aknysh requested review from a team as code owners February 28, 2021 06:49
@aknysh aknysh requested a review from nitrocode February 28, 2021 06:49
@aknysh
Copy link
Member Author

aknysh commented Feb 28, 2021

/test all

@aknysh
Copy link
Member Author

aknysh commented Feb 28, 2021

/test terratest

@aknysh aknysh merged commit 6f49432 into main Feb 28, 2021
@aknysh aknysh deleted the use-enabled-for-remote-state branch February 28, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants