AWSTemplateFormatVersion: 2010-09-09
Description: Configure the AWSCloudFormationStackSetExecutionRole to enable use of your account as a target account in AWS CloudFormation StackSets.
Parameters:
AdministratorAccountId:
Type: String
Description: AWS Account Id of the administrator account (the account in which StackSets will be created).
MaxLength: 12
MinLength: 12
Resources:
ExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName: AWSCloudFormationStackSetExecutionRole
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
AWS:
- !Ref AdministratorAccountId
Action:
- sts:AssumeRole
Path: /
ManagedPolicyArns:
- !Sub arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess
パラメータのAdministratorAccountId は、自分のアカウント番号を記載します。
その他の設定は、特に変更しません。
「送信」を押し、IAM ロールのリソースが作成されたことを確認します。
IAM から2つのIAM ロールが作成されたことを確認します。
StackSet を作成する
左ペインから「StackSets」を選択します。
「StackSet の作成」を押します。
アクセス許可に先ほど作成したIAM ロールを選択します。
IAM 管理ロール: AWSCloudFormationStackSetAdministrationRole