- 최신
- 최다 투표
- 가장 많은 댓글
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 공식업데이트됨 일 년 전