forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
user.yml
84 lines (84 loc) · 1.83 KB
/
user.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ROSTemplateFormatVersion: '2015-09-01'
Description: RAM User/Group/AttachPolicyToUser/UserToGroupAddition resource example
Parameters:
UserName:
Type: String
Description: The maximum length is 64 characters, English letters, numbers, .,
_ or - are allowed.
GroupName:
Type: String
Description: The maximum length is 64 characters, English letters, numbers, .,
_ or - are allowed.
Resources:
User:
Type: ALIYUN::RAM::User
Properties:
UserName:
Ref: UserName
Group:
Type: ALIYUN::RAM::Group
Properties:
GroupName:
Ref: GroupName
Comments: test group
Policies:
- PolicyName:
Fn::Sub: GroupPolicy-${ALIYUN::StackId}
PolicyDocument:
Version: '1'
Statement:
- Action:
- oss:Get*
Resource:
- '*'
Effect: Allow
AttachPolicyToUser:
Type: ALIYUN::RAM::AttachPolicyToUser
Properties:
PolicyType: System
UserName:
Fn::GetAtt:
- User
- UserName
PolicyName: AliyunECSReadOnlyAccess
UserToGroupAddition:
Type: ALIYUN::RAM::UserToGroupAddition
Properties:
GroupName:
Fn::GetAtt:
- Group
- GroupName
Users:
- Fn::GetAtt:
- User
- UserName
Outputs:
GroupName:
Value:
Fn::GetAtt:
- Group
- GroupName
UserName:
Description: Name of ram user.
Value:
Fn::GetAtt:
- User
- UserName
CreateDate:
Description: Create date of ram user.
Value:
Fn::GetAtt:
- User
- CreateDate
UserId:
Description: Id of ram user.
Value:
Fn::GetAtt:
- User
- UserId
LastLoginDate:
Description: Last login date of ram user.
Value:
Fn::GetAtt:
- User
- LastLoginDate