Skip to content

Commit

Permalink
Merge pull request #1817 from marceloalmeida/master
Browse files Browse the repository at this point in the history
Removed always_online action from page rules
  • Loading branch information
jacobbednarz authored Aug 8, 2022
2 parents 7f9659d + cddc4ff commit 571a657
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/1817.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
resource/cloudflare_page_rule: Removed `always_online` from page rules since this action has been decommissioned from page rules
```
1 change: 0 additions & 1 deletion docs/resources/page_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ The following arguments are supported:

Action blocks support the following:

- `always_online` - (Optional) Whether this action is `"on"` or `"off"`.
- `always_use_https` - (Optional) Boolean of whether this action is enabled. Default: false.
- `automatic_https_rewrites` - (Optional) Whether this action is `"on"` or `"off"`.
- `browser_cache_ttl` - (Optional) The Time To Live for the browser cache. `0` means 'Respect Existing Headers'
Expand Down
1 change: 0 additions & 1 deletion internal/provider/resource_cloudflare_page_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func resourceCloudflarePageRuleDelete(ctx context.Context, d *schema.ResourceDat
}

var pageRuleAPIOnOffFields = []string{
"always_online",
"automatic_https_rewrites",
"browser_check",
"cache_by_device_type",
Expand Down
7 changes: 0 additions & 7 deletions internal/provider/schema_cloudflare_page_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ func resourceCloudflarePageRuleSchema() map[string]*schema.Schema {
Elem: &schema.Resource{
SchemaVersion: 1,
Schema: map[string]*schema.Schema{
// on/off options
"always_online": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"on", "off"}, false),
},

// may get api errors trying to set this
"automatic_https_rewrites": {
Type: schema.TypeString,
Expand Down
1 change: 0 additions & 1 deletion templates/resources/page_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ The following arguments are supported:

Action blocks support the following:

- `always_online` - (Optional) Whether this action is `"on"` or `"off"`.
- `always_use_https` - (Optional) Boolean of whether this action is enabled. Default: false.
- `automatic_https_rewrites` - (Optional) Whether this action is `"on"` or `"off"`.
- `browser_cache_ttl` - (Optional) The Time To Live for the browser cache. `0` means 'Respect Existing Headers'
Expand Down

0 comments on commit 571a657

Please sign in to comment.