forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nas.yml
129 lines (129 loc) · 2.83 KB
/
nas.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建NAS文件系统、访问组、访问规则及挂载目标,配置协议、存储类型、权限及网络设置。
en: Create NAS file systems, access groups, access rules, and mount targets, configure
protocols, storage types, permissions, and network settings.
Parameters:
Description:
Type: String
Description: File system description.
Default: mytest
ProtocolType:
Type: String
Description: Type of protocol used.
Default: NFS
AllowedValues:
- NFS
- SMB
StorageType:
Type: String
Description: The file system type.
Default: Capacity
AllowedValues:
- Performance
- Capacity
AccessGroupName:
Type: String
Default: mytest
VSwitchId:
Type: String
VpcId:
Type: String
Priority:
Type: Number
Description: 'Allowed Values: 1~100'
Default: 1
MinValue: 1
MaxValue: 100
UserAccessType:
Type: String
Default: no_squash
AllowedValues:
- no_squash
- root_squash
- all_squash
SourceCidrIp:
Type: String
Description: Address or address segment
Default: 0.0.0.0/0
RWAccessType:
Type: String
Description: 'Read-write permission type: RDWR (default), RDONLY'
Default: RDWR
AllowedValues:
- RDWR
- RDONLY
Resources:
FileSystem:
Type: ALIYUN::NAS::FileSystem
Properties:
ProtocolType:
Ref: ProtocolType
StorageType:
Ref: StorageType
Description:
Ref: Description
AccessGroup:
Type: ALIYUN::NAS::AccessGroup
Properties:
AccessGroupType: Vpc
AccessGroupName:
Ref: AccessGroupName
AccessRule:
Type: ALIYUN::NAS::AccessRule
Properties:
Priority:
Ref: Priority
UserAccessType:
Ref: UserAccessType
AccessGroupName:
Fn::GetAtt:
- AccessGroup
- AccessGroupName
SourceCidrIp:
Ref: SourceCidrIp
RWAccessType:
Ref: RWAccessType
DependsOn: AccessGroup
MountTarget:
Type: ALIYUN::NAS::MountTarget
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
FileSystemId:
Fn::GetAtt:
- FileSystem
- FileSystemId
NetworkType: Vpc
AccessGroupName:
Fn::GetAtt:
- AccessGroup
- AccessGroupName
DependsOn:
- AccessRule
- FileSystem
Outputs:
FileSystemId:
Description: ID of the file system created
Value:
Fn::GetAtt:
- FileSystem
- FileSystemId
AccessGroupName:
Description: Permission group name
Value:
Fn::GetAtt:
- AccessGroup
- AccessGroupName
AccessRuleId:
Value:
Fn::GetAtt:
- AccessRule
- AccessRuleId
MountTargetDomain:
Value:
Fn::GetAtt:
- MountTarget
- MountTargetDomain