aliyun / terraform-provider-alicloud

Terraform AliCloud provider
https://www.terraform.io/docs/providers/alicloud/
Mozilla Public License 2.0
591 stars 553 forks source link

alicloud_alidns_record's line argument missing some rules #2977

Closed wi1dcard closed 4 years ago

wi1dcard commented 4 years ago

Terraform Version

Not relevant.

Affected Resource(s)

Terraform Configuration Files

resource "alicloud_alidns_record" "..." {
  name     = "..."
  line     = "internal" # for example
  value    = "..."
}

There're multiple "hidden" lines that supported by alidns, even it has not been documented. Also, some of the lines have been documented in the old docs but neither supported, such as cn_telecom_henan. I had opened another issue before this, it's very similar but for alicloud_dns_record: #1736.

Output

Error: expected line to be one of [default telecom unicom mobile oversea edu drpeng btvn], got internal

Expected Behavior

Works

Actual Behavior

Ouputs errors.

Steps to Reproduce

  1. terraform apply

References

chushenmeshile commented 4 years ago

@wi1dcard There is no internal value in the document. The latest version of terraformer solves the limitation of line enumeration value.

wi1dcard commented 4 years ago

@wi1dcard There is no internal value in the document. The latest version of terraformer solves the limitation of line enumeration value.

@chushenmeshile Thank you for your prompt response. Yes I said "even it has not been documented". I believe there's a gap between the docs versus the API. I tested it works with the unlimited legacy resource alicloud_dns_record when I switched the routing mode to "Region".

image

I really hope the staff of Alibaba cloud can update the docs, I actually get the "internal" value from capture the HTTP requests from the web console.

image

So I have another question here: from your reply, "solves the limitation" means removed the limits or the limits is updated and it still doesn't support internal line?

chushenmeshile commented 4 years ago

@wi1dcard The value of the line field used to be an enumeration value. Now it is an arbitrary string

chushenmeshile commented 4 years ago

@wi1dcard Why do you think the value of line contains internal? What error will happen if you specify it

wi1dcard commented 4 years ago

@wi1dcard The value of the line field used to be an enumeration value. Now it is an arbitrary string

Thank you. That sounds ideal.

@wi1dcard Why do you think the value of line contains internal? What error will happen if you specify it

Please refer to the screenshot. I don't know why I "think" that can be internal. I believe the answer should come from the team of alidns instead of the users.

chushenmeshile commented 4 years ago

@wi1dcard When you create with terraform, please use the latest provider test

wi1dcard commented 4 years ago

@wi1dcard When you create with terraform, please use the latest provider test

@chushenmeshile Sure. Does the latest release v0.103.0 contains this fix? I didn't seem to find any change log in GitHub release page or https://github.com/aliyun/terraform-provider-alicloud/blob/master/CHANGELOG.md.

chushenmeshile commented 4 years ago

@wi1dcard You use 1.103.0 to test. Before, there was an enumeration value limit for line. Now it is not available. Refer to this address https://github.com/aliyun/terraform-provider-alicloud/blob/master/alicloud/resource_alicloud_alidns_record.go

wi1dcard commented 4 years ago

@wi1dcard You use 1.103.0 to test. Before, there was an enumeration value limit for line. Now it is not available. Refer to this address https://github.com/aliyun/terraform-provider-alicloud/blob/master/alicloud/resource_alicloud_alidns_record.go

Works well with the provider version v1.103.0. Thank you for your effort! @chushenmeshile