During resource creation (resourceStackSetInstanceCreate()), the configuration's operation_preferences should be passed to the CreateStackInstances API operation, e.g. targets should be created according to any specified concurrency limits.
During resource update (resourceStackSetInstanceUpdate()), the configuration's operation_preferences should be passed to the UpdateStackInstances API operation, e.g. targets should be updated according to any specified concurrency limits.
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.
Actual Behavior
[EXPECTED] During resource creation (resourceStackSetInstanceCreate()), the configuration's operation_preferences are passed to the CreateStackInstances API operation, e.g. targets are created according to any specified concurrency limits.
[EXPECTED] During resource update (resourceStackSetInstanceUpdate()), the configuration's operation_preferences are passed to the UpdateStackInstances API operation, e.g. targets are updated according to any specified concurrency limits.
[UNEXPECTED] During resource deletion (resourceStackSetInstanceDelete()), the configuration's operation_preferences are not passed to the DeleteStackInstances API operation, e.g. targets are not deleted according to any specified concurrency limits, instead they are always deleted sequentially (the default MaxConcurrentCount value of 1).
terraform apply -auto-approve (quick, because concurrency is configured to 100%)
terraform destroy -auto-approve (slow, because concurrency is the default value of 1)
Alternatively, this can be reproduced using terraform test as appropriate.
Debug Output
No response
Panic Output
No response
Important Factoids
Just a thought: theoretically, there could be a scenario where separate operation_preferences configurations are required between each of the resource create/update/delete operations, e.g. have separate create_operation_preferences, update_operation_preferences and delete_operation_preferences. However, this is probably a rare scenario and the additional implementation complexity would be overkill.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.9.4
AWS Provider Version
5.62.0
Affected Resource(s)
aws_cloudformation_stack_set_instance
Expected Behavior
resourceStackSetInstanceCreate()
), the configuration'soperation_preferences
should be passed to theCreateStackInstances
API operation, e.g. targets should be created according to any specified concurrency limits.resourceStackSetInstanceUpdate()
), the configuration'soperation_preferences
should be passed to theUpdateStackInstances
API operation, e.g. targets should be updated according to any specified concurrency limits.resourceStackSetInstanceDelete()
), the configuration'soperation_preferences
should be passed to theDeleteStackInstances
API operation, e.g. targets should be deleted according to any specified concurrency limits.Actual Behavior
resourceStackSetInstanceCreate()
), the configuration'soperation_preferences
are passed to theCreateStackInstances
API operation, e.g. targets are created according to any specified concurrency limits.resourceStackSetInstanceUpdate()
), the configuration'soperation_preferences
are passed to theUpdateStackInstances
API operation, e.g. targets are updated according to any specified concurrency limits.resourceStackSetInstanceDelete()
), the configuration'soperation_preferences
are not passed to theDeleteStackInstances
API operation, e.g. targets are not deleted according to any specified concurrency limits, instead they are always deleted sequentially (the defaultMaxConcurrentCount
value of1
).Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
terraform apply -auto-approve
(quick, because concurrency is configured to 100%)terraform destroy -auto-approve
(slow, because concurrency is the default value of 1)Alternatively, this can be reproduced using
terraform test
as appropriate.Debug Output
No response
Panic Output
No response
Important Factoids
Just a thought: theoretically, there could be a scenario where separate
operation_preferences
configurations are required between each of the resource create/update/delete operations, e.g. have separatecreate_operation_preferences
,update_operation_preferences
anddelete_operation_preferences
. However, this is probably a rare scenario and the additional implementation complexity would be overkill.References
resourceStackSetInstanceDelete()
: https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/cloudformation/stack_set_instance.go#L444C6-L444C36Would you like to implement a fix?
Yes