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

S3BackendPlugin - allow multiple ways to configure #115

Closed
kmanning opened this issue Sep 3, 2019 · 1 comment
Closed

S3BackendPlugin - allow multiple ways to configure #115

kmanning opened this issue Sep 3, 2019 · 1 comment

Comments

@kmanning
Copy link
Collaborator

kmanning commented Sep 3, 2019

  • S3 Bucket
    • Check for a S3_BUCKET first, if found, use
    • If not found, check for a <ENV>_S3_BUCKET, if found, use
    • if nothing found, do not set backend variable
  • Region
    • Check S3_BACKEND_REGION first, if found use,
    • If not found, check for <ENV>_S3_BACKEND_REGION, if found, use
    • If nothing found, do not set backend variable (this should default to AWS_REGION and AWS_DEFAULT_REGION in terraform)
    • Also continue to support DEFAULT_AWS_REGION for backwards compatibility, but deprecate this. This is non-standard.
  • Key
    • Allow user to customize
    • If not customized, use the current default terraform/${repoSlug}/${environment}
@kmanning
Copy link
Collaborator Author

kmanning commented Sep 3, 2019

This requires a fundamental change to plugin behavior. Prior to the code written for this Issue, once a command was instantiated, new plugins did not take effect.

To enable standard behavior of plugins and the various environment variable hierarchy, we need to delay when plugins are applied to TerraformCommands. In doing so, we inadvertently alter the behavior of plugins - plugins that are added AFTER a TerraformCommand is instantiated still take effect.

@kmanning kmanning closed this as completed Sep 3, 2019
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

No branches or pull requests

1 participant