-
Notifications
You must be signed in to change notification settings - Fork 35
/
domain-config.yml
81 lines (81 loc) · 2.33 KB
/
domain-config.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建WAF域配置,访问控制规则及开关,支持协议选择,自定义规则,获取协议类型与CNAME。
en: Create WAF domain configurations, access control rules and switches, facilitate
protocol selection, enable custom rule creation, and acquire protocol types along
with CNAME records.
Parameters:
Domain:
Type: String
Description: Domain name.
InstanceId:
Type: String
Description: WAF instance ID. Description Interface You can view your current
WAF instance ID by calling DescribePayInfo.
Protocols:
Type: String
Description: 'The domain supports access protocols, values: http: expressed support
for the HTTP protocol. https: support for HTTPS protocol. http, https: supports
HTTP, HTTPS protocol.'
Default: http
ServiceOn:
Type: Number
Default: 1
Region:
Type: String
Default: cn
Rules:
Type: String
Default: '{"conditions":[{"key":"URL","contain":1,"value":"asfas"}],"continueComponent":{"post_action_cc":1,"post_action_waf":1,"post_action_sa":1,"post_action_block_geo":"0","post_action_data_risk_control":"1"},"action":"1","name":"test"}'
Resources:
DomainConfig:
Type: ALIYUN::WAF::DomainConfig
Properties:
InstanceId:
Ref: InstanceId
Domain:
Ref: Domain
SourceIps: '["1.1.1.1"]'
HttpPort: '["80"]'
IsAccessProduct: 0
Protocols:
Ref: Protocols
WafSwitch:
Type: ALIYUN::WAF::WafSwitch
Properties:
InstanceId:
Ref: InstanceId
Domain:
Ref: Domain
ServiceOn:
Ref: ServiceOn
Region:
Ref: Region
DependsOn: DomainConfig
AclRule:
Type: ALIYUN::WAF::AclRule
Properties:
InstanceId:
Ref: InstanceId
Rules:
Ref: Rules
Domain:
Ref: Domain
Region:
Ref: Region
DependsOn: WafSwitch
Outputs:
ProtocolType:
Description: 'agreement type:0: indicates that the HTTP protocol is supported.1:
indicates that the HTTPS protocol is supported.2: indicates that both HTTP and
HTTPS protocols are supported.'
Value:
Fn::GetAtt:
- DomainConfig
- ProtocolType
Cname:
Description: CNAME assigned by WAF instance.
Value:
Fn::GetAtt:
- DomainConfig
- Cname