Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chushenmeshile
Copy link
Contributor

No description provided.

},
{
Config: testAccConfig(map[string]interface{}{
"resource_group_id": "default",
Copy link
Contributor

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,
}),
),
Copy link
Contributor

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(`
Copy link
Contributor

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\"}]"
Copy link
Contributor

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
Copy link
Contributor

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\"}]"
Copy link
Contributor

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"
Copy link
Contributor

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(`
Copy link
Contributor

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",
Copy link
Contributor

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,
}),
),
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最后一步的 step 测试多个可变参数同时变更

@CLAassistant
Copy link

CLAassistant commented Aug 11, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants