Include Organizational unit IDs in cloudformation describe-stack-set #8248
Labels
cloudformation
feature-request
A feature should be added or improved.
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Describe the feature
The output of the
describe-stack-set
could include a list of OU IDs used as deployment targets.Use Case
I'm trying to automate the deletion of temporary (dev) stack set instances and stack sets deployed with SERVICE_MANAGED permissions in an AWS Organizations.
My initial approach was to specify
--deployment-targets
withAccounts:${account_ids}
like thisbut this throws the following error:
An error occurred (ValidationError) when calling the DeleteStackInstances operation: StackSets with SERVICE_MANAGED permission model can only have OrganizationalUnit as target
From the error message, I understood that the only way to delete stack instances deployed with SERVICE_MANAGED model is to specify OU IDs. With the
--deployment-targets OrganizationalUnitIds=${ou_ids}
, one must use the exact OU IDs used as deployment targets (instead of e.g., simply specifying the root OU ID).It would be very helpful to get the list of OUs used as deployment targets in the output of the
describe-stack-set
command.Proposed Solution
Other Information
No response
Acknowledgements
CLI version used
aws-cli/2.13.5
Environment details (OS name and version, etc.)
Ubuntu 20, Python 3.11
The text was updated successfully, but these errors were encountered: