-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cannot create stackset with an account filter type INTERSECTION #286
Comments
I am looking for same feature |
This would be a great feature enhancement. ServiceManaged stack sets require you add an OU. When trying to deploy using StackSetTarget.from_accounts, this fails when the DeploymentType is service_managed. You get this error: Resource handler returned message: "Invalid request provided: OrganizationalUnitIds should be specified in SERVICE_MANAGED mode" It seems that StackSetTarget.from_organizational_units already supports: additional_accounts (filter type = Union) It just does not support only_these_accounts (filter type = Intersection) |
I desperately need this. In the meantime, does anyone have a workaround for modifying the underlying L1 CfnStackSet construct to modify the AccountFilterType to "INTERSECTION"? I tried, in Python, with cfn_stack_set = stack_set.node.default_child
cfn_stack_set.stack_instances_group[1].deployment_targets.account_filter_type = "INTERSECTION"
# [1] because it's my second Stack Instances Group that I want to modify based on the escape-hatch method described here: https://docs.aws.amazon.com/cdk/v2/guide/cfn_layer.html#cfn_layer_resource but I got:
print(cfn_stack_set.stack_instances_group)
print(dir(cfn_stack_set.stack_instances_group)) gives
Does anyone know how I can edit the L1 CfnStackSet as a workaround for not currently being able to set an AccountFilterType of INTERSECTION for a service-managed stack with this construct? |
I can do this in TypeScript by doing:
|
I want to deploy a StackSet to an OU, but I only want to deploy it to a sub-set of accounts in the same OU. In CloudFormation I would use the AccountFilterType: INTERSECTION (StackSets deploys to the accounts specified in Accounts parameter). However I cannot generate this code with the L2 StackSet Construct.
The text was updated successfully, but these errors were encountered: