Skip to content

Commit

Permalink
Merge branch 'master' into jholmes/ui-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Oct 13, 2022
2 parents 4981144 + bd19877 commit 760a8cf
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/1805.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/cloudflare_zone_settings_override: Fetch/modify `origin_max_http_version` as a single setting.
```
3 changes: 3 additions & 0 deletions .changelog/1962.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:dependency
provider: bumps github.com/cloudflare/cloudflare-go from 0.51.0 to 0.52.0
```
3 changes: 3 additions & 0 deletions .changelog/1964.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/cloudflare_custom_ssl: check GeoRestrictions is not nil before attempting to compare it
```
20 changes: 20 additions & 0 deletions .github/workflows/sync-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Sync branch

on:
push:
branches:
- master
workflow_dispatch:

jobs:
sync-release-branch:
name: Sync to release branch
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: connor-baer/action-sync-branch@main
with:
branch: '4.x'
token: ${{ secrets.GITHUB_TOKEN }}
force: false
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ ENHANCEMENTS:
BUG FIXES:

* resource/cloudflare_byo_ip_prefix: set correct prefix ID for the byoip prefix during import. ([#1951](https://github.com/cloudflare/terraform-provider-cloudflare/issues/1951))
* resource/cloudflare_custom_ssl: check GeoRestrictions is not nil before attempting to compare it ([#1964](https://github.com/cloudflare/terraform-provider-cloudflare/issues/1964))
* resource/cloudflare_zone_settings_override: Fetch/modify `origin_max_http_version` as a single setting. ([#1805](https://github.com/cloudflare/terraform-provider-cloudflare/issues/1805))

DEPENDENCIES:

* provider: bumps github.com/cloudflare/cloudflare-go from 0.51.0 to 0.52.0 ([#1962](https://github.com/cloudflare/terraform-provider-cloudflare/issues/1962))

## 3.25.0 (October 5th, 2022)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/cloudflare/cloudflare-go v0.51.0
github.com/cloudflare/cloudflare-go v0.52.0
github.com/fatih/color v1.13.0 // indirect
github.com/google/uuid v1.3.0
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down
6 changes: 3 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/cloudflare-go v0.51.0 h1:ZLDg3hNZ42sJahO3kdcy7NtXAlSS//pmly921jAbZ2o=
github.com/cloudflare/cloudflare-go v0.51.0/go.mod h1:4+j2gGo6xyrFiYmpa2y4mNzu7pPPN42kyv1b2EqiZGQ=
github.com/cloudflare/cloudflare-go v0.52.0 h1:9pa170sl8HBR2c/7I5konGwgDYzlQ4dy3evdG/my9xU=
github.com/cloudflare/cloudflare-go v0.52.0/go.mod h1:JSdZSD4FjF220O9REnYf0IGx7gUdbWwRgCAv4TusaJc=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
Expand Down Expand Up @@ -247,7 +247,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/urfave/cli/v2 v2.16.3/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
github.com/urfave/cli/v2 v2.19.2/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_cloudflare_custom_ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func flattenCustomSSLOptions(sslopt cloudflare.ZoneCustomSSLOptions) map[string]
"type": sslopt.Type,
}

if sslopt.GeoRestrictions.Label != "" && sslopt.GeoRestrictions.Label != "custom" {
if sslopt.GeoRestrictions != nil && sslopt.GeoRestrictions.Label != "" && sslopt.GeoRestrictions.Label != "custom" {
data["geo_restrictions"] = sslopt.GeoRestrictions.Label
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var fetchAsSingleSetting = []string{
"h2_prioritization",
"image_resizing",
"early_hints",
"origin_max_http_version",
}

func resourceCloudflareZoneSettingsOverrideCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestAccCloudflareZoneSettingsOverride_Full(t *testing.T) {
resource.TestCheckResourceAttr(name, "settings.0.security_level", "high"),
resource.TestCheckResourceAttr(name, "settings.0.early_hints", "on"),
resource.TestCheckResourceAttr(name, "settings.0.h2_prioritization", "on"),
resource.TestCheckResourceAttr(name, "settings.0.origin_max_http_version", "2"),
resource.TestCheckResourceAttr(name, "settings.0.zero_rtt", "off"),
resource.TestCheckResourceAttr(name, "settings.0.universal_ssl", "off"),
resource.TestCheckResourceAttr(name, "settings.0.ciphers.#", "2"),
Expand Down Expand Up @@ -201,6 +202,7 @@ resource "cloudflare_zone_settings_override" "%[1]s" {
opportunistic_encryption = "on"
automatic_https_rewrites = "on"
h2_prioritization = "on"
origin_max_http_version = "2"
universal_ssl = "off"
minify {
css = "on"
Expand Down

0 comments on commit 760a8cf

Please sign in to comment.