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

r/aws_cloudformation_stack_set_instance: Resource deletion respects operation_preferences #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theipster
Copy link
Owner

@theipster theipster commented Aug 18, 2024

Description

During resource deletion (resourceStackSetInstanceDelete()), the configuration's operation_preferences should be passed to the DeleteStackInstances API operation, e.g. targets should be deleted according to any specified concurrency limits.

Relations

Closes hashicorp#38881

References

Output from Acceptance Testing

Using delegated-admin account:

$ TF_ACC=1 go test ./internal/service/cloudformation/... -v -count 1 -parallel 1 -run='TestAccCloudFormationStackSetInstance_'
=== 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_concurrencyMode
=== PAUSE TestAccCloudFormationStackSetInstance_concurrencyMode
=== RUN   TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== PAUSE TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== CONT  TestAccCloudFormationStackSetInstance_basic
--- PASS: TestAccCloudFormationStackSetInstance_basic (84.35s)
=== CONT  TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU
    stack_set_instance_test.go:258: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU (1.46s)
=== CONT  TestAccCloudFormationStackSetInstance_delegatedAdministrator
    stack_set_instance_test.go:377: skipping tests; missing IAM service-linked role /aws-service-role/member.org.stacksets.cloudformation.amazonaws.com. Please create the role and retry
--- SKIP: TestAccCloudFormationStackSetInstance_delegatedAdministrator (0.94s)
=== CONT  TestAccCloudFormationStackSetInstance_concurrencyMode
    stack_set_instance_test.go:339: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccCloudFormationStackSetInstance_concurrencyMode (2.48s)
=== CONT  TestAccCloudFormationStackSetInstance_operationPreferences
    stack_set_instance_test.go:304: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccCloudFormationStackSetInstance_operationPreferences (2.15s)
=== CONT  TestAccCloudFormationStackSetInstance_parameterOverrides
--- PASS: TestAccCloudFormationStackSetInstance_parameterOverrides (151.17s)
=== CONT  TestAccCloudFormationStackSetInstance_deploymentTargets
    stack_set_instance_test.go:209: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccCloudFormationStackSetInstance_deploymentTargets (1.45s)
=== CONT  TestAccCloudFormationStackSetInstance_Disappears_stackSet
--- PASS: TestAccCloudFormationStackSetInstance_Disappears_stackSet (76.62s)
=== CONT  TestAccCloudFormationStackSetInstance_disappears
--- PASS: TestAccCloudFormationStackSetInstance_disappears (81.67s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudformation     402.463s

Using org management account:

$ TF_ACC=1 go test ./internal/service/cloudformation/... -v -count 1 -parallel 1 -run='TestAccCloudFormationStackSetInstance_'
=== 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_concurrencyMode
=== PAUSE TestAccCloudFormationStackSetInstance_concurrencyMode
=== RUN   TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== PAUSE TestAccCloudFormationStackSetInstance_delegatedAdministrator
=== CONT  TestAccCloudFormationStackSetInstance_basic
--- PASS: TestAccCloudFormationStackSetInstance_basic (83.53s)
=== CONT  TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU
--- PASS: TestAccCloudFormationStackSetInstance_DeploymentTargets_emptyOU (73.29s)
=== CONT  TestAccCloudFormationStackSetInstance_delegatedAdministrator
    stack_set_instance_test.go:376: this AWS account must not be the management account of an AWS Organization
--- SKIP: TestAccCloudFormationStackSetInstance_delegatedAdministrator (1.35s)
=== CONT  TestAccCloudFormationStackSetInstance_concurrencyMode
--- PASS: TestAccCloudFormationStackSetInstance_concurrencyMode (92.27s)
=== CONT  TestAccCloudFormationStackSetInstance_operationPreferences
--- PASS: TestAccCloudFormationStackSetInstance_operationPreferences (99.72s)
=== CONT  TestAccCloudFormationStackSetInstance_parameterOverrides
--- PASS: TestAccCloudFormationStackSetInstance_parameterOverrides (148.12s)
=== CONT  TestAccCloudFormationStackSetInstance_deploymentTargets
--- PASS: TestAccCloudFormationStackSetInstance_deploymentTargets (89.09s)
=== CONT  TestAccCloudFormationStackSetInstance_Disappears_stackSet
=== CONT  TestAccCloudFormationStackSetInstance_disappears
--- PASS: TestAccCloudFormationStackSetInstance_Disappears_stackSet (77.51s)
--- PASS: TestAccCloudFormationStackSetInstance_disappears (82.89s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudformation     747.916s

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

Successfully merging this pull request may close these issues.

[Bug]: r/aws_cloudformation_stack_set_instance: Resource deletion ignores operation_preferences
1 participant