-
Notifications
You must be signed in to change notification settings - Fork 9.9k
[Bug fix] fix expanding process for operation_preferences.region_order in CloudFormation StackSet #41810
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
Open
tabito-hara
wants to merge
7
commits into
hashicorp:main
Choose a base branch
from
tabito-hara:b-aws_cloudformation_stack_set_instance-fix-region_order
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
|
Is there any chance of getting this merged anytime soon? The bug hits us hard, currently. |
489b58f to
9087496
Compare
Contributor
Author
|
Rebase on the latest branch and refactored codes and changelog. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Addresses a defect in current functionality.
service/cloudformation
Issues and PRs that pertain to the cloudformation service.
size/L
Managed by automation to categorize the size of a PR.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To resolve the issue reported by [Enhancement]: aws_cloudformation_stack_set_instance #41767.
fix a process of expanding (i.e. deserializing from terraform configuration) "region_order" in operation_preferences used in
aws_cloudformation_stack_set,aws_cloudformation_stack_instancesandaws_cloudformation_stack_set_instance.tabito-hara@bff75ff
The original one:
It has been modified as:
Add acctests for the
region_orderattribute.region_orderare correctly implemented. (Even without the modifications in this branch, the acctests still pass.) However, these tests help observe changes in behavior, such as modifications to the request body of actions.operational_preferencesblock (which includesregion_order) is not refreshed during Terraform's read process; it exists solely as an internal attribute within Terraform.region_orderis correctly retained in the Terraform state (tfstate), not that the resource is created according to the configuration specified in theoperation_preferenceblock.DescribeStackSetOperationreturns attributes inoperational_preferences, but only during operations. This action describes the operational configuration of a specific operation, requiring anoperationIdto request it.region_orderis effective only whenauto_deploymentis set tofalse. In tests related toregion_order,auto_deploymentis explicitly set tofalse.Verification
The following acctests were conducted with TF_LOG=DEBUG environment variables.
CreateStackInstancesin TestAccCloudFormationStackSetInstance_regionOrder is as follows:You do not find "OperationPreferences.RegionOrder" in the request parameters.
And the response of
DescribeStackSetOperation, called to check progress in the test, includes empty RegionOrder as follows:RegionOrderis empty.On the other hand, with the modification of this branch, "OperationPreferences.RegionOrder" is included in the request body of
CreateStackInstances:the response of
DescribeStackSetOperationshowsRegionOrdersas expected.You can find the same result in running
TestAccCloudFormationStackInstances_regionOrder.Relations
Closes #41767
References
Cloudformation API Reference -- StackSetOperationPreferences
Output from Acceptance Testing
CloudFormationStackSet
CloudFormationStackInstances
CloudFormationStackSetInstance