Skip to content

Commit

Permalink
resource/alicloud_vpc_prefix_list: remove validation for description
Browse files Browse the repository at this point in the history
  • Loading branch information
shanye997 committed Sep 12, 2024
1 parent 64fd02d commit 48f06c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 48f06c3

Please sign in to comment.