forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliyun-ros-stack-group-administration-role.yml
53 lines (53 loc) · 1.62 KB
/
aliyun-ros-stack-group-administration-role.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建角色AliyunROSStackGroupAdministrationRole,授权ROS管理资源栈组,支持跨账户角色扮演。
en: Create a role named AliyunROSStackGroupAdministrationRole, which authorizes
Resource Orchestration Service (ROS) to manage stack groups and facilitates cross-account
role assumption.
Parameters:
AdministrationRoleName:
Type: String
Description:
en: Role name of administration account
zh-cn: 创建授权给管理员账号的角色的名称
Default: AliyunROSStackGroupAdministrationRole
ExecutionRoleName:
Type: String
Description:
en: Execution role name of target account
zh-cn: 目标账号执行角色名称
Default: AliyunROSStackGroupExecutionRole
Resources:
AliyunROSStackGroupAdministrationRole:
Type: ALIYUN::RAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service:
- ros.aliyuncs.com
Version: 1
Policies:
- PolicyDocument:
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Resource:
- Fn::Sub: acs:ram::*:role/${ExecutionRoleName}
Version: '1'
PolicyName:
Fn::Sub:
- AssumeRole-${ExecutionRoleName}
- ExecutionRoleName:
Ref: ExecutionRoleName
RoleName:
Ref: AdministrationRoleName
Outputs:
AdministrationRoleName:
Value:
Fn::GetAtt:
- AliyunROSStackGroupAdministrationRole
- RoleName