[Bug]: Issue with multiple aws_cloudformation_stack_instances resources on the same aws_cloudformation_stack_set, but with different regions or OUs #40243
Labels
bug
Addresses a defect in current functionality.
needs-triage
Waiting for first response or review from a maintainer.
service/cloudformation
Issues and PRs that pertain to the cloudformation service.
Terraform Core Version
1.9.8
AWS Provider Version
5.76.0
Affected Resource(s)
Expected Behavior
When deploying multiple
aws_cloudformation_stack_instances
resources that point to the sameaws_cloudformation_stack_set
, but have a different value for the parameterregions
ororganizational_unit_ids
, I would expect the resources to only require an update if the value changes, not on eachterraform plan/apply
Use case is to deploy a Cloud Formation StackSet to only 1 region for certain accounts, but to multiple regions for other accounts.
Or to deploy a StackSet to all accounts in 1 OU, and only to a limited set of accounts in another OU.
It's not clear to me whether this is a bug, a limitations from AWS or a misunderstand from my side.
Actual Behavior
Initially the resources are created correctly. But on every
terraform plan/apply
it marks theregions
ororganizational_unit_ids
parameters as being modified, requiring an update of the resource.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Example 1: multiple
aws_cloudformation_stack_instances
resources, but for different regions.Example 2: multiple
aws_cloudformation_stack_instances
resources, but for different OUs.Steps to Reproduce
terraform apply
terraform apply
again, updates are needed to resourcesDebug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: