Skip to content

Commit

Permalink
Merge pull request #2486 from cloudflare/remove-ip-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored May 31, 2023
2 parents 7aa5cac + f866296 commit b43307a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/2486.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/cloudflare_list: remove `IsIPAddress` validation that doesn't take into account CIDR notation
```
5 changes: 2 additions & 3 deletions internal/sdkv2provider/schema_cloudflare_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ var listItemElem = &schema.Resource{
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ip": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.IsIPAddress,
Type: schema.TypeString,
Optional: true,
},
"redirect": {
Type: schema.TypeList,
Expand Down
1 change: 1 addition & 0 deletions internal/sdkv2provider/schema_cloudflare_list_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func resourceCloudflareListItemSchema() map[string]*schema.Schema {
Description: "Autonomous system number to include in the list",
ExactlyOneOf: []string{"ip", "redirect", "hostname", "asn"},
ForceNew: true,
ValidateFunc: validation.IntAtLeast(1),
},
"hostname": {
Type: schema.TypeList,
Expand Down

0 comments on commit b43307a

Please sign in to comment.