我正在尝试通过指定ou将实例添加到StackSet。使用控制台可以做到这一点,但似乎找不到使用cli的方法。当我使用ou码时出现错误:
aws cloudformation create-stack-instances --stack-set-name test-stack --accounts "ou-1234-asdfsfsdf" --regions '["eu-west-1"]' --operation-preferences FailureToleranceCount=0,MaxConcurrentCount=1
An error occurred (ValidationError) when calling the CreateStackInstances operation: 1 validation error detected: Value '[ou-1234-asdfsfsdf]' at 'accounts' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy regular expression pattern: [0-9]{12}]
答案 0 :(得分:0)
使用 --deployment-targets OrganizationalUnitIds=string
结构而不是在帐户中指定 OU
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/create-stack-instances.html