-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/aws_cloudformation_stack_set_instance: add support for additional deployment_targets config and refactor update deployment_targets config #37898
Conversation
…eployment_targets parameter, it will be recreated.
…into f-cfn-stacksetinstance-update-deployment-targets
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @yhamano0312 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/cloudformation/... -v -count 1 -parallel 20 -run=TestAccCloudFormationStackSetInstance_ -timeout 360m
=== RUN TestAccCloudFormationStackSetInstance_basic
=== PAUSE TestAccCloudFormationStackSetInstance_basic
=== RUN TestAccCloudFormationStackSetInstance_disappears
=== PAUSE TestAccCloudFormationStackSetInstance_disappears
=== RUN TestAccCloudFormationStackSetInstance_Disappears_stackSet
=== PAUSE TestAccCloudFormationStackSetInstance_Disappears_stackSet
=== RUN TestAccCloudFormationStackSetInstance_parameterOverrides
=== PAUSE TestAccCloudFormationStackSetInstance_parameterOverrides
=== RUN TestAccCloudFormationStackSetInstance_deploymentTargets
=== PAUSE TestAccCloudFormationStackSetInstance_deploymentTargets
=== RUN TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU
=== PAUSE TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU
=== RUN TestAccCloudFormationStackSetInstance_operationPreferences
=== PAUSE TestAccCloudFormationStackSetInstance_operationPreferences
=== RUN TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== PAUSE TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== CONT TestAccCloudFormationStackSetInstance_basic
=== CONT TestAccCloudFormationStackSetInstance_deploymentTargets
=== CONT TestAccCloudFormationStackSetInstance_operationPreferences
=== CONT TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== CONT TestAccCloudFormationStackSetInstance_Disappears_stackSet
=== CONT TestAccCloudFormationStackSetInstance_parameterOverrides
=== CONT TestAccCloudFormationStackSetInstance_disappears
=== CONT TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU
=== NAME TestAccCloudFormationStackSetInstance_delegatedAdministrator
stack_set_instance_test.go:339: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
--- SKIP: TestAccCloudFormationStackSetInstance_delegatedAdministrator (0.87s)
--- PASS: TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU (67.07s)
--- PASS: TestAccCloudFormationStackSetInstance_Disappears_stackSet (75.47s)
--- PASS: TestAccCloudFormationStackSetInstance_basic (77.58s)
--- PASS: TestAccCloudFormationStackSetInstance_disappears (83.23s)
--- PASS: TestAccCloudFormationStackSetInstance_operationPreferences (86.42s)
--- PASS: TestAccCloudFormationStackSetInstance_deploymentTargets (88.72s)
--- PASS: TestAccCloudFormationStackSetInstance_parameterOverrides (137.24s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudformation 142.812s
Thank you for your contribution! |
This functionality has been released in v5.58.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
resource/aws_cloudformation_stack_set_instance: Extend
deployment_targets
argument. Adding new argument foraccount_filter_type
,accounts
, andaccounts_url
.ref: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudformation/types#DeploymentTargets
Additionally, fixing a bug that prevents updating the instance when the
deployment_targets
argument is updated. The original code executes theupdate-stack-instances
API when changes are made to thedeployment_targets
argument. However, this API does not support updates todeployment_targets
. Therefore, if there are updates todeployment_targets
, the resource will be recreated. In PR #24523, theForceNew
difference was added to thedeployment_targets
argument, but it was necessary to addForceNew
to the arguments included in the deployment_targets setting in order to recreate.Relations
Closes #27877
Closes #33785
Closes #25253
Closes #33914
Relates #26935
Relates #24523
References
Output from Acceptance Testing