Skip to content

Commit

Permalink
Merge pull request #2192 from cloudflare/optional-cache-key-fields
Browse files Browse the repository at this point in the history
Align cache_key_fields to API constraints
  • Loading branch information
manatarms authored Jan 26, 2023
2 parents caf72a3 + 25d272d commit 2c70fd6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/2192.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/cloudflare_page_rule: make cache_key_fields optional to align with API constraints
```
11 changes: 6 additions & 5 deletions internal/sdkv2provider/schema_cloudflare_page_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,12 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
MinItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cookie": {
Type: schema.TypeList,
Required: true,
Optional: true,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Resource{
Expand All @@ -314,7 +315,7 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {

"header": {
Type: schema.TypeList,
Required: true,
Optional: true,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Resource{
Expand Down Expand Up @@ -349,7 +350,7 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {

"host": {
Type: schema.TypeList,
Required: true,
Optional: true,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Resource{
Expand All @@ -365,7 +366,7 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {

"query_string": {
Type: schema.TypeList,
Required: true,
Optional: true,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Resource{
Expand Down Expand Up @@ -397,7 +398,7 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {

"user": {
Type: schema.TypeList,
Required: true,
Optional: true,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Resource{
Expand Down

0 comments on commit 2c70fd6

Please sign in to comment.