-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfn-controltower-cross-account-trust.yaml
38 lines (35 loc) · 1.11 KB
/
cfn-controltower-cross-account-trust.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
AWSTemplateFormatVersion: "2010-09-09"
Description: This template creates an IAM role with administrator access and a trust relationship for Control Tower.
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: "Management Account Trust"
Parameters:
- pManagementAccountId
ParameterLabels:
pManagementAccountId: Management Account ID
Parameters:
pManagementAccountId:
Type: String
Description: Management account id which AWS Control Tower is deployed in
Resources:
rControlTowerRole:
Type: AWS::IAM::Role
Properties:
Path: /
RoleName: AWSControlTowerExecution
ManagedPolicyArns:
- !Sub arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
AWS: !Sub arn:${AWS::Partition}:iam::${pManagementAccountId}:root
Outputs:
CrossAccountRoleArn:
Description: Cross Account Role for ControlTower
Value: !GetAtt rControlTowerRole.Arn