You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating this issue to a documentation issue and will open a PR Soon ™️ with updates to the relevant sections of README.md. Essentially we should just document that plugins are initialized in an "inside out" order where the last plugin initialized will have it's decorations wrapping all other plugin decorations. Specifically we should call out that TerraformEnvironmentStage.withGlobalEnv(String, String) should be the last thing you do so that your environment variables are available to all other variables.
This will result in withAWS being skipped due to the withEnv from the EnvironmentVariablePlugin's decorations being after withGlobalEnv.
Workarounds are to directly manipulate env at the top of your file:
env.PERF_AWS_ROLE_ARN= env.PROD_AWS_ROLE_ARN
I'm not sure if we should fix this or just update documentation on the withAWS plugin page.
The text was updated successfully, but these errors were encountered:
dkolb
changed the title
WithAwsPlugin Decorations Apply Before Global Environments
WithAwsPlugin Decorations Apply Before EnvironmentVariablePlugin (via withGlobalEnv(String, String))
Mar 25, 2020
dkolb
changed the title
WithAwsPlugin Decorations Apply Before EnvironmentVariablePlugin (via withGlobalEnv(String, String))
WithAwsPlugin Decorations Apply Before EnvironmentVariablePlugin
Mar 25, 2020
dkolb
changed the title
WithAwsPlugin Decorations Apply Before EnvironmentVariablePlugin
Plugin Initialization Order Effects are Uncodumented
May 9, 2020
So it dawned on me - EnvironmentVariablePlugin came later, and was never documented. I'm gonna add EnvironmentVariablePlugin to the list of plugins, then use it to describe exactly what you did above. Then the example that you're describing will use 2 plugins, and can be used to illustrate the importance of order when initializing plugins. PR on the way.
Update
Updating this issue to a documentation issue and will open a PR Soon ™️ with updates to the relevant sections of README.md. Essentially we should just document that plugins are initialized in an "inside out" order where the last plugin initialized will have it's decorations wrapping all other plugin decorations. Specifically we should call out that
TerraformEnvironmentStage.withGlobalEnv(String, String)
should be the last thing you do so that your environment variables are available to all other variables.Original Issue
This will result in withAWS being skipped due to the withEnv from the EnvironmentVariablePlugin's decorations being after withGlobalEnv.
Workarounds are to directly manipulate
env
at the top of your file:I'm not sure if we should fix this or just update documentation on the withAWS plugin page.
The text was updated successfully, but these errors were encountered: