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

resource/alicloud_vpc_prefix_list: remove validation for description #7664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions alicloud/resource_alicloud_vpc_prefix_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ func resourceAliCloudVpcPrefixList() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"description": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringMatch(regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9_.-]{2,256}$"), "The description of the cidr entry. It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with `http://` or `https://`."),
Type: schema.TypeString,
Optional: true,
},
"cidr": {
Type: schema.TypeString,
Expand Down
5 changes: 4 additions & 1 deletion alicloud/resource_alicloud_vpc_prefix_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ func TestAccAlicloudVPCPrefixList_basic0(t *testing.T) {
"cidr": "192.168.0.0/16",
"description": "${var.name}",
},
{
"cidr": "192.168.1.0/24",
},
},
"prefix_list_name": "${var.name}",
"prefix_list_description": "${var.name}",
Expand All @@ -153,7 +156,7 @@ func TestAccAlicloudVPCPrefixList_basic0(t *testing.T) {
testAccCheck(map[string]string{
"ip_version": "IPV4",
"max_entries": "50",
"entrys.#": "1",
"entrys.#": "2",
"prefix_list_name": name,
"prefix_list_description": name,
}),
Expand Down
Loading