From 65635af29184ee31c442d1931166b561392d28b8 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Tue, 5 Jul 2022 15:28:30 +0100 Subject: [PATCH] Add `origin_max_http_version` option to zone settings https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/ https://api.cloudflare.com/#zone-settings-change-origin-max-http-version-setting --- .changelog/1755.txt | 3 +++ docs/resources/zone_settings_override.md | 1 + .../provider/schema_cloudflare_zone_settings_override.go | 7 +++++++ templates/resources/zone_settings_override.md | 1 + 4 files changed, 12 insertions(+) create mode 100644 .changelog/1755.txt diff --git a/.changelog/1755.txt b/.changelog/1755.txt new file mode 100644 index 0000000000..3bf56fa74a --- /dev/null +++ b/.changelog/1755.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_zone_settings_override: Add support for `origin_max_http_version` +``` diff --git a/docs/resources/zone_settings_override.md b/docs/resources/zone_settings_override.md index 247b2d8a7e..a7153c5f72 100644 --- a/docs/resources/zone_settings_override.md +++ b/docs/resources/zone_settings_override.md @@ -100,6 +100,7 @@ These can be specified as "on" or "off" string. Similar to boolean values, but h - `h2_prioritization` - Allowed values: "on", "off" (default), "custom". - `image_resizing` - Allowed values: "on", "off" (default), "open". - `min_tls_version` - Allowed values: "1.0" (default), "1.1", "1.2", "1.3". +- `origin_max_http_version` - Allowed values: "1" (default on Enterprise), "2" (default) - `polish` - Allowed values: "off" (default), "lossless", "lossy". - `proxy_read_timeout` (default: "100") - `pseudo_ipv4` - Allowed values: "off" (default), "add_header", "overwrite_header". diff --git a/internal/provider/schema_cloudflare_zone_settings_override.go b/internal/provider/schema_cloudflare_zone_settings_override.go index 587721e10b..7b54be0882 100644 --- a/internal/provider/schema_cloudflare_zone_settings_override.go +++ b/internal/provider/schema_cloudflare_zone_settings_override.go @@ -250,6 +250,13 @@ var resourceCloudflareZoneSettingsSchema = map[string]*schema.Schema{ Computed: true, }, + "origin_max_http_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"1", "2"}, false), + }, + "polish": { Type: schema.TypeString, Optional: true, diff --git a/templates/resources/zone_settings_override.md b/templates/resources/zone_settings_override.md index 247b2d8a7e..a7153c5f72 100644 --- a/templates/resources/zone_settings_override.md +++ b/templates/resources/zone_settings_override.md @@ -100,6 +100,7 @@ These can be specified as "on" or "off" string. Similar to boolean values, but h - `h2_prioritization` - Allowed values: "on", "off" (default), "custom". - `image_resizing` - Allowed values: "on", "off" (default), "open". - `min_tls_version` - Allowed values: "1.0" (default), "1.1", "1.2", "1.3". +- `origin_max_http_version` - Allowed values: "1" (default on Enterprise), "2" (default) - `polish` - Allowed values: "off" (default), "lossless", "lossy". - `proxy_read_timeout` (default: "100") - `pseudo_ipv4` - Allowed values: "off" (default), "add_header", "overwrite_header".