Skip to content

Commit

Permalink
update schema descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Mar 21, 2023
1 parent 2cea756 commit d94b897
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/resources/list_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ resource "cloudflare_list_item" "test_two" {
### Optional

- `comment` (String) An optional comment for the item.
- `ip` (String) Must provide only one of `ip`, `redirect`. **Modifying this attribute will force creation of a new resource.**
- `redirect` (Block List, Max: 1) **Modifying this attribute will force creation of a new resource.** (see [below for nested schema](#nestedblock--redirect))
- `ip` (String) IP address to include in the list. Must provide only one of `ip`, `redirect`. **Modifying this attribute will force creation of a new resource.**
- `redirect` (Block List, Max: 1) Redirect configuration to store in the list. Must provide only one of `ip`, `redirect`. **Modifying this attribute will force creation of a new resource.** (see [below for nested schema](#nestedblock--redirect))

### Read-Only

Expand Down
11 changes: 7 additions & 4 deletions internal/sdkv2provider/schema_cloudflare_list_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ func resourceCloudflareListItemSchema() map[string]*schema.Schema {
"ip": {
Type: schema.TypeString,
Optional: true,
Description: "IP address to include in the list.",
ExactlyOneOf: []string{"ip", "redirect"},
ForceNew: true,
},
"redirect": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
ForceNew: true,
Type: schema.TypeList,
ExactlyOneOf: []string{"ip", "redirect"},
Description: "Redirect configuration to store in the list.",
Optional: true,
MaxItems: 1,
ForceNew: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"source_url": {
Expand Down

0 comments on commit d94b897

Please sign in to comment.