-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CloudFormation StackSet fails when no accounts are in target OU #23349
Comments
This is an issue on Terraform v1.1.7 and provide 4.5.0 as well. `Terraform v1.1.7
|
I believe I'm seeing this same issue but I get a different error message. I'm also trying to deploy a bunch of stack set instances and the only ones that are failing are ones with no accounts in the OU:
|
After digging into it, I think my issue relates to this part of the code: terraform-provider-aws/internal/service/cloudformation/stack_set_instance.go Lines 269 to 281 in 1fcfa97
There's a lot of odd things going on in there. I understand that the deployment_targets stack instances aren't a traditional AWS resource you lookup, so there's some pivot to an account to get additional attributes (like
I feel like the correct thing is to not at all lookup accounts when deployment_targets are used and to leave attributes like stack_id and account_id empty. |
Produced the same issue with a different scenario:
Because the StackSet and StackSet instances are already in the TF state, terraform is expecting the StackSet to exist so that it can remove the StackSet instance and re-create it but it's already hitting that error in the destroy step Expected behaviour: |
Hi, Any update on this request. |
This functionality has been released in v5.9.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 issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
terraform -v
Terraform v1.0.11
on darwin_amd64
Your version of Terraform is out of date! The latest version
is 1.1.6. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
aws_cloudformation_stack_set_instance
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_set_instance
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
│ Error: unexpected format for ID (Test,,us-west-2), expected STACKSETNAME,ACCOUNDID,REGION
Panic Output
Expected Behavior
StackSet should be created.
Actual Behavior
StackSet is not created. Terraform State becomes corrupted.
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: