- 新しい順
- 投票が多い順
- コメントが多い順
Hi there,
Hope you are doing well!
If the key concern is to make sure the Stack Instance[1] of your stackset, basically the individual stack managed by the stackset, can create resources with value based on which account the stack isntance was CURRENTLY deployed into, there is a straight forward feature Pseudo parameters reference AWS::AccountId you can leverage.
For instance, in the template, you can simply assign current account ID value with !Ref intrinsic function[3]:
JSON: "ExternalID" : { "Ref" : "AWS::AccountId" }
YAML: ExternalID: Ref: AWS::AccountId
In this approach, no SSM parameters and Dynamic References need to be involved.
Regards.
References: [1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stacksets-concepts-stackinstances [2] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid
関連するコンテンツ
- AWS公式更新しました 1年前