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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add use_previous_values field to aws_cloudformation_stack #11154

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add use_previous_values field to aws_cloudformation_stack #11154

wants to merge 4 commits into from

Conversation

marcinwyszynski
Copy link
Contributor

By explicitly asking Terraform to use previous values for CloudFormation templates, we can prevent situations where upon changing the template code Terraform would wipe out external changes made to the CF stack. This is subtly different from Terraform's semantics of ignoring changes, so requires a separate and more delicate approach.

Community Note

  • Please vote on this pull request by adding a 馃憤 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #307

Release note for CHANGELOG:

Added `use_previous_values` field to `aws_cloudformation_stack` to explicitly tell CloudFormation to not change parameter values on stack update.

@marcinwyszynski marcinwyszynski requested a review from a team December 5, 2019 09:17
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/cloudformation Issues and PRs that pertain to the cloudformation service. labels Dec 5, 2019
@ghost ghost added size/S Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Dec 5, 2019
@marcinwyszynski
Copy link
Contributor Author

My sincere apologies for the lack of tests, but what's going on in here is kinda invisible to Terraform and only makes sense to CloudFormation. I suppose one could unit-test the bit of reconciling parameters with use_previous_values and check if the resulting input.Parameters is consistent with what's expected. On the other hand, this style of testing isn't what you're guys doing in the repo.

If there's anything I can help with regards to testing this change, please kindly give me a hint how you'd like to go about it.

Base automatically changed from master to main January 23, 2021 00:56
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:56
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 6, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@Vishal-Shunyeka
Copy link

Any Updates on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/cloudformation Issues and PRs that pertain to the cloudformation service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Use previous value" functionality to AWS_CLOUDFORMATION_STACK resource parameters
4 participants