-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A new resource for Ddoscoo Web Rule #2461
base: master
Are you sure you want to change the base?
Conversation
3619203
to
a3bb3d8
Compare
}, | ||
{ | ||
Config: testAccConfig(map[string]interface{}{ | ||
"resource_group_id": "default", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource_group_id 需要从环境变量中取
testAccCheck(map[string]string{ | ||
"proxy_types": CHECKSET, | ||
}), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后一步的 step 需要将可变更参数同时进行变更
var DdosCooWebRuleMap = map[string]string{} | ||
|
||
func DdosCooWebRuleBasicdependence(name string) string { | ||
return fmt.Sprintf(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有使用直接 return“”
resource "alicloud_ddos_coo_web_rule" "example" { | ||
domain="www.csdn.com" | ||
rs_type="0" | ||
rules="[{\"ProxyRules\":[{\"ProxyPort\":80,\"RealServers\":[\"2.2.2.2\"]}],\"ProxyType\":\"http\"},{\"ProxyRules\":[{\"ProxyPort\":443,\"RealServers\":[\"3.3.3.3\"]}],\"ProxyType\":\"https\"}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个使用 module 语法形式 <<EOF 可参考 resource_manager_role 资源
Ddoscoo Web Rule can be imported using the id, e.g. | ||
|
||
``` | ||
$ terraform import alicloud_ddos_coo_web_rule.example abc12345678 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将 abc12345678 换成 usage 中的 domain 值
resource "alicloud_ddos_coo_web_rule" "example" { | ||
domain="www.csdn.com" | ||
rs_type="0" | ||
rules="[{\"ProxyRules\":[{\"ProxyPort\":80,\"RealServers\":[\"2.2.2.2\"]}],\"ProxyType\":\"http\"},{\"ProxyRules\":[{\"ProxyPort\":443,\"RealServers\":[\"3.3.3.3\"]}],\"ProxyType\":\"https\"}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
调整下格式,可以参考 resource_manager_role 的文档形式
|
||
``` | ||
resource "alicloud_ddos_coo_web_rule" "example" { | ||
domain="www.csdn.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
换一个 domain 吧
var DdosCooWebRuleMap = map[string]string{} | ||
|
||
func DdosCooWebRuleBasicdependence(name string) string { | ||
return fmt.Sprintf(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有使用的直接 return“”
}, | ||
{ | ||
Config: testAccConfig(map[string]interface{}{ | ||
"resource_group_id": "default", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource_group_id 从环境变量中取,可以参考其他的资源
"proxy_types": CHECKSET, | ||
}), | ||
), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后一步的 step 测试多个可变参数同时变更
a3bb3d8
to
c7399ce
Compare
|
No description provided.