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

Align cache_key_fields to API constraints #2192

Merged
merged 1 commit into from
Jan 26, 2023
Merged
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
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