From 2ddc5be35b1b56175b08ff5e195d0ad7bb4fd151 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:39:57 +0000 Subject: [PATCH 001/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.26.5 to 1.26.6 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.26.5...config/v1.26.6) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index caa620ba34..90513c4cc6 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.24.1 - github.com/aws/aws-sdk-go-v2/config v1.26.5 + github.com/aws/aws-sdk-go-v2/config v1.26.6 github.com/aws/aws-sdk-go-v2/credentials v1.16.16 github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 github.com/google/go-cmp v0.6.0 @@ -54,7 +54,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 // indirect diff --git a/go.sum b/go.sum index 49d4634f0c..43885b6ee5 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3 github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= -github.com/aws/aws-sdk-go-v2/config v1.26.5 h1:lodGSevz7d+kkFJodfauThRxK9mdJbyutUxGq1NNhvw= -github.com/aws/aws-sdk-go-v2/config v1.26.5/go.mod h1:DxHrz6diQJOc9EwDslVRh84VjjrE17g+pVZXUeSxaDU= +github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o= +github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4= github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8= github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8= @@ -23,8 +23,8 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5B github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 h1:5oE2WzJE56/mVveuDZPJESKlg/00AaS2pY2QZcnxg4M= github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10/go.mod h1:FHbKWQtRBYUz4vO5WBWjzMD2by126ny5y/1EoaWoLfI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= From 7833a9329bd6fe3748649277543bb9c552e87922 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jan 2024 23:40:15 +0000 Subject: [PATCH 002/264] add CHANGELOG for #3074 --- .changelog/3074.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3074.txt diff --git a/.changelog/3074.txt b/.changelog/3074.txt new file mode 100644 index 0000000000..5d25878ab3 --- /dev/null +++ b/.changelog/3074.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.5 to 1.26.6 +``` From 1ba09393e82e9db65fb6ca78215747a1980f6df4 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 22 Jan 2024 23:47:53 +0000 Subject: [PATCH 003/264] Update CHANGELOG.md for #3074 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d7a78e9b..5d0b1f9dbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.3 to 1.26.4 ([#3065](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3065)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.4 to 1.26.5 ([#3071](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3071)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.5 to 1.26.6 ([#3074](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3074)) * provider: bump actions/cache from 3 to 4 ([#3067](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3067)) * provider: bump github.com/cloudflare/cloudflare-go from 0.85.0 to 0.86.0 ([#3066](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3066)) * provider: bump github.com/hashicorp/terraform-plugin-framework from 1.4.2 to 1.5.0 ([#3058](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3058)) From d7087a079df3e32cc998363679bf7eff355f95e7 Mon Sep 17 00:00:00 2001 From: daku10 Date: Tue, 23 Jan 2024 19:56:01 +0900 Subject: [PATCH 004/264] Resolve ignored errors in `import cloudflare_access_application` --- .../sdkv2provider/resource_cloudflare_access_application.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/sdkv2provider/resource_cloudflare_access_application.go b/internal/sdkv2provider/resource_cloudflare_access_application.go index 44739349ea..c8ac4dc227 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application.go @@ -322,10 +322,7 @@ func resourceCloudflareAccessApplicationImport(ctx context.Context, d *schema.Re d.Set(consts.AccountIDSchemaKey, accountID) d.SetId(accessApplicationID) - readErr := resourceCloudflareAccessApplicationRead(ctx, d, meta) - if readErr != nil { - return nil, errors.New("failed to read Access Application state") - } + resourceCloudflareAccessApplicationRead(ctx, d, meta) return []*schema.ResourceData{d}, nil } From 6d46c8a25e781963b4352c6b4b0b45dad3114f5c Mon Sep 17 00:00:00 2001 From: daku10 Date: Tue, 23 Jan 2024 20:27:25 +0900 Subject: [PATCH 005/264] add changelog --- .changelog/3075.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3075.txt diff --git a/.changelog/3075.txt b/.changelog/3075.txt new file mode 100644 index 0000000000..ae0553ca2e --- /dev/null +++ b/.changelog/3075.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_access_application: Fix error handling in `import cloudflare_access_application` +``` From d49b88bab69ecf7b9412049a7bb9b0d5984e025e Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 24 Jan 2024 08:35:05 +1100 Subject: [PATCH 006/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d0b1f9dbe..9e75a182e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.23.0 (Unreleased) +## 4.24.0 (Unreleased) + +## 4.23.0 (January 24th, 2023) BREAKING CHANGES: From aa61ceb679abb22249b472be05533de66b9d8b4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:04:09 +0000 Subject: [PATCH 007/264] build(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0 Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/google/uuid/releases) - [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: github.com/google/uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 90513c4cc6..969b2d1812 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/cloudflare/cloudflare-go v0.86.0 github.com/fatih/color v1.16.0 // indirect - github.com/google/uuid v1.5.0 + github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect diff --git a/go.sum b/go.sum index 43885b6ee5..2d451b2a2e 100644 --- a/go.sum +++ b/go.sum @@ -80,8 +80,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= From 6adf1ac0b37f0fd3e2d5a2005fb19039b6b9b4d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jan 2024 23:06:36 +0000 Subject: [PATCH 008/264] add CHANGELOG for #3076 --- .changelog/3076.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3076.txt diff --git a/.changelog/3076.txt b/.changelog/3076.txt new file mode 100644 index 0000000000..0782a3071f --- /dev/null +++ b/.changelog/3076.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 +``` From 8194758ce8ff41f096b93d830fa6b5d40bf04331 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 24 Jan 2024 00:38:52 +0000 Subject: [PATCH 009/264] Update CHANGELOG.md for #3076 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e75a182e9..846f88e97b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.24.0 (Unreleased) +DEPENDENCIES: + +* provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) + ## 4.23.0 (January 24th, 2023) BREAKING CHANGES: From c09e5b1a07be2f0318da1554c91347f2f7b5d582 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:28:10 +0000 Subject: [PATCH 010/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.48.0...service/s3/v1.48.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 969b2d1812..987bf3b89f 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.24.1 github.com/aws/aws-sdk-go-v2/config v1.26.6 github.com/aws/aws-sdk-go-v2/credentials v1.16.16 - github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 diff --git a/go.sum b/go.sum index 2d451b2a2e..de6c052dd8 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIG github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 h1:PJTdBMsyvra6FtED7JZtDpQrIAflYDHFoZAu/sKYkwU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU= +github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 h1:5XNlsBsEvBZBMO6p82y+sqpWg8j5aBCe+5C2GBFgqBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU= github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 h1:eajuO3nykDPdYicLlP3AGgOyVN3MOlFmZv7WGTuJPow= github.com/aws/aws-sdk-go-v2/service/sso v1.18.7/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 h1:QPMJf+Jw8E1l7zqhZmMlFw6w1NmfkfiSK8mS4zOx3BA= From b3d1bd7da3585ae6593ca755b58baab0ec5a174b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Jan 2024 23:28:24 +0000 Subject: [PATCH 011/264] add CHANGELOG for #3078 --- .changelog/3078.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3078.txt diff --git a/.changelog/3078.txt b/.changelog/3078.txt new file mode 100644 index 0000000000..2612b3121f --- /dev/null +++ b/.changelog/3078.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 +``` From 44309a7e05143ddfe635f09d522d7d412c1a02d0 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 25 Jan 2024 04:31:05 +0000 Subject: [PATCH 012/264] Update CHANGELOG.md for #3078 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 846f88e97b..5ae86ea2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ DEPENDENCIES: +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) ## 4.23.0 (January 24th, 2023) From c2295c352f76a389b608217b8bc5834dfaad6f91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 23:17:43 +0000 Subject: [PATCH 013/264] build(deps): bump peter-evans/create-or-update-comment from 3 to 4 Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 3 to 4. - [Release notes](https://github.com/peter-evans/create-or-update-comment/releases) - [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v3...v4) --- updated-dependencies: - dependency-name: peter-evans/create-or-update-comment dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/community-comment.yml | 2 +- .github/workflows/reproduction-contains-dynamics.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/community-comment.yml b/.github/workflows/community-comment.yml index 46d8e60b7a..2c66d4928f 100644 --- a/.github/workflows/community-comment.yml +++ b/.github/workflows/community-comment.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Add community note to new Issues if: github.event_name == 'issues' - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v4 with: issue-number: ${{ github.event.issue.number }} body: | diff --git a/.github/workflows/reproduction-contains-dynamics.yml b/.github/workflows/reproduction-contains-dynamics.yml index e604192191..6857bae87f 100644 --- a/.github/workflows/reproduction-contains-dynamics.yml +++ b/.github/workflows/reproduction-contains-dynamics.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Add comment to issue about not using dynamic expressions - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v4 with: issue-number: ${{ github.event.inputs.issue_number }} body: | From 4253c2c81b9c00ca5088dc75f7ece2efe4a4a2d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jan 2024 23:17:57 +0000 Subject: [PATCH 014/264] add CHANGELOG for #3079 --- .changelog/3079.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3079.txt diff --git a/.changelog/3079.txt b/.changelog/3079.txt new file mode 100644 index 0000000000..0b31d0921e --- /dev/null +++ b/.changelog/3079.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump peter-evans/create-or-update-comment from 3 to 4 +``` From b25e31f8d72e05f3cafbb2558e570dc455a93943 Mon Sep 17 00:00:00 2001 From: Aleksandr Kljubin Date: Thu, 25 Jan 2024 20:34:40 -0700 Subject: [PATCH 015/264] cloudflare_device_settings_policy.auto_connect is in seconds This fixes a bug in documentation. Specifically, the documentation states that cloudflare_device_settings_policy.auto_connect is in minutes. In reality though, that field is in seconds. This commit adjusts the documentation accordingly. --- .changelog/3080.txt | 3 +++ docs/resources/device_settings_policy.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/3080.txt diff --git a/.changelog/3080.txt b/.changelog/3080.txt new file mode 100644 index 0000000000..9eb11df9d0 --- /dev/null +++ b/.changelog/3080.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_device_settings_policy: updated docs that `auto_connect` is in seconds, not in minutes +``` diff --git a/docs/resources/device_settings_policy.md b/docs/resources/device_settings_policy.md index d03d12a0b6..e872a925cf 100644 --- a/docs/resources/device_settings_policy.md +++ b/docs/resources/device_settings_policy.md @@ -47,7 +47,7 @@ resource "cloudflare_device_settings_policy" "developer_warp_policy" { - `allow_mode_switch` (Boolean) Whether to allow mode switch for this policy. - `allow_updates` (Boolean) Whether to allow updates under this policy. - `allowed_to_leave` (Boolean) Whether to allow devices to leave the organization. Defaults to `true`. -- `auto_connect` (Number) The amount of time in minutes to reconnect after having been disabled. +- `auto_connect` (Number) The amount of time in seconds to reconnect after having been disabled. - `captive_portal` (Number) The captive portal value for this policy. Defaults to `180`. - `default` (Boolean) Whether the policy refers to the default account policy. - `disable_auto_fallback` (Boolean) Whether to disable auto fallback for this policy. From d987a9cc4e0470813960fb94fada6a389af7655a Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 26 Jan 2024 08:43:40 +0000 Subject: [PATCH 016/264] Update CHANGELOG.md for #3079 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae86ea2d7..636d6973c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) +* provider: bump peter-evans/create-or-update-comment from 3 to 4 ([#3079](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3079)) ## 4.23.0 (January 24th, 2023) From dfe6285b67c87b5b594973b8d7b3c30150bbd735 Mon Sep 17 00:00:00 2001 From: Aleksandr Kljubin Date: Fri, 26 Jan 2024 10:40:29 -0700 Subject: [PATCH 017/264] Switched to `make docs` workflow This means the source of truth for this change is in `internal/sdkv2provider/schema_cloudflare_device_settings_policy.go`. --- .../sdkv2provider/schema_cloudflare_device_settings_policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sdkv2provider/schema_cloudflare_device_settings_policy.go b/internal/sdkv2provider/schema_cloudflare_device_settings_policy.go index 17aaa155ed..33809299f3 100644 --- a/internal/sdkv2provider/schema_cloudflare_device_settings_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_device_settings_policy.go @@ -73,7 +73,7 @@ func resourceCloudflareDeviceSettingsPolicySchema() map[string]*schema.Schema { Optional: true, }, "auto_connect": { - Description: "The amount of time in minutes to reconnect after having been disabled.", + Description: "The amount of time in seconds to reconnect after having been disabled.", Type: schema.TypeInt, Optional: true, }, From 1724b39427049d8cfa87e13804db0f5e3359153f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 23:02:29 +0000 Subject: [PATCH 018/264] build(deps): bump github.com/hashicorp/terraform-plugin-go Bumps [github.com/hashicorp/terraform-plugin-go](https://github.com/hashicorp/terraform-plugin-go) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-go/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-go/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 987bf3b89f..adb829bcf8 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.20.0 + github.com/hashicorp/terraform-plugin-go v0.21.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -90,8 +90,8 @@ require ( golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect golang.org/x/mod v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/grpc v1.60.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/grpc v1.61.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index de6c052dd8..9335d8288f 100644 --- a/go.sum +++ b/go.sum @@ -120,8 +120,8 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.20.0 h1:oqvoUlL+2EUbKNsJbIt3zqqZ7wi6lzn4ufkn/UA51xQ= -github.com/hashicorp/terraform-plugin-go v0.20.0/go.mod h1:Rr8LBdMlY53a3Z/HpP+ZU3/xCDqtKNCkeI9qOyT10QE= +github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= +github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.13.0 h1:79U401/3nd8CWwDGtTHc8F3miSCAS9XGtVarxSTDgwA= @@ -262,14 +262,14 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k= -google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 7b71f76868e2a5ed61edb03ff10f5f07d85a95a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Jan 2024 23:02:41 +0000 Subject: [PATCH 019/264] add CHANGELOG for #3081 --- .changelog/3081.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3081.txt diff --git a/.changelog/3081.txt b/.changelog/3081.txt new file mode 100644 index 0000000000..4ccde53273 --- /dev/null +++ b/.changelog/3081.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 +``` From 6aa76225b759df01e047be36ccb737b9e4597163 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sat, 27 Jan 2024 05:45:36 +0000 Subject: [PATCH 020/264] Update CHANGELOG.md for #3081 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 636d6973c2..e9990ced9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) +* provider: bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 ([#3081](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3081)) * provider: bump peter-evans/create-or-update-comment from 3 to 4 ([#3079](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3079)) ## 4.23.0 (January 24th, 2023) From f07c1e84647dc0b20292c3087c4503b63f765b78 Mon Sep 17 00:00:00 2001 From: Thomas Falkenberg Date: Mon, 29 Jan 2024 15:42:56 +0100 Subject: [PATCH 021/264] extending the record datasource by adding the option to filter by "content" to be able to avoid the problem of having multiple records returned. --- internal/sdkv2provider/data_source_record.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/sdkv2provider/data_source_record.go b/internal/sdkv2provider/data_source_record.go index 8fef93ba37..209de2053f 100644 --- a/internal/sdkv2provider/data_source_record.go +++ b/internal/sdkv2provider/data_source_record.go @@ -36,6 +36,11 @@ func dataSourceCloudflareRecord() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"A", "AAAA", "CAA", "CNAME", "TXT", "SRV", "LOC", "MX", "NS", "SPF", "CERT", "DNSKEY", "DS", "NAPTR", "SMIMEA", "SSHFP", "TLSA", "URI", "PTR", "HTTPS", "SVCB"}, false), Description: "DNS record type to filter record results on.", }, + "content": { + Type: schema.TypeString, + Optional: true, + Description: "Content to filter record results on.", + }, "priority": { Type: schema.TypeInt, Optional: true, @@ -81,8 +86,9 @@ func dataSourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData, zoneID := d.Get(consts.ZoneIDSchemaKey).(string) searchRecord := cloudflare.ListDNSRecordsParams{ - Name: d.Get("hostname").(string), - Type: d.Get("type").(string), + Name: d.Get("hostname").(string), + Type: d.Get("type").(string), + Content: d.Get("content").(string), } records, _, err := client.ListDNSRecords(ctx, cloudflare.ZoneIdentifier(zoneID), searchRecord) @@ -96,6 +102,7 @@ func dataSourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData, if len(records) != 1 && !contains([]string{"MX", "URI"}, searchRecord.Type) { return diag.Errorf("only wanted 1 DNS record. Got %d records", len(records)) + } else { var p uint16 if priority, ok := d.GetOkExists("priority"); ok { From 6db7ec42780125899f08688e7e563c24d7ce396d Mon Sep 17 00:00:00 2001 From: Thomas Falkenberg Date: Mon, 29 Jan 2024 16:06:04 +0100 Subject: [PATCH 022/264] updated the docs for the new optional field "content" for the dns record datasource. --- docs/data-sources/record.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/data-sources/record.md b/docs/data-sources/record.md index e0d50eae3a..15b1ee5cc3 100644 --- a/docs/data-sources/record.md +++ b/docs/data-sources/record.md @@ -27,6 +27,7 @@ data "cloudflare_record" "example" { ### Optional +- `content` (String) Content to filter record results on. - `priority` (Number) DNS priority to filter record results on. - `type` (String) DNS record type to filter record results on. Defaults to `A`. From db7bae5e51458edec5e800c16dd4ede5724e820a Mon Sep 17 00:00:00 2001 From: Thomas Falkenberg Date: Mon, 29 Jan 2024 16:30:33 +0100 Subject: [PATCH 023/264] adding changelog entry. --- .changelog/3084.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3084.txt diff --git a/.changelog/3084.txt b/.changelog/3084.txt new file mode 100644 index 0000000000..7a5433cf48 --- /dev/null +++ b/.changelog/3084.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datasource/cloudflare_record: Add the option to filter by "content" +``` \ No newline at end of file From fd849b7429720ee45eaa21549e6ea2e19c31d8b1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 29 Jan 2024 19:59:22 +0000 Subject: [PATCH 024/264] Update CHANGELOG.md for #3080 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9990ced9f..fba73f4bc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.24.0 (Unreleased) +BUG FIXES: + +* resource/cloudflare_device_settings_policy: updated docs that `auto_connect` is in seconds, not in minutes ([#3080](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3080)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) From f0252cbd8aa1926699c5a8f87cf158f7ee056e61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 23:16:19 +0000 Subject: [PATCH 025/264] build(deps): bump github.com/hashicorp/terraform-plugin-mux Bumps [github.com/hashicorp/terraform-plugin-mux](https://github.com/hashicorp/terraform-plugin-mux) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-mux/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-mux/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-mux/compare/v0.13.0...v0.14.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-mux dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index adb829bcf8..59056f3013 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.13.0 + github.com/hashicorp/terraform-plugin-mux v0.14.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 9335d8288f..d8e62b5d04 100644 --- a/go.sum +++ b/go.sum @@ -124,8 +124,8 @@ github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-mux v0.13.0 h1:79U401/3nd8CWwDGtTHc8F3miSCAS9XGtVarxSTDgwA= -github.com/hashicorp/terraform-plugin-mux v0.13.0/go.mod h1:Ndv0FtwDG2ogzH59y64f2NYimFJ6I0smRgFUKfm6dyQ= +github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= +github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 h1:Bl3e2ei2j/Z3Hc2HIS15Gal2KMKyLAZ2om1HCEvK6es= github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0/go.mod h1:i2C41tszDjiWfziPQDL5R/f3Zp0gahXe5No/MIO9rCE= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= From 89e267d8e94214c41e2dffa0e4f951914f18d555 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Jan 2024 23:16:37 +0000 Subject: [PATCH 026/264] add CHANGELOG for #3085 --- .changelog/3085.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3085.txt diff --git a/.changelog/3085.txt b/.changelog/3085.txt new file mode 100644 index 0000000000..867bf34115 --- /dev/null +++ b/.changelog/3085.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-mux from 0.13.0 to 0.14.0 +``` From db7685a58287fbcb1f78f008b3139642e77e3b52 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 30 Jan 2024 01:08:39 +0000 Subject: [PATCH 027/264] Update CHANGELOG.md for #3085 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fba73f4bc1..a575d98dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 ([#3081](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3081)) +* provider: bump github.com/hashicorp/terraform-plugin-mux from 0.13.0 to 0.14.0 ([#3085](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3085)) * provider: bump peter-evans/create-or-update-comment from 3 to 4 ([#3079](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3079)) ## 4.23.0 (January 24th, 2023) From 5bb16ac35c38b3d2537a8630b889b5cc6c603ac6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 01:09:16 +0000 Subject: [PATCH 028/264] build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.31.0...v2.32.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 59056f3013..a04360a7a1 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/terraform-plugin-go v0.21.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -23,7 +23,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 - github.com/zclconf/go-cty v1.14.1 // indirect + github.com/zclconf/go-cty v1.14.2 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/net v0.20.0 golang.org/x/sys v0.16.0 // indirect @@ -75,7 +75,7 @@ require ( github.com/hashicorp/hc-install v0.6.2 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.20.0 // indirect - github.com/hashicorp/terraform-json v0.20.0 // indirect + github.com/hashicorp/terraform-json v0.21.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index d8e62b5d04..862927f261 100644 --- a/go.sum +++ b/go.sum @@ -114,8 +114,8 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo= github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw= -github.com/hashicorp/terraform-json v0.20.0 h1:cJcvn4gIOTi0SD7pIy+xiofV1zFA3hza+6K+fo52IX8= -github.com/hashicorp/terraform-json v0.20.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= +github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U= +github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgsenVOUeC/IyKpi2ul4fjTg= github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= @@ -126,8 +126,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 h1:Bl3e2ei2j/Z3Hc2HIS15Gal2KMKyLAZ2om1HCEvK6es= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0/go.mod h1:i2C41tszDjiWfziPQDL5R/f3Zp0gahXe5No/MIO9rCE= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= @@ -190,8 +190,8 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= -github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= +github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= From d66e7b9a1ac8e45150768e86d8d3b0d4c80866e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Jan 2024 01:09:29 +0000 Subject: [PATCH 029/264] add CHANGELOG for #3086 --- .changelog/3086.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3086.txt diff --git a/.changelog/3086.txt b/.changelog/3086.txt new file mode 100644 index 0000000000..d19b11f156 --- /dev/null +++ b/.changelog/3086.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.31.0 to 2.32.0 +``` From 2d4ab8cddf556a7a301ac7cb9681be97d9990590 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 30 Jan 2024 01:22:20 +0000 Subject: [PATCH 030/264] Update CHANGELOG.md for #3086 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a575d98dea..7ab24b5cf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ DEPENDENCIES: * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 ([#3081](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3081)) * provider: bump github.com/hashicorp/terraform-plugin-mux from 0.13.0 to 0.14.0 ([#3085](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3085)) +* provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.31.0 to 2.32.0 ([#3086](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3086)) * provider: bump peter-evans/create-or-update-comment from 3 to 4 ([#3079](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3079)) ## 4.23.0 (January 24th, 2023) From dd34c9183ac25d51e6503219bf2a0db44503cafd Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 30 Jan 2024 12:59:04 +1100 Subject: [PATCH 031/264] Update .changelog/3075.txt --- .changelog/3075.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/3075.txt b/.changelog/3075.txt index ae0553ca2e..a3cfb02790 100644 --- a/.changelog/3075.txt +++ b/.changelog/3075.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/cloudflare_access_application: Fix error handling in `import cloudflare_access_application` +resource/cloudflare_access_application: leave existence error handling checks to the `Read` operation when performing imports. ``` From cc323dace36731ff33784eaacb25bfb58b022c9a Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 30 Jan 2024 02:02:40 +0000 Subject: [PATCH 032/264] Update CHANGELOG.md for #3075 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ab24b5cf6..7ac6f974c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/cloudflare_access_application: leave existence error handling checks to the `Read` operation when performing imports. ([#3075](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3075)) * resource/cloudflare_device_settings_policy: updated docs that `auto_connect` is in seconds, not in minutes ([#3080](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3080)) DEPENDENCIES: From ae4c383d02de34a081e058a404863b618cb4cf13 Mon Sep 17 00:00:00 2001 From: Thomas Falkenberg <152178147+tfalkenberg1@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:20:00 +0100 Subject: [PATCH 033/264] Update internal/sdkv2provider/data_source_record.go removing empty line Co-authored-by: Jacob Bednarz --- internal/sdkv2provider/data_source_record.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/sdkv2provider/data_source_record.go b/internal/sdkv2provider/data_source_record.go index 209de2053f..4852dc1952 100644 --- a/internal/sdkv2provider/data_source_record.go +++ b/internal/sdkv2provider/data_source_record.go @@ -102,7 +102,6 @@ func dataSourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData, if len(records) != 1 && !contains([]string{"MX", "URI"}, searchRecord.Type) { return diag.Errorf("only wanted 1 DNS record. Got %d records", len(records)) - } else { var p uint16 if priority, ok := d.GetOkExists("priority"); ok { From f7c05af8be05e0ef9da72c10baa5a5bf8440e5d7 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 30 Jan 2024 08:57:08 +0000 Subject: [PATCH 034/264] Update CHANGELOG.md for #3084 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ac6f974c6..82359c09d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.24.0 (Unreleased) +ENHANCEMENTS: + +* datasource/cloudflare_record: Add the option to filter by "content" ([#3084](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3084)) + BUG FIXES: * resource/cloudflare_access_application: leave existence error handling checks to the `Read` operation when performing imports. ([#3075](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3075)) From 10a2ce7236436a8351835c84de6fd6a331b20fa6 Mon Sep 17 00:00:00 2001 From: David Fialho Date: Tue, 30 Jan 2024 13:56:54 +0000 Subject: [PATCH 035/264] GATE-5415: Add extended email matching setting to teams account config --- .changelog/3089.txt | 3 ++ docs/resources/teams_account.md | 4 +++ .../resource_cloudflare_teams_accounts.go | 34 ++++++++++++++++--- ...resource_cloudflare_teams_accounts_test.go | 3 ++ .../schema_cloudflare_teams_accounts.go | 17 ++++++++++ 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 .changelog/3089.txt diff --git a/.changelog/3089.txt b/.changelog/3089.txt new file mode 100644 index 0000000000..30aff0b5a8 --- /dev/null +++ b/.changelog/3089.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_teams_account: Add support for extended e-mail matching +``` diff --git a/docs/resources/teams_account.md b/docs/resources/teams_account.md index e38b9ab189..75b2b32e2b 100644 --- a/docs/resources/teams_account.md +++ b/docs/resources/teams_account.md @@ -65,6 +65,10 @@ resource "cloudflare_teams_account" "example" { } } } + + extended_email_matching { + enabled = true + } } ``` diff --git a/internal/sdkv2provider/resource_cloudflare_teams_accounts.go b/internal/sdkv2provider/resource_cloudflare_teams_accounts.go index 4ffac2f436..b4a2db7557 100644 --- a/internal/sdkv2provider/resource_cloudflare_teams_accounts.go +++ b/internal/sdkv2provider/resource_cloudflare_teams_accounts.go @@ -95,6 +95,12 @@ func resourceCloudflareTeamsAccountRead(ctx context.Context, d *schema.ResourceD } } + if configuration.Settings.ExtendedEmailMatching != nil { + if err := d.Set("extended_email_matching", flattenExtendedEmailMatchingConfig(configuration.Settings.ExtendedEmailMatching)); err != nil { + return diag.FromErr(fmt.Errorf("error parsing account extended email matching config: %w", err)) + } + } + logSettings, err := client.TeamsAccountLoggingConfiguration(ctx, accountID) if err != nil { return diag.FromErr(fmt.Errorf("error finding Teams Account log settings %q: %w", d.Id(), err)) @@ -149,16 +155,18 @@ func resourceCloudflareTeamsAccountUpdate(ctx context.Context, d *schema.Resourc bodyScanningConfig := inflateBodyScanningConfig(d.Get("body_scanning")) fipsConfig := inflateFIPSConfig(d.Get("fips")) antivirusConfig := inflateAntivirusConfig(d.Get("antivirus")) + extendedEmailMatchingConfig := inflateExtendedEmailMatchingConfig(d.Get("extended_email_matching")) loggingConfig := inflateLoggingSettings(d.Get("logging")) deviceConfig := inflateDeviceSettings(d.Get("proxy")) payloadLogSettings := inflatePayloadLogSettings(d.Get("payload_log")) sshSessionLogSettings := inflateSSHSessionLogSettings(d.Get("ssh_session_log")) updatedTeamsAccount := cloudflare.TeamsConfiguration{ Settings: cloudflare.TeamsAccountSettings{ - Antivirus: antivirusConfig, - BlockPage: blockPageConfig, - FIPS: fipsConfig, - BodyScanning: bodyScanningConfig, + Antivirus: antivirusConfig, + BlockPage: blockPageConfig, + FIPS: fipsConfig, + BodyScanning: bodyScanningConfig, + ExtendedEmailMatching: extendedEmailMatchingConfig, }, } @@ -463,3 +471,21 @@ func inflatePayloadLogSettings(payloadLog interface{}) *cloudflare.DLPPayloadLog PublicKey: publicKey, } } + +func flattenExtendedEmailMatchingConfig(config *cloudflare.TeamsExtendedEmailMatching) []interface{} { + return []interface{}{map[string]interface{}{ + "enabled": config.Enabled, + }} +} + +func inflateExtendedEmailMatchingConfig(config interface{}) *cloudflare.TeamsExtendedEmailMatching { + list := config.([]interface{}) + if len(list) != 1 { + return nil + } + + configMap := list[0].(map[string]interface{}) + return &cloudflare.TeamsExtendedEmailMatching{ + Enabled: cloudflare.BoolPtr(configMap["enabled"].(bool)), + } +} diff --git a/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go b/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go index 4b35367342..66c6d441d3 100644 --- a/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go +++ b/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go @@ -120,6 +120,9 @@ resource "cloudflare_teams_account" "%[1]s" { payload_log { public_key = "EmpOvSXw8BfbrGCi0fhGiD/3yXk2SiV1Nzg2lru3oj0=" } + extended_email_matching { + enabled = true + } } `, rnd, accountID) } diff --git a/internal/sdkv2provider/schema_cloudflare_teams_accounts.go b/internal/sdkv2provider/schema_cloudflare_teams_accounts.go index 0bc39f0554..1493df8c33 100644 --- a/internal/sdkv2provider/schema_cloudflare_teams_accounts.go +++ b/internal/sdkv2provider/schema_cloudflare_teams_accounts.go @@ -113,6 +113,15 @@ func resourceCloudflareTeamsAccountSchema() map[string]*schema.Schema { }, Description: "Configuration for DLP Payload Logging.", }, + "extended_email_matching": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Configuration for extended e-mail matching.", + Elem: &schema.Resource{ + Schema: extendedEmailMatchingSchema, + }, + }, } } @@ -288,3 +297,11 @@ var payloadLogSchema = map[string]*schema.Schema{ Description: "Public key used to encrypt matched payloads.", }, } + +var extendedEmailMatchingSchema = map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + Description: "Whether e-mails should be matched on all variants of user emails (with + or . modifiers) in Firewall policies.", + }, +} From e2ae666366a9cdada0b2f3434c622f1cbae492b1 Mon Sep 17 00:00:00 2001 From: Olivia Trewin Date: Tue, 30 Jan 2024 10:17:50 -0600 Subject: [PATCH 036/264] BUGS-351: Use DLP entry names as the set key --- .changelog/3090.txt | 3 +++ .../sdkv2provider/resource_cloudflare_dlp_profile.go | 4 +--- .../resource_cloudflare_dlp_profile_test.go | 12 +++++++----- .../sdkv2provider/schema_cloudflare_dlp_profile.go | 9 +++++++++ 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 .changelog/3090.txt diff --git a/.changelog/3090.txt b/.changelog/3090.txt new file mode 100644 index 0000000000..dd454a21af --- /dev/null +++ b/.changelog/3090.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_dlp_profile: fixed plan flapping with DLP custom entries +``` diff --git a/internal/sdkv2provider/resource_cloudflare_dlp_profile.go b/internal/sdkv2provider/resource_cloudflare_dlp_profile.go index 31ca52e121..f79c330848 100644 --- a/internal/sdkv2provider/resource_cloudflare_dlp_profile.go +++ b/internal/sdkv2provider/resource_cloudflare_dlp_profile.go @@ -113,9 +113,7 @@ func resourceCloudflareDLPProfileRead(ctx context.Context, d *schema.ResourceDat for _, entry := range dlpProfile.Entries { entries = append(entries, dlpEntryToSchema(entry)) } - d.Set("entry", schema.NewSet(schema.HashResource(&schema.Resource{ - Schema: resourceCloudflareDLPEntrySchema(), - }), entries)) + d.Set("entry", schema.NewSet(hashResourceCloudflareDLPEntry, entries)) return nil } diff --git a/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go b/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go index 1728cdf8cb..5abd1425ee 100644 --- a/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go +++ b/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go @@ -6,6 +6,7 @@ import ( "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" ) func TestAccCloudflareDLPProfile_Custom(t *testing.T) { @@ -48,6 +49,9 @@ func TestAccCloudflareDLPProfile_Custom_MultipleEntries(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccCloudflareDLPProfileConfigCustomMultipleEntries(accountID, rnd, "custom profile 2"), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PostApplyPostRefresh: []plancheck.PlanCheck{plancheck.ExpectEmptyPlan()}, + }, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), resource.TestCheckResourceAttr(name, "name", rnd), @@ -63,10 +67,9 @@ func TestAccCloudflareDLPProfile_Custom_MultipleEntries(t *testing.T) { }), resource.TestCheckTypeSetElemNestedAttrs(name, "entry.*", map[string]string{ - "name": fmt.Sprintf("%s_entry1", rnd), - "enabled": "true", - "pattern.0.regex": "^4[0-9]", - "pattern.0.validation": "luhn", + "name": fmt.Sprintf("%s_entry1", rnd), + "enabled": "true", + "pattern.0.regex": "^4[0-9]", }), ), }, @@ -135,7 +138,6 @@ resource "cloudflare_dlp_profile" "%[1]s" { enabled = true pattern { regex = "^4[0-9]" - validation = "luhn" } } diff --git a/internal/sdkv2provider/schema_cloudflare_dlp_profile.go b/internal/sdkv2provider/schema_cloudflare_dlp_profile.go index c065705127..5638aaab8b 100644 --- a/internal/sdkv2provider/schema_cloudflare_dlp_profile.go +++ b/internal/sdkv2provider/schema_cloudflare_dlp_profile.go @@ -58,6 +58,14 @@ func resourceCloudflareDLPEntrySchema() map[string]*schema.Schema { } } +// Custom hash function used on DLP entries. Extracts the "name" property +// to provide a stable hash for profile entries and prevent spurious differences +// between the state/infra. +func hashResourceCloudflareDLPEntry(i interface{}) int { + v := i.(map[string]interface{}) + return schema.HashString(v["name"]) +} + func resourceCloudflareDLPProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ consts.AccountIDSchemaKey: { @@ -91,6 +99,7 @@ func resourceCloudflareDLPProfileSchema() map[string]*schema.Schema { Elem: &schema.Resource{ Schema: resourceCloudflareDLPEntrySchema(), }, + Set: hashResourceCloudflareDLPEntry, }, "allowed_match_count": { Type: schema.TypeInt, From 2cf24236f77bd3e052be8779ff168310b2fc10b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 23:24:54 +0000 Subject: [PATCH 037/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.86.0 to 0.87.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.86.0...v0.87.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a04360a7a1..970501a39f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.86.0 + github.com/cloudflare/cloudflare-go v0.87.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 862927f261..23b94965a2 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7N github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.86.0 h1:jEKN5VHNYNYtfDL2lUFLTRo+nOVNPFxpXTstVx0rqHI= -github.com/cloudflare/cloudflare-go v0.86.0/go.mod h1:wYW/5UP02TUfBToa/yKbQHV+r6h1NnJ1Je7XjuGM4Jw= +github.com/cloudflare/cloudflare-go v0.87.0 h1:hLuXnDneECNpen4YwfA4+kcjyv8gsj30kOJsHPyw9pI= +github.com/cloudflare/cloudflare-go v0.87.0/go.mod h1:wYW/5UP02TUfBToa/yKbQHV+r6h1NnJ1Je7XjuGM4Jw= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From 7e8588286336cbfa52af4484298bf3f17cd5e440 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 31 Jan 2024 23:25:07 +0000 Subject: [PATCH 038/264] add CHANGELOG for #3095 --- .changelog/3095.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3095.txt diff --git a/.changelog/3095.txt b/.changelog/3095.txt new file mode 100644 index 0000000000..84c3b12a78 --- /dev/null +++ b/.changelog/3095.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.86.0 to 0.87.0 +``` From d07d335fb160d18e0bec1215fd27ee3c629f185b Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 31 Jan 2024 23:35:53 +0000 Subject: [PATCH 039/264] Update CHANGELOG.md for #3095 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82359c09d6..ef30fc7db4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ BUG FIXES: DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.0 to 1.48.1 ([#3078](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3078)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.86.0 to 0.87.0 ([#3095](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3095)) * provider: bump github.com/google/uuid from 1.5.0 to 1.6.0 ([#3076](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3076)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 ([#3081](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3081)) * provider: bump github.com/hashicorp/terraform-plugin-mux from 0.13.0 to 0.14.0 ([#3085](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3085)) From 02460dc10817882d3cfd73c9c19228bf3e634b96 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 1 Feb 2024 02:23:17 +0000 Subject: [PATCH 040/264] Update CHANGELOG.md for #3090 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef30fc7db4..e559c53ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * resource/cloudflare_access_application: leave existence error handling checks to the `Read` operation when performing imports. ([#3075](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3075)) * resource/cloudflare_device_settings_policy: updated docs that `auto_connect` is in seconds, not in minutes ([#3080](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3080)) +* resource/cloudflare_dlp_profile: fixed plan flapping with DLP custom entries ([#3090](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3090)) DEPENDENCIES: From 47e03b1066ecf3c04f22d33673ca42f140c3e43e Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Thu, 1 Feb 2024 13:07:24 +0100 Subject: [PATCH 041/264] docs(r2_bucket): fix link to data location - former link led to 404 page --- templates/resources/r2_bucket.md.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/resources/r2_bucket.md.tmpl b/templates/resources/r2_bucket.md.tmpl index 35ced3f1d6..def2a251bf 100644 --- a/templates/resources/r2_bucket.md.tmpl +++ b/templates/resources/r2_bucket.md.tmpl @@ -11,7 +11,7 @@ description: |- {{codefile "terraform" .ExampleFile}} --> Available location values can be found in the [R2 documentation](https://developers.cloudflare.com/r2/buckets/data-location/#available-hints). +-> Available location values can be found in the [R2 documentation](https://developers.cloudflare.com/r2/reference/data-location/#available-hints). {{ .SchemaMarkdown | trimspace }} From 64b3eca52afd566be3b8c8d9de53e1cd4cef4642 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Thu, 1 Feb 2024 13:10:28 +0100 Subject: [PATCH 042/264] chore(generated): bump docs - `make docs` --- docs/resources/r2_bucket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/r2_bucket.md b/docs/resources/r2_bucket.md index 9fb2a8c416..3b9e70bf62 100644 --- a/docs/resources/r2_bucket.md +++ b/docs/resources/r2_bucket.md @@ -17,7 +17,7 @@ resource "cloudflare_r2_bucket" "example" { } ``` --> Available location values can be found in the [R2 documentation](https://developers.cloudflare.com/r2/buckets/data-location/#available-hints). +-> Available location values can be found in the [R2 documentation](https://developers.cloudflare.com/r2/reference/data-location/#available-hints). ## Schema From af8ab16c3139bfdb744f6ff2f49d03af3e721fb4 Mon Sep 17 00:00:00 2001 From: Cyb3r-Jak3 Date: Sat, 3 Feb 2024 12:32:24 -0500 Subject: [PATCH 043/264] Add schema migrator to fix upgrade problem --- .changelog/3102.txt | 3 + .../service/email_routing_rule/schema.go | 126 +++++++++++++++++- 2 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 .changelog/3102.txt diff --git a/.changelog/3102.txt b/.changelog/3102.txt new file mode 100644 index 0000000000..123ae0c94e --- /dev/null +++ b/.changelog/3102.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/email_routing_rule: Fix issue with upgrading resource from 4.22.0 to 4.23.0 +``` diff --git a/internal/framework/service/email_routing_rule/schema.go b/internal/framework/service/email_routing_rule/schema.go index 3aadc6b3e1..8d69e66355 100644 --- a/internal/framework/service/email_routing_rule/schema.go +++ b/internal/framework/service/email_routing_rule/schema.go @@ -3,7 +3,6 @@ package email_routing_rule import ( "context" "fmt" - "github.com/cloudflare/terraform-provider-cloudflare/internal/utils" "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" "github.com/hashicorp/terraform-plugin-framework/schema/validator" @@ -23,7 +22,8 @@ func (r *EmailRoutingRuleResource) Schema(ctx context.Context, req resource.Sche resp.Schema = schema.Schema{ MarkdownDescription: heredoc.Doc(` The [Email Routing Rule](https://developers.cloudflare.com/email-routing/setup/email-routing-addresses/#email-rule-actions) resource allows you to create and manage email routing rules for a zone. - `), + `), + Version: 1, Attributes: map[string]schema.Attribute{ consts.ZoneIDSchemaKey: schema.StringAttribute{ @@ -117,3 +117,125 @@ func (r *EmailRoutingRuleResource) Schema(ctx context.Context, req resource.Sche }, } } + +func (r *EmailRoutingRuleResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader { + return map[int64]resource.StateUpgrader{ + // State upgrade implementation from 0 (prior state version) to 1 (Schema.Version) + 0: { + PriorSchema: &schema.Schema{ + Attributes: map[string]schema.Attribute{ + consts.ZoneIDSchemaKey: schema.StringAttribute{ + MarkdownDescription: consts.ZoneIDSchemaDescription, + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "id": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "The ID of the email routing rule.", + }, + "tag": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "The tag of the email routing rule.", + }, + "name": schema.StringAttribute{ + Required: true, + MarkdownDescription: "Routing rule name.", + }, + "priority": schema.Int64Attribute{ + MarkdownDescription: "The priority of the email routing rule.", + Optional: true, + Computed: true, + Validators: []validator.Int64{ + int64validator.AtLeast(0), + }, + }, + "enabled": schema.BoolAttribute{ + MarkdownDescription: "Whether the email routing rule is enabled.", + Optional: true, + }, + }, + Blocks: map[string]schema.Block{ + "matcher": schema.SetNestedBlock{ + MarkdownDescription: "Matching patterns to forward to your actions.", + Validators: []validator.Set{ + setvalidator.SizeAtLeast(1), + setvalidator.IsRequired(), + }, + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "type": schema.StringAttribute{ + Required: true, + MarkdownDescription: fmt.Sprintf("Type of matcher. %s", utils.RenderAvailableDocumentationValuesStringSlice([]string{"literal", "all"})), + Validators: []validator.String{ + stringvalidator.OneOf("literal", "all"), + }, + }, + "field": schema.StringAttribute{ + Optional: true, + MarkdownDescription: "Field to match on. Required for `type` of `literal`.", + }, + "value": schema.StringAttribute{ + Optional: true, + MarkdownDescription: "Value to match on. Required for `type` of `literal`.", + Validators: []validator.String{ + stringvalidator.LengthBetween(0, 90), + }, + }, + }, + }, + }, + "action": schema.SetNestedBlock{ + MarkdownDescription: "Actions to take when a match is found.", + Validators: []validator.Set{ + setvalidator.SizeAtLeast(1), + setvalidator.IsRequired(), + }, + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "type": schema.StringAttribute{ + Required: true, + MarkdownDescription: fmt.Sprintf("Type of action. %s", utils.RenderAvailableDocumentationValuesStringSlice([]string{"forward", "worker", "drop"})), + Validators: []validator.String{ + stringvalidator.OneOf("forward", "worker", "drop"), + }, + }, + "value": schema.SetAttribute{ + Optional: true, + ElementType: types.StringType, + MarkdownDescription: "Value to match on. Required for `type` of `literal`.", + Validators: []validator.Set{ + setvalidator.ValueStringsAre(stringvalidator.LengthBetween(0, 90)), + }, + }, + }, + }, + }, + }, + }, + StateUpgrader: func(ctx context.Context, req resource.UpgradeStateRequest, resp *resource.UpgradeStateResponse) { + var priorStateData EmailRoutingRuleModel + + resp.Diagnostics.Append(req.State.Get(ctx, &priorStateData)...) + + if resp.Diagnostics.HasError() { + return + } + + upgradedStateData := EmailRoutingRuleModel{ + ZoneID: priorStateData.ZoneID, + ID: priorStateData.ID, + Tag: priorStateData.ID, + Name: priorStateData.Name, + Priority: priorStateData.Priority, + Enabled: priorStateData.Enabled, + Action: priorStateData.Action, + Matcher: priorStateData.Matcher, + } + + resp.Diagnostics.Append(resp.State.Set(ctx, upgradedStateData)...) + }, + }, + } +} From 34a4599be5fc0be677bb626bba26c4575733002a Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 5 Feb 2024 11:10:57 +1100 Subject: [PATCH 044/264] add DNS ownership --- tools/cmd/sync-github-issue-to-jira/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/cmd/sync-github-issue-to-jira/main.go b/tools/cmd/sync-github-issue-to-jira/main.go index dfe3a2b8a0..738dd54424 100644 --- a/tools/cmd/sync-github-issue-to-jira/main.go +++ b/tools/cmd/sync-github-issue-to-jira/main.go @@ -75,6 +75,7 @@ var ( "service/access", "service/cache", + "service/dns", "service/iam", "service/load_balancing", "service/logs", @@ -156,6 +157,10 @@ var ( teamName: "ZT Device Services", owner: "suhrit", }, + "service/dns": { + teamName: "DNS", + owner: "elmerot", + }, } ) From befd6e42b77cc28f7a9b0cfd4fa339655282c7c2 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 7 Feb 2024 11:38:09 +1100 Subject: [PATCH 045/264] Update .changelog/3102.txt --- .changelog/3102.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/3102.txt b/.changelog/3102.txt index 123ae0c94e..671fc1cd8c 100644 --- a/.changelog/3102.txt +++ b/.changelog/3102.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/email_routing_rule: Fix issue with upgrading resource from 4.22.0 to 4.23.0 +resource/email_routing_rule: add schema migration for upgrading 4.22.0 to 4.23.0 ``` From eb3e12860dd1f6f2b91e515701c55571b06deb9c Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 7 Feb 2024 01:04:35 +0000 Subject: [PATCH 046/264] Update CHANGELOG.md for #3102 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e559c53ded..8be8a79cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ BUG FIXES: * resource/cloudflare_access_application: leave existence error handling checks to the `Read` operation when performing imports. ([#3075](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3075)) * resource/cloudflare_device_settings_policy: updated docs that `auto_connect` is in seconds, not in minutes ([#3080](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3080)) * resource/cloudflare_dlp_profile: fixed plan flapping with DLP custom entries ([#3090](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3090)) +* resource/email_routing_rule: add schema migration for upgrading 4.22.0 to 4.23.0 ([#3102](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3102)) DEPENDENCIES: From 3dfb34250c5e2c34e94b48f6e22895057dd4e901 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 7 Feb 2024 12:08:56 +1100 Subject: [PATCH 047/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be8a79cb9..1eb8ff57a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.24.0 (Unreleased) +## 4.25.0 (Unreleased) + +## 4.24.0 (February 7th, 2023) ENHANCEMENTS: From 2513765bbe7a75ac046fe1a0e7376121abf2b93c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 23:46:45 +0000 Subject: [PATCH 048/264] build(deps): bump golang.org/x/net from 0.20.0 to 0.21.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.21.0. - [Commits](https://github.com/golang/net/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 970501a39f..2ed435cf9b 100644 --- a/go.mod +++ b/go.mod @@ -24,9 +24,9 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 github.com/zclconf/go-cty v1.14.2 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/net v0.20.0 - golang.org/x/sys v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/net v0.21.0 + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index 23b94965a2..700f557131 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -211,8 +211,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -232,14 +232,14 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From eb7420a4a9ea112fd2aaed6e77ad30758ef29b15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Feb 2024 23:47:01 +0000 Subject: [PATCH 049/264] add CHANGELOG for #3108 --- .changelog/3108.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3108.txt diff --git a/.changelog/3108.txt b/.changelog/3108.txt new file mode 100644 index 0000000000..99e9c8b84b --- /dev/null +++ b/.changelog/3108.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump golang.org/x/net from 0.20.0 to 0.21.0 +``` From 928091e773fb7eadb7ca0e098c6b8828cfe8fada Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 8 Feb 2024 00:57:39 +0000 Subject: [PATCH 050/264] Update CHANGELOG.md for #3108 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb8ff57a3..246cc2d401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.25.0 (Unreleased) +DEPENDENCIES: + +* provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) + ## 4.24.0 (February 7th, 2023) ENHANCEMENTS: From 26549a11b33f4948874bbd3a29945f7073b8af1b Mon Sep 17 00:00:00 2001 From: daku10 Date: Thu, 8 Feb 2024 16:24:58 +0900 Subject: [PATCH 051/264] Add `build_caching` on cloudflare_pages_project --- internal/sdkv2provider/resource_cloudflare_pages_project.go | 3 +++ .../sdkv2provider/resource_cloudflare_pages_project_test.go | 2 ++ internal/sdkv2provider/schema_cloudflare_pages_project.go | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/internal/sdkv2provider/resource_cloudflare_pages_project.go b/internal/sdkv2provider/resource_cloudflare_pages_project.go index ba2969ffe3..4b010ba4e0 100644 --- a/internal/sdkv2provider/resource_cloudflare_pages_project.go +++ b/internal/sdkv2provider/resource_cloudflare_pages_project.go @@ -218,6 +218,7 @@ func buildCreatePagesProject(d *schema.ResourceData) cloudflare.CreatePagesProje if _, ok := d.GetOk("build_config"); ok { buildConfig := cloudflare.PagesProjectBuildConfig{} + buildConfig.BuildCaching = cloudflare.BoolPtr(d.Get("build_config.0.build_caching").(bool)) if buildCommand, ok := d.GetOk("build_config.0.build_command"); ok { buildConfig.BuildCommand = buildCommand.(string) } @@ -301,6 +302,7 @@ func buildUpdatePagesProject(d *schema.ResourceData) cloudflare.UpdatePagesProje if _, ok := d.GetOk("build_config"); ok { buildConfig := cloudflare.PagesProjectBuildConfig{} + buildConfig.BuildCaching = cloudflare.BoolPtr(d.Get("build_config.0.build_caching").(bool)) if buildCommand, ok := d.GetOk("build_config.0.build_command"); ok { buildConfig.BuildCommand = buildCommand.(string) } @@ -416,6 +418,7 @@ func resourceCloudflarePagesProjectRead(ctx context.Context, d *schema.ResourceD if project.BuildConfig != emptyProjectBuildConfig { var buildConfig []map[string]interface{} buildConfig = append(buildConfig, map[string]interface{}{ + "build_caching": project.BuildConfig.BuildCaching, "build_command": project.BuildConfig.BuildCommand, "destination_dir": project.BuildConfig.DestinationDir, "root_dir": project.BuildConfig.RootDir, diff --git a/internal/sdkv2provider/resource_cloudflare_pages_project_test.go b/internal/sdkv2provider/resource_cloudflare_pages_project_test.go index 63273f685e..ca8bfbca59 100644 --- a/internal/sdkv2provider/resource_cloudflare_pages_project_test.go +++ b/internal/sdkv2provider/resource_cloudflare_pages_project_test.go @@ -40,6 +40,7 @@ func testPagesProjectBuildConfig(resourceID, accountID string) string { name = "%[1]s" production_branch = "main" build_config { + build_caching = true build_command = "npm run build" destination_dir = "build" root_dir = "/" @@ -204,6 +205,7 @@ func TestAccCloudflarePagesProject_BuildConfig(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(name, "name", rnd), resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), + resource.TestCheckResourceAttr(name, "build_config.0.builld_caching", "true"), resource.TestCheckResourceAttr(name, "build_config.0.build_command", "npm run build"), resource.TestCheckResourceAttr(name, "build_config.0.destination_dir", "build"), resource.TestCheckResourceAttr(name, "build_config.0.root_dir", "/"), diff --git a/internal/sdkv2provider/schema_cloudflare_pages_project.go b/internal/sdkv2provider/schema_cloudflare_pages_project.go index aa625d9a46..9c0c6cae86 100644 --- a/internal/sdkv2provider/schema_cloudflare_pages_project.go +++ b/internal/sdkv2provider/schema_cloudflare_pages_project.go @@ -11,6 +11,11 @@ import ( func resourceCloudflarePagesProjectSchema() map[string]*schema.Schema { buildConfig := schema.Resource{ Schema: map[string]*schema.Schema{ + "build_caching": { + Type: schema.TypeBool, + Description: "Enable build caching for the project.", + Optional: true, + }, "build_command": { Type: schema.TypeString, Description: "Command used to build project.", From 59401d8bfd553f499e98ad563f9e1991844dfb07 Mon Sep 17 00:00:00 2001 From: daku10 Date: Thu, 8 Feb 2024 16:56:28 +0900 Subject: [PATCH 052/264] add changelog --- .changelog/3110.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3110.txt diff --git a/.changelog/3110.txt b/.changelog/3110.txt new file mode 100644 index 0000000000..1652ffdf7f --- /dev/null +++ b/.changelog/3110.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/pages_project: Add `build_caching` attribute +``` From faab84cdec304140956247f55573f8eded23e17b Mon Sep 17 00:00:00 2001 From: Christian Ehrig Date: Thu, 8 Feb 2024 21:21:11 +0100 Subject: [PATCH 053/264] Adds IPsec tunnel health_check_direction & health_check_rate parameters to cloudflare_ipsec_tunnel --- .changelog/3112.txt | 3 ++ docs/resources/ipsec_tunnel.md | 2 + .../resource_cloudflare_ipsec_tunnel.go | 42 +++++++++++++++++++ .../resource_cloudflare_ipsec_tunnel_test.go | 4 ++ .../schema_cloudflare_ipsec_tunnel.go | 14 +++++++ 5 files changed, 65 insertions(+) create mode 100644 .changelog/3112.txt diff --git a/.changelog/3112.txt b/.changelog/3112.txt new file mode 100644 index 0000000000..c81b388b3b --- /dev/null +++ b/.changelog/3112.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters +``` diff --git a/docs/resources/ipsec_tunnel.md b/docs/resources/ipsec_tunnel.md index d6a66e542c..9ef60ddfd2 100644 --- a/docs/resources/ipsec_tunnel.md +++ b/docs/resources/ipsec_tunnel.md @@ -45,6 +45,8 @@ resource "cloudflare_ipsec_tunnel" "example" { - `health_check_enabled` (Boolean) Specifies if ICMP tunnel health checks are enabled. Default: `true`. - `health_check_target` (String) The IP address of the customer endpoint that will receive tunnel health checks. Default: ``. - `health_check_type` (String) Specifies the ICMP echo type for the health check (`request` or `reply`). Available values: `request`, `reply` Default: `reply`. +- `health_check_direction` (String) Specifies the direction for the health check (`unidirectional` or `bidirectional`). Available values: `unidirectional`, `bidirectional` Default: `unidirectional`. +- `health_check_rate` (String) Specifies the ICMP rate for the health check (`low`, `mid` or `high`). Available values: `low`, `mid`, `high` Default: `mid`. - `hex_id` (String) `remote_id` as a hex string. This value is generated by cloudflare. - `psk` (String, Sensitive) Pre shared key to be used with the IPsec tunnel. If left unset, it will be autogenerated. - `remote_id` (String) ID to be used while setting up the IPsec tunnel. This value is generated by cloudflare. diff --git a/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel.go b/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel.go index 1f1d9637d4..aa7b08cac7 100644 --- a/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel.go +++ b/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel.go @@ -100,6 +100,8 @@ func resourceCloudflareIPsecTunnelRead(ctx context.Context, d *schema.ResourceDa d.Set("health_check_enabled", tunnel.HealthCheck.Enabled) d.Set("health_check_target", tunnel.HealthCheck.Target) d.Set("health_check_type", tunnel.HealthCheck.Type) + d.Set("health_check_direction", tunnel.HealthCheck.Direction) + d.Set("health_check_rate", tunnel.HealthCheck.Rate) d.Set("allow_null_cipher", tunnel.AllowNullCipher) // Set Remote Identities @@ -176,5 +178,45 @@ func IPsecTunnelFromResource(d *schema.ResourceData) cloudflare.MagicTransitIPse tunnel.AllowNullCipher = allowNullCipher.(bool) } + healthcheck := IPsecTunnelHealthcheckFromResource(d) + if healthcheck != nil { + tunnel.HealthCheck = healthcheck + } + return tunnel } + +func IPsecTunnelHealthcheckFromResource(d *schema.ResourceData) *cloudflare.MagicTransitTunnelHealthcheck { + healthcheck := cloudflare.MagicTransitTunnelHealthcheck{} + + healthcheckEnabled, healthcheckEnabledOk := d.GetOk("health_check_enabled") + if healthcheckEnabledOk { + healthcheck.Enabled = healthcheckEnabled.(bool) + } + + healthcheckTarget, healthcheckTargetOk := d.GetOk("health_check_target") + if healthcheckTargetOk { + healthcheck.Target = healthcheckTarget.(string) + } + + healthcheckType, healthcheckTypeOk := d.GetOk("health_check_type") + if healthcheckTypeOk { + healthcheck.Type = healthcheckType.(string) + } + + healthcheckDirection, healthcheckDirectionOk := d.GetOk("health_check_direction") + if healthcheckDirectionOk { + healthcheck.Direction = healthcheckDirection.(string) + } + + healthcheckRate, healthcheckRateOk := d.GetOk("health_check_rate") + if healthcheckRateOk { + healthcheck.Rate = healthcheckRate.(string) + } + + if healthcheckEnabledOk || healthcheckTargetOk || healthcheckTypeOk || healthcheckDirectionOk || healthcheckRateOk { + return &healthcheck + } + + return nil +} diff --git a/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel_test.go b/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel_test.go index 95ec390766..fe1293361e 100644 --- a/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel_test.go +++ b/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel_test.go @@ -39,6 +39,8 @@ func TestAccCloudflareIPsecTunnelExists(t *testing.T) { resource.TestCheckResourceAttr(name, "health_check_enabled", "true"), resource.TestCheckResourceAttr(name, "health_check_target", "203.0.113.1"), resource.TestCheckResourceAttr(name, "health_check_type", "request"), + resource.TestCheckResourceAttr(name, "health_check_direction", "unidirectional"), + resource.TestCheckResourceAttr(name, "health_check_rate", "mid"), resource.TestCheckResourceAttr(name, "psk", "asdf1234"), resource.TestCheckResourceAttr(name, "allowNullCipher", "false"), ), @@ -147,6 +149,8 @@ func testAccCheckCloudflareIPsecTunnelSimple(ID, description, accountID, psk str health_check_enabled = true health_check_target = "203.0.113.1" health_check_type = "request" + health_check_direction = "unidirectional" + health_check_rate = "mid" psk = "%[4]s" allow_null_cipher = false }`, ID, description, accountID, psk) diff --git a/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go b/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go index b4cf0df7af..f1e71c011f 100644 --- a/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go +++ b/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go @@ -60,6 +60,20 @@ func resourceCloudflareIPsecTunnelSchema() map[string]*schema.Schema { ValidateFunc: validation.StringInSlice([]string{"request", "reply"}, false), Description: fmt.Sprintf("Specifies the ICMP echo type for the health check (`request` or `reply`). %s Default: `reply`.", renderAvailableDocumentationValuesStringSlice([]string{"request", "reply"})), }, + "health_check_direction": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"unidirectional", "bidirectional"}, false), + Description: fmt.Sprintf("Specifies the direction for the health check (`unidirectional` or `bidirectional`). %s Default: `unidirectional`.", renderAvailableDocumentationValuesStringSlice([]string{"unidirectional", "bidirectional"})), + }, + "health_check_rate": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"low", "mid", "high"}, false), + Description: fmt.Sprintf("Specifies the ICMP rate for the health check (`low`, `mid` or `high`). %s Default: `mid`.", renderAvailableDocumentationValuesStringSlice([]string{"low", "mid", "high"})), + }, "psk": { Type: schema.TypeString, Optional: true, From c45c4ba3e5473859e03b574064fb37da24983c68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 23:08:32 +0000 Subject: [PATCH 054/264] build(deps): bump golangci/golangci-lint-action from 3 to 4 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ed80ce727f..e37f1c760f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: with: go-version-file: 'tools/go.mod' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest args: "--config .golintci.yml" From e249b5d41178b04ab2412ea85e0bef17a3a9edff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 9 Feb 2024 23:08:47 +0000 Subject: [PATCH 055/264] add CHANGELOG for #3115 --- .changelog/3115.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3115.txt diff --git a/.changelog/3115.txt b/.changelog/3115.txt new file mode 100644 index 0000000000..51eab7b17d --- /dev/null +++ b/.changelog/3115.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump golangci/golangci-lint-action from 3 to 4 +``` From 27f1a9766eacbfbec0c4deccd439ee4ffa724dda Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sat, 10 Feb 2024 00:15:15 +0000 Subject: [PATCH 056/264] Update CHANGELOG.md for #3115 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 246cc2d401..79321baa19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ DEPENDENCIES: * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) +* provider: bump golangci/golangci-lint-action from 3 to 4 ([#3115](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3115)) ## 4.24.0 (February 7th, 2023) From ab7fcd8cda10865d4fcdc3f932fb1ab5ef05befe Mon Sep 17 00:00:00 2001 From: daku10 <52423669+daku10@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:10:03 +0900 Subject: [PATCH 057/264] Update internal/sdkv2provider/resource_cloudflare_pages_project_test.go Co-authored-by: Jacob Bednarz --- .../sdkv2provider/resource_cloudflare_pages_project_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sdkv2provider/resource_cloudflare_pages_project_test.go b/internal/sdkv2provider/resource_cloudflare_pages_project_test.go index ca8bfbca59..9b8d5f7211 100644 --- a/internal/sdkv2provider/resource_cloudflare_pages_project_test.go +++ b/internal/sdkv2provider/resource_cloudflare_pages_project_test.go @@ -205,7 +205,7 @@ func TestAccCloudflarePagesProject_BuildConfig(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(name, "name", rnd), resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), - resource.TestCheckResourceAttr(name, "build_config.0.builld_caching", "true"), + resource.TestCheckResourceAttr(name, "build_config.0.build_caching", "true"), resource.TestCheckResourceAttr(name, "build_config.0.build_command", "npm run build"), resource.TestCheckResourceAttr(name, "build_config.0.destination_dir", "build"), resource.TestCheckResourceAttr(name, "build_config.0.root_dir", "/"), From d9a8afd3f597878caabad8be480ee7198089b403 Mon Sep 17 00:00:00 2001 From: Scott Goodhew Date: Mon, 12 Feb 2024 11:49:52 +0000 Subject: [PATCH 058/264] resource/cloudflare_custom_pages: Remove always_online This page is never generated anymore. --- .changelog/3117.txt | 3 +++ docs/resources/custom_pages.md | 2 +- internal/sdkv2provider/schema_cloudflare_custom_pages.go | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .changelog/3117.txt diff --git a/.changelog/3117.txt b/.changelog/3117.txt new file mode 100644 index 0000000000..7000483954 --- /dev/null +++ b/.changelog/3117.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +resource/cloudflare_custom_pages: Removed the `always_online` variant. This page is never generated anymore, if a requested page is unavailable in the archive the error page that would have been shown if always online wasn't enabled is shown. +``` diff --git a/docs/resources/custom_pages.md b/docs/resources/custom_pages.md index 024108144f..a05812878c 100644 --- a/docs/resources/custom_pages.md +++ b/docs/resources/custom_pages.md @@ -24,7 +24,7 @@ resource "cloudflare_custom_pages" "example" { ### Required -- `type` (String) The type of custom page you wish to update. Available values: `basic_challenge`, `waf_challenge`, `waf_block`, `ratelimit_block`, `country_challenge`, `ip_block`, `under_attack`, `500_errors`, `1000_errors`, `always_online`, `managed_challenge`. +- `type` (String) The type of custom page you wish to update. Available values: `basic_challenge`, `waf_challenge`, `waf_block`, `ratelimit_block`, `country_challenge`, `ip_block`, `under_attack`, `500_errors`, `1000_errors`, `managed_challenge`. - `url` (String) URL of where the custom page source is located. ### Optional diff --git a/internal/sdkv2provider/schema_cloudflare_custom_pages.go b/internal/sdkv2provider/schema_cloudflare_custom_pages.go index 52b673b671..67cbc4fcda 100644 --- a/internal/sdkv2provider/schema_cloudflare_custom_pages.go +++ b/internal/sdkv2provider/schema_cloudflare_custom_pages.go @@ -35,7 +35,6 @@ func resourceCloudflareCustomPagesSchema() map[string]*schema.Schema { "under_attack", "500_errors", "1000_errors", - "always_online", "managed_challenge", }, true), Description: fmt.Sprintf("The type of custom page you wish to update. %s", renderAvailableDocumentationValuesStringSlice([]string{ @@ -48,7 +47,6 @@ func resourceCloudflareCustomPagesSchema() map[string]*schema.Schema { "under_attack", "500_errors", "1000_errors", - "always_online", "managed_challenge", })), }, From e9c89a19b6f06cc67ff6d879076b410eff1e290a Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 12 Feb 2024 20:46:36 +0000 Subject: [PATCH 059/264] Update CHANGELOG.md for #3117 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79321baa19..066f0ab1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.25.0 (Unreleased) +BREAKING CHANGES: + +* resource/cloudflare_custom_pages: Removed the `always_online` variant. This page is never generated anymore, if a requested page is unavailable in the archive the error page that would have been shown if always online wasn't enabled is shown. ([#3117](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3117)) + DEPENDENCIES: * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) From 2d1319c186dcd382b97fa01a23303eb28d2a8ead Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 13 Feb 2024 04:38:12 +0000 Subject: [PATCH 060/264] Update CHANGELOG.md for #3110 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 066f0ab1c0..2a4e736e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ BREAKING CHANGES: * resource/cloudflare_custom_pages: Removed the `always_online` variant. This page is never generated anymore, if a requested page is unavailable in the archive the error page that would have been shown if always online wasn't enabled is shown. ([#3117](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3117)) +ENHANCEMENTS: + +* resource/pages_project: Add `build_caching` attribute ([#3110](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3110)) + DEPENDENCIES: * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) From f39db794ae1ac075203b8d6a7c816abcd3c92498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:05:03 +0000 Subject: [PATCH 061/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.24.1...v1.25.0) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.26.6...config/v1.27.0) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.16.16...v1.17.0) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.48.1...service/s3/v1.49.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 36 ++++++++++++++--------------- go.sum | 72 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/go.mod b/go.mod index 2ed435cf9b..c094e7e0cf 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.24.1 - github.com/aws/aws-sdk-go-v2/config v1.26.6 - github.com/aws/aws-sdk-go-v2/credentials v1.16.16 - github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 + github.com/aws/aws-sdk-go-v2 v1.25.0 + github.com/aws/aws-sdk-go-v2/config v1.27.0 + github.com/aws/aws-sdk-go-v2/credentials v1.17.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -50,20 +50,20 @@ require ( require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect - github.com/aws/smithy-go v1.19.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 // indirect + github.com/aws/smithy-go v1.20.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/goccy/go-json v0.10.2 // indirect diff --git a/go.sum b/go.sum index 700f557131..de6f3255fe 100644 --- a/go.sum +++ b/go.sum @@ -9,42 +9,42 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU= -github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= -github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o= -github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4= -github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8= -github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 h1:5oE2WzJE56/mVveuDZPJESKlg/00AaS2pY2QZcnxg4M= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10/go.mod h1:FHbKWQtRBYUz4vO5WBWjzMD2by126ny5y/1EoaWoLfI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 h1:L0ai8WICYHozIKK+OtPzVJBugL7culcuM4E4JOpIEm8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10/go.mod h1:byqfyxJBshFk0fF9YmK0M0ugIO8OWjzH2T3bPG4eGuA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 h1:5XNlsBsEvBZBMO6p82y+sqpWg8j5aBCe+5C2GBFgqBQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 h1:eajuO3nykDPdYicLlP3AGgOyVN3MOlFmZv7WGTuJPow= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.7/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 h1:QPMJf+Jw8E1l7zqhZmMlFw6w1NmfkfiSK8mS4zOx3BA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U= -github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= -github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ= +github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 h1:2UO6/nT1lCZq1LqM67Oa4tdgP1CvL1sLSxvuD+VrOeE= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0/go.mod h1:5zGj2eA85ClyedTDK+Whsu+w9yimnVIZvhvBKrDquM8= +github.com/aws/aws-sdk-go-v2/config v1.27.0 h1:J5sdGCAHuWKIXLeXiqr8II/adSvetkx0qdZwdbXXpb0= +github.com/aws/aws-sdk-go-v2/config v1.27.0/go.mod h1:cfh8v69nuSUohNFMbIISP2fhmblGmYEOKs5V53HiHnk= +github.com/aws/aws-sdk-go-v2/credentials v1.17.0 h1:lMW2x6sKBsiAJrpi1doOXqWFyEPoE886DTb1X0wb7So= +github.com/aws/aws-sdk-go-v2/credentials v1.17.0/go.mod h1:uT41FIH8cCIxOdUYIL0PYyHlL1NoneDuDSCwg5VE/5o= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 h1:xWCwjjvVz2ojYTP4kBKUuUh9ZrXfcAXpflhOUUeXg1k= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0/go.mod h1:j3fACuqXg4oMTQOR2yY7m0NmJY0yBK4L4sLsRXq1Ins= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0/go.mod h1:D+duLy2ylgatV+yTlQ8JTuLfDD0BnFvnQRc+o6tbZ4M= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 h1:ks7KGMVUMoDzcxNWUlEdI+/lokMFD136EL6DWmUOV80= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0/go.mod h1:hL6BWM/d/qz113fVitZjbXR0E+RCTU1+x+1Idyn5NgE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 h1:TkbRExyKSVHELwG9gz2+gql37jjec2R5vus9faTomwE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0/go.mod h1:T3/9xMKudHhnj8it5EqIrhvv11tVZqWYkKcot+BFStc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 h1:a33HuFlO0KsveiP90IUJh8Xr/cx9US2PqkSroaLc+o8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0/go.mod h1:SxIkWpByiGbhbHYTo9CMTUnx2G4p4ZQMrDPcRRy//1c= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 h1:UiSyK6ent6OKpkMJN3+k5HZ4sk4UfchEaaW5wv7SblQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0/go.mod h1:l7kzl8n8DXoRyFz5cIMG70HnPauWa649TUhgw8Rq6lo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLTmFTmYfI+gkanz6da3vK8Kvj/5wkqnTHbuA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E= +github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0 h1:VfU15izXQjz4m9y1DkbY79iylIiuPwWtrram4cSpWEI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 h1:u6OkVDxtBPnxPkZ9/63ynEe+8kHbtS5IfaC4PzVxzWM= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.0/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 h1:6DL0qu5+315wbsAEEmzK+P9leRwNbkp+lGjPC+CEvb8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0/go.mod h1:olUAyg+FaoFaL/zFaeQQONjOZ9HXoxgvI/c7mQTYz7M= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 h1:cjTRjh700H36MQ8M0LnDn33W3JmwC77mdxIIyPWCdpM= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.0/go.mod h1:nXfOBMWPokIbOY+Gi7a1psWMSvskUCemZzI+SMB7Akc= +github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= +github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= From a60325b4f0280f25b611fac8a77ff3baa8d39001 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 Feb 2024 23:07:06 +0000 Subject: [PATCH 062/264] add CHANGELOG for #3118 --- .changelog/3118.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .changelog/3118.txt diff --git a/.changelog/3118.txt b/.changelog/3118.txt new file mode 100644 index 0000000000..ab687ddf83 --- /dev/null +++ b/.changelog/3118.txt @@ -0,0 +1,15 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 +``` +```release-note:dependency +provider:
  • Feature: bump internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
  • +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 +``` From 08a713d47e5f6d814c31273c2582f4bc9efa1eec Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 13 Feb 2024 23:23:58 +0000 Subject: [PATCH 063/264] Update CHANGELOG.md for #3118 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a4e736e53..4bda0a5039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ ENHANCEMENTS: DEPENDENCIES: +* provider:
  • Feature: bump internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
  • ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) * provider: bump golangci/golangci-lint-action from 3 to 4 ([#3115](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3115)) From 64a51368bd388bd3d32d49898c7ed591574fcb4c Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 14 Feb 2024 10:24:19 +1100 Subject: [PATCH 064/264] Update 3118.txt --- .changelog/3118.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/.changelog/3118.txt b/.changelog/3118.txt index ab687ddf83..dade127490 100644 --- a/.changelog/3118.txt +++ b/.changelog/3118.txt @@ -8,8 +8,5 @@ provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ``` ```release-note:dependency -provider:
  • Feature: bump internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
  • -``` -```release-note:dependency provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ``` From 0153b0d230055fcc71264808050b2f049c95329e Mon Sep 17 00:00:00 2001 From: Cyb3r-Jak3 Date: Tue, 13 Feb 2024 21:00:21 -0500 Subject: [PATCH 065/264] Add schema migrator for upgrading from 4.22 --- .changelog/3119.txt | 3 + .../service/email_routing_address/schema.go | 68 ++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .changelog/3119.txt diff --git a/.changelog/3119.txt b/.changelog/3119.txt new file mode 100644 index 0000000000..86102404c5 --- /dev/null +++ b/.changelog/3119.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_email_routing_address: add schema migrator +``` diff --git a/internal/framework/service/email_routing_address/schema.go b/internal/framework/service/email_routing_address/schema.go index 0c02c861cf..35828b7d56 100644 --- a/internal/framework/service/email_routing_address/schema.go +++ b/internal/framework/service/email_routing_address/schema.go @@ -2,7 +2,6 @@ package email_routing_address import ( "context" - "github.com/MakeNowJust/heredoc/v2" "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -55,3 +54,70 @@ func (r *EmailRoutingAddressResource) Schema(ctx context.Context, req resource.S }, } } + +func (r *EmailRoutingAddressResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader { + return map[int64]resource.StateUpgrader{ + // State upgrade implementation from 0 (prior state version) to 1 (Schema.Version) + 0: { + PriorSchema: &schema.Schema{ + Attributes: map[string]schema.Attribute{ + consts.AccountIDSchemaKey: schema.StringAttribute{ + MarkdownDescription: consts.AccountIDSchemaDescription, + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + consts.IDSchemaKey: schema.StringAttribute{ + MarkdownDescription: consts.IDSchemaDescription, + Computed: true, + }, + "tag": schema.StringAttribute{ + MarkdownDescription: "Destination address identifier.", + Computed: true, + }, + "email": schema.StringAttribute{ + Required: true, + MarkdownDescription: "The contact email address of the user.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "verified": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "The date and time the destination address has been verified. Null means not verified yet.", + }, + "created": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "The date and time the destination address has been created.", + }, + "modified": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "The date and time the destination address has been modified.", + }, + }, + }, + + StateUpgrader: func(ctx context.Context, req resource.UpgradeStateRequest, resp *resource.UpgradeStateResponse) { + var priorStateData EmailRoutingAddressModel + + resp.Diagnostics.Append(req.State.Get(ctx, &priorStateData)...) + + if resp.Diagnostics.HasError() { + return + } + + upgradedStateData := EmailRoutingAddressModel{ + AccountID: priorStateData.AccountID, + ID: priorStateData.ID, + Tag: priorStateData.ID, + Email: priorStateData.Email, + Verified: priorStateData.Verified, + Created: priorStateData.Created, + Modified: priorStateData.Modified, + } + resp.Diagnostics.Append(resp.State.Set(ctx, upgradedStateData)...) + }, + }, + } +} From 3cb2c64e762465adf2e52832678d4e8f9d48ee45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 23:12:22 +0000 Subject: [PATCH 066/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.87.0 to 0.88.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.87.0...v0.88.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c094e7e0cf..b52330270a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.87.0 + github.com/cloudflare/cloudflare-go v0.88.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index de6f3255fe..6591e38a94 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7N github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.87.0 h1:hLuXnDneECNpen4YwfA4+kcjyv8gsj30kOJsHPyw9pI= -github.com/cloudflare/cloudflare-go v0.87.0/go.mod h1:wYW/5UP02TUfBToa/yKbQHV+r6h1NnJ1Je7XjuGM4Jw= +github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= +github.com/cloudflare/cloudflare-go v0.88.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From a8ec09c2060658019e09502f2add7f4ed3e3ff08 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 Feb 2024 23:12:35 +0000 Subject: [PATCH 067/264] add CHANGELOG for #3122 --- .changelog/3122.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3122.txt diff --git a/.changelog/3122.txt b/.changelog/3122.txt new file mode 100644 index 0000000000..4d8d05c4e8 --- /dev/null +++ b/.changelog/3122.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.87.0 to 0.88.0 +``` From 3c2c61ebb2852c68ccc1c00e0a8ec739a30cf543 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 14 Feb 2024 23:55:27 +0000 Subject: [PATCH 068/264] Update CHANGELOG.md for #3122 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bda0a5039..20af6454fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,11 @@ ENHANCEMENTS: DEPENDENCIES: -* provider:
  • Feature: bump internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
  • ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.87.0 to 0.88.0 ([#3122](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3122)) * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) * provider: bump golangci/golangci-lint-action from 3 to 4 ([#3115](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3115)) From 3d275764f4f5fcb2372f626febea2f357f90607b Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 15 Feb 2024 14:50:26 +1100 Subject: [PATCH 069/264] `make docs` --- docs/resources/teams_account.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/resources/teams_account.md b/docs/resources/teams_account.md index 75b2b32e2b..a1478f5ef8 100644 --- a/docs/resources/teams_account.md +++ b/docs/resources/teams_account.md @@ -84,6 +84,7 @@ resource "cloudflare_teams_account" "example" { - `antivirus` (Block List, Max: 1) Configuration block for antivirus traffic scanning. (see [below for nested schema](#nestedblock--antivirus)) - `block_page` (Block List, Max: 1) Configuration for a custom block page. (see [below for nested schema](#nestedblock--block_page)) - `body_scanning` (Block List, Max: 1) Configuration for body scanning. (see [below for nested schema](#nestedblock--body_scanning)) +- `extended_email_matching` (Block List, Max: 1) Configuration for extended e-mail matching. (see [below for nested schema](#nestedblock--extended_email_matching)) - `fips` (Block List, Max: 1) Configure compliance with Federal Information Processing Standards. (see [below for nested schema](#nestedblock--fips)) - `logging` (Block List, Max: 1) (see [below for nested schema](#nestedblock--logging)) - `non_identity_browser_isolation_enabled` (Boolean) Enable non-identity onramp for Browser Isolation. Defaults to `false`. @@ -131,6 +132,14 @@ Required: - `inspection_mode` (String) Body scanning inspection mode. Available values: `deep`, `shallow`. + +### Nested Schema for `extended_email_matching` + +Required: + +- `enabled` (Boolean) Whether e-mails should be matched on all variants of user emails (with + or . modifiers) in Firewall policies. + + ### Nested Schema for `fips` From eeda847bac3c27c09f1cd08ad3dae542d32a3fd4 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 15 Feb 2024 14:51:02 +1100 Subject: [PATCH 070/264] `make docs` --- examples/resources/cloudflare_teams_account/resource.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/resources/cloudflare_teams_account/resource.tf b/examples/resources/cloudflare_teams_account/resource.tf index 2c020a1708..a4fab913c3 100644 --- a/examples/resources/cloudflare_teams_account/resource.tf +++ b/examples/resources/cloudflare_teams_account/resource.tf @@ -49,4 +49,8 @@ resource "cloudflare_teams_account" "example" { } } } + + extended_email_matching { + enabled = true + } } From 7e9285a151916dbdfd98acf7a81ca541b7559cda Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 15 Feb 2024 03:59:49 +0000 Subject: [PATCH 071/264] Update CHANGELOG.md for #3089 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20af6454fe..a9d77976cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ BREAKING CHANGES: ENHANCEMENTS: +* resource/cloudflare_teams_account: Add support for extended e-mail matching ([#3089](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3089)) * resource/pages_project: Add `build_caching` attribute ([#3110](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3110)) DEPENDENCIES: From 950bb95f2f55a00865da230ab87ad4ead1a94370 Mon Sep 17 00:00:00 2001 From: docsbot Date: Thu, 15 Feb 2024 04:01:44 +0000 Subject: [PATCH 072/264] build registry documentation --- docs/resources/pages_project.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/resources/pages_project.md b/docs/resources/pages_project.md index 4d4ac1a2cd..ed0de596e2 100644 --- a/docs/resources/pages_project.md +++ b/docs/resources/pages_project.md @@ -227,6 +227,7 @@ resource "cloudflare_pages_project" "deployment_configs" { Optional: +- `build_caching` (Boolean) Enable build caching for the project. - `build_command` (String) Command used to build project. - `destination_dir` (String) Output directory of the build. - `root_dir` (String) Your project's root directory, where Cloudflare runs the build command. If your site is not in a subdirectory, leave this path value empty. From fb2fe3b0eeb4e44eec1450b130fd77cf7961168c Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 15 Feb 2024 04:25:15 +0000 Subject: [PATCH 073/264] Update CHANGELOG.md for #3119 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d77976cb..42dd1828ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ ENHANCEMENTS: * resource/cloudflare_teams_account: Add support for extended e-mail matching ([#3089](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3089)) * resource/pages_project: Add `build_caching` attribute ([#3110](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3110)) +BUG FIXES: + +* resource/cloudflare_email_routing_address: add schema migrator ([#3119](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3119)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) From 030a18f4590d081c684c13eff49101dcfe473569 Mon Sep 17 00:00:00 2001 From: Russell Kerns Date: Mon, 5 Feb 2024 15:28:07 -0600 Subject: [PATCH 074/264] AUTH-5608 added warp auth fields to access organizations and apps --- .changelog/3103.txt | 7 +++++++ .../resource_cloudflare_access_application.go | 3 +++ .../resource_cloudflare_access_application_test.go | 3 +++ .../resource_cloudflare_access_organization.go | 4 ++++ .../resource_cloudflare_access_organization_test.go | 4 ++++ .../schema_cloudflare_access_application.go | 8 +++++++- .../schema_cloudflare_access_organization.go | 10 ++++++++++ 7 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .changelog/3103.txt diff --git a/.changelog/3103.txt b/.changelog/3103.txt new file mode 100644 index 0000000000..e47e759177 --- /dev/null +++ b/.changelog/3103.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +resource/cloudflare_access_application: adds the ability to set allow_authenticate_via_warp. +``` + +```release-note:enhancement +resource/cloudflare_access_organization: adds the ability to set allow_authenticate_via_warp and warp_auth_session_duration. +``` \ No newline at end of file diff --git a/internal/sdkv2provider/resource_cloudflare_access_application.go b/internal/sdkv2provider/resource_cloudflare_access_application.go index c8ac4dc227..6564cf08a4 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application.go @@ -53,6 +53,7 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re SkipInterstitial: cloudflare.BoolPtr(d.Get("skip_interstitial").(bool)), AppLauncherVisible: cloudflare.BoolPtr(d.Get("app_launcher_visible").(bool)), ServiceAuth401Redirect: cloudflare.BoolPtr(d.Get("service_auth_401_redirect").(bool)), + AllowAuthenticateViaWarp: cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)), } if value, ok := d.GetOk("allowed_idps"); ok { @@ -159,6 +160,7 @@ func resourceCloudflareAccessApplicationRead(ctx context.Context, d *schema.Reso d.Set("bg_color", accessApplication.AccessAppLauncherCustomization.BackgroundColor) d.Set("header_bg_color", accessApplication.AccessAppLauncherCustomization.HeaderBackgroundColor) d.Set("app_launcher_logo_url", accessApplication.AccessAppLauncherCustomization.LogoURL) + d.Set("allow_authenticate_via_warp", accessApplication.AllowAuthenticateViaWarp) if _, ok := d.GetOk("footer_links"); ok { footerLinks := convertFooterLinksStructToSchema(d, accessApplication.AccessAppLauncherCustomization.FooterLinks) @@ -213,6 +215,7 @@ func resourceCloudflareAccessApplicationUpdate(ctx context.Context, d *schema.Re SkipInterstitial: cloudflare.BoolPtr(d.Get("skip_interstitial").(bool)), AppLauncherVisible: cloudflare.BoolPtr(d.Get("app_launcher_visible").(bool)), ServiceAuth401Redirect: cloudflare.BoolPtr(d.Get("service_auth_401_redirect").(bool)), + AllowAuthenticateViaWarp: cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)), } if appType != "saas" { diff --git a/internal/sdkv2provider/resource_cloudflare_access_application_test.go b/internal/sdkv2provider/resource_cloudflare_access_application_test.go index 7f113e1c98..5d91578899 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application_test.go @@ -97,6 +97,7 @@ func TestAccCloudflareAccessApplication_BasicZone(t *testing.T) { resource.TestCheckResourceAttr(name, "cors_headers.#", "0"), resource.TestCheckResourceAttr(name, "saas_app.#", "0"), resource.TestCheckResourceAttr(name, "auto_redirect_to_identity", "false"), + resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "true"), ), }, }, @@ -126,6 +127,7 @@ func TestAccCloudflareAccessApplication_BasicAccount(t *testing.T) { resource.TestCheckResourceAttr(name, "cors_headers.#", "0"), resource.TestCheckResourceAttr(name, "sass_app.#", "0"), resource.TestCheckResourceAttr(name, "auto_redirect_to_identity", "false"), + resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "true"), ), }, }, @@ -641,6 +643,7 @@ resource "cloudflare_access_application" "%[1]s" { type = "self_hosted" session_duration = "24h" auto_redirect_to_identity = false + allow_authenticate_via_warp = true } `, rnd, domain, identifier.Type, identifier.Identifier) } diff --git a/internal/sdkv2provider/resource_cloudflare_access_organization.go b/internal/sdkv2provider/resource_cloudflare_access_organization.go index 6772265be1..f6d6f3edd2 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_organization.go +++ b/internal/sdkv2provider/resource_cloudflare_access_organization.go @@ -61,6 +61,8 @@ func resourceCloudflareAccessOrganizationRead(ctx context.Context, d *schema.Res d.Set("user_seat_expiration_inactive_time", organization.UserSeatExpirationInactiveTime) d.Set("auto_redirect_to_identity", organization.AutoRedirectToIdentity) d.Set("session_duration", organization.SessionDuration) + d.Set("warp_auth_session_duration", organization.WarpAuthSessionDuration) + d.Set("allow_authenticate_via_warp", organization.AllowAuthenticateViaWarp) loginDesign := convertLoginDesignStructToSchema(ctx, d, &organization.LoginDesign) if loginDesignErr := d.Set("login_design", loginDesign); loginDesignErr != nil { @@ -87,6 +89,8 @@ func resourceCloudflareAccessOrganizationUpdate(ctx context.Context, d *schema.R UserSeatExpirationInactiveTime: d.Get("user_seat_expiration_inactive_time").(string), AutoRedirectToIdentity: cloudflare.BoolPtr(d.Get("auto_redirect_to_identity").(bool)), SessionDuration: cloudflare.StringPtr(d.Get("session_duration").(string)), + WarpAuthSessionDuration: cloudflare.StringPtr(d.Get("warp_auth_session_duration").(string)), + AllowAuthenticateViaWarp: cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)), } loginDesign := convertLoginDesignSchemaToStruct(d) updatedAccessOrganization.LoginDesign = *loginDesign diff --git a/internal/sdkv2provider/resource_cloudflare_access_organization_test.go b/internal/sdkv2provider/resource_cloudflare_access_organization_test.go index 5141f2ff19..e474791736 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_organization_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_organization_test.go @@ -37,6 +37,8 @@ func TestAccCloudflareAccessOrganization(t *testing.T) { resource.TestCheckResourceAttr(name, "login_design.0.header_text", "My header text"), resource.TestCheckResourceAttr(name, "login_design.0.footer_text", "My footer text"), resource.TestCheckResourceAttr(name, "session_duration", "12h"), + resource.TestCheckResourceAttr(name, "warp_auth_session_duration", "36h"), + resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "false"), ), ResourceName: name, ImportState: true, @@ -86,6 +88,8 @@ func testAccCloudflareAccessOrganizationConfigBasic(rnd, accountID string) strin user_seat_expiration_inactive_time = "1460h" auto_redirect_to_identity = false session_duration = "12h" + warp_auth_session_duration = "36h" + allow_authenticate_via_warp = false login_design { background_color = "#FFFFFF" diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 518619405f..5934ab9c4a 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -2,9 +2,10 @@ package sdkv2provider import ( "fmt" - "github.com/cloudflare/cloudflare-go" "time" + "github.com/cloudflare/cloudflare-go" + "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -386,6 +387,11 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { }, }, }, + "allow_authenticate_via_warp": { + Type: schema.TypeBool, + Optional: true, + Description: "When set to true, users can authenticate to this application using their WARP session. When set to false this application will always require direct IdP authentication. This setting always overrides the organization setting for WARP authentication.", + }, } } diff --git a/internal/sdkv2provider/schema_cloudflare_access_organization.go b/internal/sdkv2provider/schema_cloudflare_access_organization.go index e381c3bd46..23a004892e 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_organization.go +++ b/internal/sdkv2provider/schema_cloudflare_access_organization.go @@ -121,6 +121,16 @@ func resourceCloudflareAccessOrganizationSchema() map[string]*schema.Schema { }, }, }, + "allow_authenticate_via_warp": { + Type: schema.TypeBool, + Optional: true, + Description: "When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.", + }, + "warp_auth_session_duration": { + Type: schema.TypeString, + Optional: true, + Description: "The amount of time that tokens issued for applications will be valid. Must be in the format 30m or 2h45m. Valid time units are: m, h.", + }, } } From 9ce4fb365bdb5eb3b4dbc6603cad39083fe52e0a Mon Sep 17 00:00:00 2001 From: Russell Kerns Date: Thu, 15 Feb 2024 14:41:44 -0600 Subject: [PATCH 075/264] AUTH-5608 - only send allow_authenticate_via_warp on apps if it is in the payload --- .../sdkv2provider/resource_cloudflare_access_application.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/sdkv2provider/resource_cloudflare_access_application.go b/internal/sdkv2provider/resource_cloudflare_access_application.go index 6564cf08a4..7a522418b4 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application.go @@ -53,7 +53,10 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re SkipInterstitial: cloudflare.BoolPtr(d.Get("skip_interstitial").(bool)), AppLauncherVisible: cloudflare.BoolPtr(d.Get("app_launcher_visible").(bool)), ServiceAuth401Redirect: cloudflare.BoolPtr(d.Get("service_auth_401_redirect").(bool)), - AllowAuthenticateViaWarp: cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)), + } + + if _, ok := d.GetOk("allow_authenticate_via_warp"); ok { + newAccessApplication.AllowAuthenticateViaWarp = cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)) } if value, ok := d.GetOk("allowed_idps"); ok { From 42c87416f806439c3e377e56afdcc70cbedb4588 Mon Sep 17 00:00:00 2001 From: Rex Scaria Date: Thu, 15 Feb 2024 18:50:34 -0500 Subject: [PATCH 076/264] feat: added support for notification settings in teams antivirus settings --- .changelog/3124.txt | 3 +++ docs/resources/teams_account.md | 19 +++++++++++++++++++ .../cloudflare_teams_account/resource.tf | 5 +++++ .../resource_cloudflare_teams_accounts.go | 14 +++++++++++--- ...resource_cloudflare_teams_accounts_test.go | 12 ++++++++++++ .../schema_cloudflare_teams_accounts.go | 9 +++++++++ 6 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 .changelog/3124.txt diff --git a/.changelog/3124.txt b/.changelog/3124.txt new file mode 100644 index 0000000000..089993b489 --- /dev/null +++ b/.changelog/3124.txt @@ -0,0 +1,3 @@ +0.```release-note:dependency +resource/cloudflare_teams_accounts: Added notification settings to teams antivirus settings +``` diff --git a/docs/resources/teams_account.md b/docs/resources/teams_account.md index a1478f5ef8..78971fa0be 100644 --- a/docs/resources/teams_account.md +++ b/docs/resources/teams_account.md @@ -34,6 +34,11 @@ resource "cloudflare_teams_account" "example" { enabled_download_phase = true enabled_upload_phase = false fail_closed = true + notification_settings { + enabled = true + message = "you are blocked" + support_url = "https://hello.com/" + } } fips { @@ -108,6 +113,20 @@ Required: - `enabled_upload_phase` (Boolean) Scan on file upload. - `fail_closed` (Boolean) Block requests for files that cannot be scanned. +Optional: + +- `notification_settings` (Block List, Max: 1) Set notifications for antivirus. (see [below for nested schema](#nestedblock--antivirus--notification_settings)) + + +### Nested Schema for `antivirus.notification_settings` + +Optional: + +- `enabled` (Boolean) Enable notification settings. +- `message` (String) Notification content. +- `support_url` (String) Support URL to show in the notification. + + ### Nested Schema for `block_page` diff --git a/examples/resources/cloudflare_teams_account/resource.tf b/examples/resources/cloudflare_teams_account/resource.tf index a4fab913c3..aa537f5870 100644 --- a/examples/resources/cloudflare_teams_account/resource.tf +++ b/examples/resources/cloudflare_teams_account/resource.tf @@ -18,6 +18,11 @@ resource "cloudflare_teams_account" "example" { enabled_download_phase = true enabled_upload_phase = false fail_closed = true + notification_settings { + enabled = true + message = "you are blocked" + support_url = "https://hello.com/" + } } fips { diff --git a/internal/sdkv2provider/resource_cloudflare_teams_accounts.go b/internal/sdkv2provider/resource_cloudflare_teams_accounts.go index b4a2db7557..a138d33359 100644 --- a/internal/sdkv2provider/resource_cloudflare_teams_accounts.go +++ b/internal/sdkv2provider/resource_cloudflare_teams_accounts.go @@ -310,11 +310,15 @@ func inflateBodyScanningConfig(bodyScanning interface{}) *cloudflare.TeamsBodySc } func flattenAntivirusConfig(antivirusConfig *cloudflare.TeamsAntivirus) []interface{} { - return []interface{}{map[string]interface{}{ + settings := map[string]interface{}{ "enabled_download_phase": antivirusConfig.EnabledDownloadPhase, "enabled_upload_phase": antivirusConfig.EnabledUploadPhase, "fail_closed": antivirusConfig.FailClosed, - }} + } + if antivirusConfig.NotificationSettings != nil { + settings["notification_settings"] = flattenTeamsNotificationSettings(antivirusConfig.NotificationSettings) + } + return []interface{}{settings} } func flattenTeamsDeviceSettings(deviceSettings *cloudflare.TeamsDeviceSettings) []interface{} { @@ -333,11 +337,15 @@ func inflateAntivirusConfig(antivirus interface{}) *cloudflare.TeamsAntivirus { } avMap := avList[0].(map[string]interface{}) - return &cloudflare.TeamsAntivirus{ + settings := &cloudflare.TeamsAntivirus{ EnabledDownloadPhase: avMap["enabled_download_phase"].(bool), EnabledUploadPhase: avMap["enabled_upload_phase"].(bool), FailClosed: avMap["fail_closed"].(bool), } + if ns, ok := avMap["notification_settings"]; ok { + settings.NotificationSettings = inflateTeamsNotificationSettings(ns.([]interface{})) + } + return settings } func flattenFIPSConfig(fips *cloudflare.TeamsFIPS) []interface{} { diff --git a/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go b/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go index 66c6d441d3..6470fb8c33 100644 --- a/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go +++ b/internal/sdkv2provider/resource_cloudflare_teams_accounts_test.go @@ -42,6 +42,13 @@ func TestAccCloudflareTeamsAccounts_ConfigurationBasic(t *testing.T) { resource.TestCheckResourceAttr(name, "block_page.0.mailto_address", "test@cloudflare.com"), resource.TestCheckResourceAttr(name, "block_page.0.background_color", "#000000"), resource.TestCheckResourceAttr(name, "block_page.0.logo_path", "https://example.com"), + resource.TestCheckResourceAttr(name, "antivirus.0.enabled_download_phase", "true"), + resource.TestCheckResourceAttr(name, "antivirus.0.enabled_upload_phase", "false"), + resource.TestCheckResourceAttr(name, "antivirus.0.fail_closed", "true"), + resource.TestCheckResourceAttr(name, "antivirus.0.notification_settings.0.enabled", "true"), + resource.TestCheckResourceAttr(name, "antivirus.0.notification_settings.0.message", "msg"), + resource.TestCheckResourceAttr(name, "antivirus.0.notification_settings.0.support_url", "https://hello.com/"), + resource.TestCheckResourceAttr(name, "body_scanning.0.inspection_mode", "deep"), resource.TestCheckResourceAttr(name, "logging.0.redact_pii", "true"), resource.TestCheckResourceAttr(name, "logging.0.settings_by_rule_type.0.dns.0.log_all", "false"), @@ -91,6 +98,11 @@ resource "cloudflare_teams_account" "%[1]s" { enabled_download_phase = true enabled_upload_phase = false fail_closed = true + notification_settings { + enabled = true + message = "msg" + support_url = "https://hello.com/" + } } proxy { tcp = true diff --git a/internal/sdkv2provider/schema_cloudflare_teams_accounts.go b/internal/sdkv2provider/schema_cloudflare_teams_accounts.go index 1493df8c33..38ada8b860 100644 --- a/internal/sdkv2provider/schema_cloudflare_teams_accounts.go +++ b/internal/sdkv2provider/schema_cloudflare_teams_accounts.go @@ -205,6 +205,15 @@ var antivirusSchema = map[string]*schema.Schema{ Required: true, Description: "Block requests for files that cannot be scanned.", }, + "notification_settings": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Set notifications for antivirus", + Elem: &schema.Resource{ + Schema: notificationSettings, + }, + }, } var proxySchema = map[string]*schema.Schema{ From fb9e21fdb368f8f228fbbb27d5cc0bff0d04bad4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:39:20 +0000 Subject: [PATCH 077/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.49.0 to 1.50.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.49.0...service/s3/v1.50.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b52330270a..e9e2f0b34c 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.25.0 github.com/aws/aws-sdk-go-v2/config v1.27.0 github.com/aws/aws-sdk-go-v2/credentials v1.17.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 diff --git a/go.sum b/go.sum index 6591e38a94..c929790222 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLT github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E= -github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0 h1:VfU15izXQjz4m9y1DkbY79iylIiuPwWtrram4cSpWEI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.49.0/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0 h1:jZAdMD1ioZdqirzzVVRhpHHWJmcGGCn8JqDYBs5nmYA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 h1:u6OkVDxtBPnxPkZ9/63ynEe+8kHbtS5IfaC4PzVxzWM= github.com/aws/aws-sdk-go-v2/service/sso v1.19.0/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 h1:6DL0qu5+315wbsAEEmzK+P9leRwNbkp+lGjPC+CEvb8= From 73c89ba8b48f0822dfa2f56519c4817c82b3271f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 Feb 2024 23:39:35 +0000 Subject: [PATCH 078/264] add CHANGELOG for #3125 --- .changelog/3125.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3125.txt diff --git a/.changelog/3125.txt b/.changelog/3125.txt new file mode 100644 index 0000000000..fa18ca8c11 --- /dev/null +++ b/.changelog/3125.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.49.0 to 1.50.0 +``` From 52a3b94bbed219d6682041b14f210bf0e745cfb9 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sat, 17 Feb 2024 01:32:24 +0000 Subject: [PATCH 079/264] Update CHANGELOG.md for #3125 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42dd1828ea..dc61f97346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.49.0 to 1.50.0 ([#3125](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3125)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump github.com/cloudflare/cloudflare-go from 0.87.0 to 0.88.0 ([#3122](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3122)) * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) From 404d1343aa981b351514c8e66e5f871e04ac9a87 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 19 Feb 2024 14:19:17 +1100 Subject: [PATCH 080/264] remove from basic tests --- .../resource_cloudflare_access_application_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/sdkv2provider/resource_cloudflare_access_application_test.go b/internal/sdkv2provider/resource_cloudflare_access_application_test.go index 5d91578899..fc849e0e92 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application_test.go @@ -97,7 +97,7 @@ func TestAccCloudflareAccessApplication_BasicZone(t *testing.T) { resource.TestCheckResourceAttr(name, "cors_headers.#", "0"), resource.TestCheckResourceAttr(name, "saas_app.#", "0"), resource.TestCheckResourceAttr(name, "auto_redirect_to_identity", "false"), - resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "true"), + resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "false"), ), }, }, @@ -127,7 +127,7 @@ func TestAccCloudflareAccessApplication_BasicAccount(t *testing.T) { resource.TestCheckResourceAttr(name, "cors_headers.#", "0"), resource.TestCheckResourceAttr(name, "sass_app.#", "0"), resource.TestCheckResourceAttr(name, "auto_redirect_to_identity", "false"), - resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "true"), + resource.TestCheckResourceAttr(name, "allow_authenticate_via_warp", "false"), ), }, }, @@ -643,7 +643,6 @@ resource "cloudflare_access_application" "%[1]s" { type = "self_hosted" session_duration = "24h" auto_redirect_to_identity = false - allow_authenticate_via_warp = true } `, rnd, domain, identifier.Type, identifier.Identifier) } From ee9d416bb31c14258d1bd7a1a66a5d98a0424821 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 19 Feb 2024 14:27:59 +1100 Subject: [PATCH 081/264] update changelog --- .changelog/3124.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/3124.txt b/.changelog/3124.txt index 089993b489..8ce758a27c 100644 --- a/.changelog/3124.txt +++ b/.changelog/3124.txt @@ -1,3 +1,3 @@ -0.```release-note:dependency +```release-note:enhancement resource/cloudflare_teams_accounts: Added notification settings to teams antivirus settings ``` From 4e94dc6350b77e545428b1e7e8c9dd51ee558c15 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 19 Feb 2024 03:28:00 +0000 Subject: [PATCH 082/264] Update CHANGELOG.md for #3103 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc61f97346..da03d221ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ BREAKING CHANGES: ENHANCEMENTS: +* resource/cloudflare_access_application: adds the ability to set allow_authenticate_via_warp. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) +* resource/cloudflare_access_organization: adds the ability to set allow_authenticate_via_warp and warp_auth_session_duration. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) * resource/cloudflare_teams_account: Add support for extended e-mail matching ([#3089](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3089)) * resource/pages_project: Add `build_caching` attribute ([#3110](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3110)) From 389547d3baac03a008ecf510a2bb70625d05e1b1 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 19 Feb 2024 15:36:00 +1100 Subject: [PATCH 083/264] `make docs` --- docs/resources/teams_account.md | 6 +++--- examples/resources/cloudflare_teams_account/resource.tf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/resources/teams_account.md b/docs/resources/teams_account.md index 78971fa0be..c544883754 100644 --- a/docs/resources/teams_account.md +++ b/docs/resources/teams_account.md @@ -35,9 +35,9 @@ resource "cloudflare_teams_account" "example" { enabled_upload_phase = false fail_closed = true notification_settings { - enabled = true - message = "you are blocked" - support_url = "https://hello.com/" + enabled = true + message = "you are blocked" + support_url = "https://example.com/blocked" } } diff --git a/examples/resources/cloudflare_teams_account/resource.tf b/examples/resources/cloudflare_teams_account/resource.tf index aa537f5870..0692c5198f 100644 --- a/examples/resources/cloudflare_teams_account/resource.tf +++ b/examples/resources/cloudflare_teams_account/resource.tf @@ -19,9 +19,9 @@ resource "cloudflare_teams_account" "example" { enabled_upload_phase = false fail_closed = true notification_settings { - enabled = true - message = "you are blocked" - support_url = "https://hello.com/" + enabled = true + message = "you are blocked" + support_url = "https://example.com/blocked" } } From f1322d60031f4407dc2f0e3b0e6ed9b5baf6bbed Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 19 Feb 2024 04:39:53 +0000 Subject: [PATCH 084/264] Update CHANGELOG.md for #3124 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da03d221ec..475e462f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * resource/cloudflare_access_application: adds the ability to set allow_authenticate_via_warp. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) * resource/cloudflare_access_organization: adds the ability to set allow_authenticate_via_warp and warp_auth_session_duration. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) * resource/cloudflare_teams_account: Add support for extended e-mail matching ([#3089](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3089)) +* resource/cloudflare_teams_accounts: Added notification settings to teams antivirus settings ([#3124](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3124)) * resource/pages_project: Add `build_caching` attribute ([#3110](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3110)) BUG FIXES: From 953c28f6ad5719788f2ff3e3d6f5c1a1fc3687ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 23:39:12 +0000 Subject: [PATCH 085/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.0 to 1.50.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.0...service/s3/v1.50.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e9e2f0b34c..1629716052 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.25.0 github.com/aws/aws-sdk-go-v2/config v1.27.0 github.com/aws/aws-sdk-go-v2/credentials v1.17.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 diff --git a/go.sum b/go.sum index c929790222..70bf35794e 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLT github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0 h1:jZAdMD1ioZdqirzzVVRhpHHWJmcGGCn8JqDYBs5nmYA= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1 h1:bjpWJEXch7moIt3PX2r5XpGROsletl7enqG1Q3Te1Dc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 h1:u6OkVDxtBPnxPkZ9/63ynEe+8kHbtS5IfaC4PzVxzWM= github.com/aws/aws-sdk-go-v2/service/sso v1.19.0/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 h1:6DL0qu5+315wbsAEEmzK+P9leRwNbkp+lGjPC+CEvb8= From 6959f23799df004fadff93321a7a019bd5595b90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Feb 2024 23:39:29 +0000 Subject: [PATCH 086/264] add CHANGELOG for #3128 --- .changelog/3128.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3128.txt diff --git a/.changelog/3128.txt b/.changelog/3128.txt new file mode 100644 index 0000000000..afe8aac724 --- /dev/null +++ b/.changelog/3128.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.0 to 1.50.1 +``` From 548a6bbd6568dd28f36c0947873a5cfe624f0e0a Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 20 Feb 2024 01:25:58 +0000 Subject: [PATCH 087/264] Update CHANGELOG.md for #3128 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 475e462f0a..b82a03e991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.49.0 to 1.50.0 ([#3125](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3125)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.0 to 1.50.1 ([#3128](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3128)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump github.com/cloudflare/cloudflare-go from 0.87.0 to 0.88.0 ([#3122](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3122)) * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) From 76ad69ed37f886e4098b7fd6e90ecfa94eea7dc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 23:30:04 +0000 Subject: [PATCH 088/264] build(deps): bump the aws group with 3 updates Bumps the aws group with 3 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.0 to 1.27.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.0...config/v1.27.1) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.0 to 1.17.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.0...v1.17.1) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.1 to 1.50.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.1...service/s3/v1.50.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 1629716052..2f33555b9e 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.25.0 - github.com/aws/aws-sdk-go-v2/config v1.27.0 - github.com/aws/aws-sdk-go-v2/credentials v1.17.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1 + github.com/aws/aws-sdk-go-v2/config v1.27.1 + github.com/aws/aws-sdk-go-v2/credentials v1.17.1 + github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -60,9 +60,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.19.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.27.1 // indirect github.com/aws/smithy-go v1.20.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 70bf35794e..f8d280dad4 100644 --- a/go.sum +++ b/go.sum @@ -13,10 +13,10 @@ github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBW github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 h1:2UO6/nT1lCZq1LqM67Oa4tdgP1CvL1sLSxvuD+VrOeE= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0/go.mod h1:5zGj2eA85ClyedTDK+Whsu+w9yimnVIZvhvBKrDquM8= -github.com/aws/aws-sdk-go-v2/config v1.27.0 h1:J5sdGCAHuWKIXLeXiqr8II/adSvetkx0qdZwdbXXpb0= -github.com/aws/aws-sdk-go-v2/config v1.27.0/go.mod h1:cfh8v69nuSUohNFMbIISP2fhmblGmYEOKs5V53HiHnk= -github.com/aws/aws-sdk-go-v2/credentials v1.17.0 h1:lMW2x6sKBsiAJrpi1doOXqWFyEPoE886DTb1X0wb7So= -github.com/aws/aws-sdk-go-v2/credentials v1.17.0/go.mod h1:uT41FIH8cCIxOdUYIL0PYyHlL1NoneDuDSCwg5VE/5o= +github.com/aws/aws-sdk-go-v2/config v1.27.1 h1:oxvGd/cielb+oumJkQmXI0i5tQCRqfdCHV58AfE0pGY= +github.com/aws/aws-sdk-go-v2/config v1.27.1/go.mod h1:SpmaZYWeTF91NQcnnp2AScnZawBWwdkYCupHRNIhVSQ= +github.com/aws/aws-sdk-go-v2/credentials v1.17.1 h1:H4WlK2OnVotRmbVgS8Ww2Z4B3/dDHxDS7cW6EiCECN4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.1/go.mod h1:qTfT/OIE9RAVirZDq0PcEYOOM4Pkmf1Hrk1iInKRS4k= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 h1:xWCwjjvVz2ojYTP4kBKUuUh9ZrXfcAXpflhOUUeXg1k= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0/go.mod h1:j3fACuqXg4oMTQOR2yY7m0NmJY0yBK4L4sLsRXq1Ins= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw= @@ -35,14 +35,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLT github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1 h1:bjpWJEXch7moIt3PX2r5XpGROsletl7enqG1Q3Te1Dc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 h1:u6OkVDxtBPnxPkZ9/63ynEe+8kHbtS5IfaC4PzVxzWM= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.0/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 h1:6DL0qu5+315wbsAEEmzK+P9leRwNbkp+lGjPC+CEvb8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0/go.mod h1:olUAyg+FaoFaL/zFaeQQONjOZ9HXoxgvI/c7mQTYz7M= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 h1:cjTRjh700H36MQ8M0LnDn33W3JmwC77mdxIIyPWCdpM= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.0/go.mod h1:nXfOBMWPokIbOY+Gi7a1psWMSvskUCemZzI+SMB7Akc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2 h1:UxJGNZ+/VhocG50aui1p7Ub2NjDzijCpg8Y3NuznijM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.1 h1:GokXLGW3JkH/XzEVp1jDVRxty1eNGB7emkjDG1qxGK8= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.1/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1 h1:2oxSGiYNxTHsuRuPD9McWvcvR6s61G3ssZLyQzcxQL0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1/go.mod h1:olUAyg+FaoFaL/zFaeQQONjOZ9HXoxgvI/c7mQTYz7M= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.1 h1:QFT2KUWaVwwGi5/2sQNBOViFpLSkZmiyiHUxE2k6sOU= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.1/go.mod h1:nXfOBMWPokIbOY+Gi7a1psWMSvskUCemZzI+SMB7Akc= github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 2c28bec4099460c7bba319a4429908536bb7081c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 20 Feb 2024 23:30:21 +0000 Subject: [PATCH 089/264] add CHANGELOG for #3134 --- .changelog/3134.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changelog/3134.txt diff --git a/.changelog/3134.txt b/.changelog/3134.txt new file mode 100644 index 0000000000..a1e2960ae4 --- /dev/null +++ b/.changelog/3134.txt @@ -0,0 +1,9 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.0 to 1.27.1 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.0 to 1.17.1 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.1 to 1.50.2 +``` From 3531843b56628b50fcbc35307c9df55a0f5a37e4 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 20 Feb 2024 23:59:11 +0000 Subject: [PATCH 090/264] Update CHANGELOG.md for #3134 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b82a03e991..af932b8855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,10 +19,13 @@ BUG FIXES: DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.26.6 to 1.27.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.0 to 1.27.1 ([#3134](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3134)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.16.16 to 1.17.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.0 to 1.17.1 ([#3134](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3134)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.48.1 to 1.49.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.49.0 to 1.50.0 ([#3125](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3125)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.0 to 1.50.1 ([#3128](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3128)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.1 to 1.50.2 ([#3134](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3134)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.24.1 to 1.25.0 ([#3118](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3118)) * provider: bump github.com/cloudflare/cloudflare-go from 0.87.0 to 0.88.0 ([#3122](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3122)) * provider: bump golang.org/x/net from 0.20.0 to 0.21.0 ([#3108](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3108)) From 87f726384a8a50371ad26509f18f02a2d6ceef69 Mon Sep 17 00:00:00 2001 From: Alex Holland Date: Wed, 14 Feb 2024 10:19:58 -0500 Subject: [PATCH 091/264] AUTH-5770 terraform for access oidc saas applications --- .changelog/3133.txt | 3 + .../resource_cloudflare_access_application.go | 19 ++- ...urce_cloudflare_access_application_test.go | 119 +++++++++++++- .../schema_cloudflare_access_application.go | 153 ++++++++++++++---- 4 files changed, 254 insertions(+), 40 deletions(-) create mode 100644 .changelog/3133.txt diff --git a/.changelog/3133.txt b/.changelog/3133.txt new file mode 100644 index 0000000000..c3f676bda5 --- /dev/null +++ b/.changelog/3133.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_access_application: adds oidc saas application support +``` \ No newline at end of file diff --git a/internal/sdkv2provider/resource_cloudflare_access_application.go b/internal/sdkv2provider/resource_cloudflare_access_application.go index 7a522418b4..596b25014b 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application.go @@ -118,7 +118,24 @@ func resourceCloudflareAccessApplicationCreate(ctx context.Context, d *schema.Re d.SetId(accessApplication.ID) - return resourceCloudflareAccessApplicationRead(ctx, d, meta) + readApplication := resourceCloudflareAccessApplicationRead(ctx, d, meta) + + // client secret is only returned from the create request and should be stored in state + if accessApplication.SaasApplication != nil && accessApplication.SaasApplication.ClientSecret != "" { + rawSaasApp, ok := d.GetOk("saas_app") + if ok { + saasApp, ok := rawSaasApp.([]interface{}) + if ok { + saasAppMap, ok := saasApp[0].(map[string]interface{}) + if ok { + saasAppMap["client_secret"] = accessApplication.SaasApplication.ClientSecret + d.Set("saas_app", []interface{}{saasAppMap}) + } + } + } + } + + return readApplication } func resourceCloudflareAccessApplicationRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/internal/sdkv2provider/resource_cloudflare_access_application_test.go b/internal/sdkv2provider/resource_cloudflare_access_application_test.go index fc849e0e92..a823326ed2 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application_test.go @@ -164,7 +164,7 @@ func TestAccCloudflareAccessApplication_WithCORS(t *testing.T) { }) } -func TestAccCloudflareAccessApplication_WithSaas(t *testing.T) { +func TestAccCloudflareAccessApplication_WithSAMLSaas(t *testing.T) { rnd := generateRandomResourceName() name := fmt.Sprintf("cloudflare_access_application.%s", rnd) accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") @@ -177,7 +177,7 @@ func TestAccCloudflareAccessApplication_WithSaas(t *testing.T) { CheckDestroy: testAccCheckCloudflareAccessApplicationDestroy, Steps: []resource.TestStep{ { - Config: testAccCloudflareAccessApplicationConfigWithSaas(rnd, accountID), + Config: testAccCloudflareAccessApplicationConfigWithSAMLSaas(rnd, accountID), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), resource.TestCheckResourceAttr(name, "name", rnd), @@ -206,7 +206,7 @@ func TestAccCloudflareAccessApplication_WithSaas(t *testing.T) { }) } -func TestAccCloudflareAccessApplication_WithSaas_Import(t *testing.T) { +func TestAccCloudflareAccessApplication_WithSAMLSaas_Import(t *testing.T) { t.Parallel() accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") rnd := generateRandomResourceName() @@ -241,7 +241,7 @@ func TestAccCloudflareAccessApplication_WithSaas_Import(t *testing.T) { ProviderFactories: providerFactories, Steps: []resource.TestStep{ { - Config: testAccCloudflareAccessApplicationConfigWithSaas(rnd, accountID), + Config: testAccCloudflareAccessApplicationConfigWithSAMLSaas(rnd, accountID), Check: checkFn, }, { @@ -255,6 +255,95 @@ func TestAccCloudflareAccessApplication_WithSaas_Import(t *testing.T) { }) } +func TestAccCloudflareAccessApplication_WithOIDCSaas(t *testing.T) { + rnd := generateRandomResourceName() + name := fmt.Sprintf("cloudflare_access_application.%s", rnd) + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + ProviderFactories: providerFactories, + CheckDestroy: testAccCheckCloudflareAccessApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCloudflareAccessApplicationConfigWithOIDCSaas(rnd, accountID), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), + resource.TestCheckResourceAttr(name, "name", rnd), + resource.TestCheckResourceAttr(name, "type", "saas"), + resource.TestCheckResourceAttr(name, "session_duration", "24h"), + resource.TestCheckResourceAttr(name, "saas_app.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.auth_type", "oidc"), + resource.TestCheckResourceAttr(name, "saas_app.0.redirect_uris.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.redirect_uris.0", "https://saas-app.example/sso/oauth2/callback"), + resource.TestCheckResourceAttr(name, "saas_app.0.grant_types.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.grant_types.0", "authorization_code"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.#", "4"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.0", "email"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.1", "groups"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.2", "openid"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.3", "profile"), + resource.TestCheckResourceAttr(name, "saas_app.0.app_launcher_url", "https://saas-app.example/sso/login"), + resource.TestCheckResourceAttr(name, "saas_app.0.group_filter_regex", ".*"), + resource.TestCheckResourceAttrSet(name, "saas_app.0.client_secret"), + resource.TestCheckResourceAttrSet(name, "saas_app.0.public_key"), + ), + }, + }, + }) +} + +func TestAccCloudflareAccessApplication_WithOIDCSaas_Import(t *testing.T) { + t.Parallel() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + rnd := generateRandomResourceName() + name := "cloudflare_access_application." + rnd + + checkFn := resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), + resource.TestCheckResourceAttr(name, "name", rnd), + resource.TestCheckResourceAttr(name, "type", "saas"), + resource.TestCheckResourceAttr(name, "session_duration", "24h"), + resource.TestCheckResourceAttr(name, "saas_app.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.auth_type", "oidc"), + resource.TestCheckResourceAttr(name, "saas_app.0.redirect_uris.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.redirect_uris.0", "https://saas-app.example/sso/oauth2/callback"), + resource.TestCheckResourceAttr(name, "saas_app.0.grant_types.#", "1"), + resource.TestCheckResourceAttr(name, "saas_app.0.grant_types.0", "authorization_code"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.#", "4"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.0", "email"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.1", "groups"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.2", "openid"), + resource.TestCheckResourceAttr(name, "saas_app.0.scopes.3", "profile"), + resource.TestCheckResourceAttr(name, "saas_app.0.app_launcher_url", "https://saas-app.example/sso/login"), + resource.TestCheckResourceAttr(name, "saas_app.0.group_filter_regex", ".*"), + ) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAccount(t) + }, + ProviderFactories: providerFactories, + Steps: []resource.TestStep{ + { + Config: testAccCloudflareAccessApplicationConfigWithOIDCSaas(rnd, accountID), + Check: checkFn, + }, + { + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"saas_app.0.client_secret"}, + ResourceName: name, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + Check: checkFn, + }, + }, + }) +} + func TestAccCloudflareAccessApplication_WithAutoRedirectToIdentity(t *testing.T) { rnd := generateRandomResourceName() name := fmt.Sprintf("cloudflare_access_application.%s", rnd) @@ -666,7 +755,7 @@ resource "cloudflare_access_application" "%[1]s" { `, rnd, zoneID, domain) } -func testAccCloudflareAccessApplicationConfigWithSaas(rnd, accountID string) string { +func testAccCloudflareAccessApplicationConfigWithSAMLSaas(rnd, accountID string) string { return fmt.Sprintf(` resource "cloudflare_access_application" "%[1]s" { account_id = "%[2]s" @@ -699,6 +788,26 @@ resource "cloudflare_access_application" "%[1]s" { `, rnd, accountID) } +func testAccCloudflareAccessApplicationConfigWithOIDCSaas(rnd, accountID string) string { + return fmt.Sprintf(` +resource "cloudflare_access_application" "%[1]s" { + account_id = "%[2]s" + name = "%[1]s" + type = "saas" + session_duration = "24h" + saas_app { + auth_type = "oidc" + redirect_uris = ["https://saas-app.example/sso/oauth2/callback"] + grant_types = ["authorization_code"] + scopes = ["openid", "email", "profile", "groups"] + app_launcher_url = "https://saas-app.example/sso/login" + group_filter_regex = ".*" + } + auto_redirect_to_identity = false +} +`, rnd, accountID) +} + func testAccCloudflareAccessApplicationConfigWithAutoRedirectToIdentity(rnd, zoneID, domain string) string { return fmt.Sprintf(` resource "cloudflare_access_identity_provider" "%[1]s" { diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 5934ab9c4a..873194e9a9 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -150,20 +150,81 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { Description: "SaaS configuration for the Access Application.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + // shared values + "auth_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"oidc", "saml"}, false), + Description: "", + }, + "public_key": { + Type: schema.TypeString, + Computed: true, + Description: "The public certificate that will be used to verify identities.", + }, + + // OIDC options + "client_id": { + Type: schema.TypeString, + Computed: true, + Description: "The application client id", + }, + "client_secret": { + Type: schema.TypeString, + Computed: true, + Description: "The application client secret, only returned on initial apply", + }, + "redirect_uris": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "The permitted URL's for Cloudflare to return Authorization codes and Access/ID tokens", + }, + "grant_types": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "The OIDC flows supported by this application", + }, + "scopes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "Define the user information shared with access", + }, + "app_launcher_url": { + Type: schema.TypeString, + Optional: true, + Description: "The URL where this applications tile redirects users", + }, + "group_filter_regex": { + Type: schema.TypeString, + Optional: true, + Description: "A regex to filter Cloudflare groups returned in ID token and userinfo endpoint", + }, + + // SAML options "sp_entity_id": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "A globally unique name for an identity or service provider.", }, "consumer_service_url": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "The service provider's endpoint that is responsible for receiving and parsing a SAML assertion.", }, "name_id_format": { Type: schema.TypeString, Optional: true, - Default: "email", ValidateFunc: validation.StringInSlice([]string{"email", "id"}, false), Description: "The format of the name identifier sent to the SaaS application.", }, @@ -215,11 +276,6 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { Computed: true, Description: "The unique identifier for the SaaS application.", }, - "public_key": { - Type: schema.TypeString, - Computed: true, - Description: "The public certificate that will be used to verify identities.", - }, "sso_endpoint": { Type: schema.TypeString, Computed: true, @@ -492,15 +548,29 @@ func convertSAMLAttributeSchemaToStruct(data map[string]interface{}) cloudflare. func convertSaasSchemaToStruct(d *schema.ResourceData) *cloudflare.SaasApplication { SaasConfig := cloudflare.SaasApplication{} if _, ok := d.GetOk("saas_app"); ok { - SaasConfig.SPEntityID = d.Get("saas_app.0.sp_entity_id").(string) - SaasConfig.ConsumerServiceUrl = d.Get("saas_app.0.consumer_service_url").(string) - SaasConfig.NameIDFormat = d.Get("saas_app.0.name_id_format").(string) - SaasConfig.DefaultRelayState = d.Get("saas_app.0.default_relay_state").(string) - - customAttributes, _ := d.Get("saas_app.0.custom_attribute").([]interface{}) - for _, customAttributes := range customAttributes { - attributeAsMap := customAttributes.(map[string]interface{}) - SaasConfig.CustomAttributes = append(SaasConfig.CustomAttributes, convertSAMLAttributeSchemaToStruct(attributeAsMap)) + auth_type := "saml" + if raw_auth_type, ok := d.GetOk("saas_app.0.auth_type"); ok { + auth_type = raw_auth_type.(string) + } + SaasConfig.AuthType = auth_type + if auth_type == "oidc" { + SaasConfig.ClientID = d.Get("saas_app.0.client_id").(string) + SaasConfig.AppLauncherURL = d.Get("saas_app.0.app_launcher_url").(string) + SaasConfig.RedirectURIs = expandInterfaceToStringList(d.Get("saas_app.0.redirect_uris").(*schema.Set).List()) + SaasConfig.GrantTypes = expandInterfaceToStringList(d.Get("saas_app.0.grant_types").(*schema.Set).List()) + SaasConfig.Scopes = expandInterfaceToStringList(d.Get("saas_app.0.scopes").(*schema.Set).List()) + SaasConfig.GroupFilterRegex = d.Get("saas_app.0.group_filter_regex").(string) + } else { + SaasConfig.SPEntityID = d.Get("saas_app.0.sp_entity_id").(string) + SaasConfig.ConsumerServiceUrl = d.Get("saas_app.0.consumer_service_url").(string) + SaasConfig.NameIDFormat = d.Get("saas_app.0.name_id_format").(string) + SaasConfig.DefaultRelayState = d.Get("saas_app.0.default_relay_state").(string) + + customAttributes, _ := d.Get("saas_app.0.custom_attribute").([]interface{}) + for _, customAttributes := range customAttributes { + attributeAsMap := customAttributes.(map[string]interface{}) + SaasConfig.CustomAttributes = append(SaasConfig.CustomAttributes, convertSAMLAttributeSchemaToStruct(attributeAsMap)) + } } } return &SaasConfig @@ -597,23 +667,38 @@ func convertSaasStructToSchema(d *schema.ResourceData, app *cloudflare.SaasAppli if app == nil { return []interface{}{} } - m := map[string]interface{}{ - "sp_entity_id": app.SPEntityID, - "consumer_service_url": app.ConsumerServiceUrl, - "name_id_format": app.NameIDFormat, - "idp_entity_id": app.IDPEntityID, - "public_key": app.PublicKey, - "sso_endpoint": app.SSOEndpoint, - "default_relay_state": app.DefaultRelayState, - } + if app.AuthType == "oidc" { + m := map[string]interface{}{ + // client secret not handled here as it is only returned on create + "auth_type": app.AuthType, + "client_id": app.ClientID, + "redirect_uris": app.RedirectURIs, + "grant_types": app.GrantTypes, + "scopes": app.Scopes, + "public_key": app.PublicKey, + "group_filter_regex": app.GroupFilterRegex, + "app_launcher_url": app.AppLauncherURL, + } + return []interface{}{m} + } else { + m := map[string]interface{}{ + "sp_entity_id": app.SPEntityID, + "consumer_service_url": app.ConsumerServiceUrl, + "name_id_format": app.NameIDFormat, + "idp_entity_id": app.IDPEntityID, + "public_key": app.PublicKey, + "sso_endpoint": app.SSOEndpoint, + "default_relay_state": app.DefaultRelayState, + } - var customAttributes []interface{} - for _, attr := range app.CustomAttributes { - customAttributes = append(customAttributes, convertSAMLAttributeStructToSchema(attr)) - } - if len(customAttributes) != 0 { - m["custom_attribute"] = customAttributes - } + var customAttributes []interface{} + for _, attr := range app.CustomAttributes { + customAttributes = append(customAttributes, convertSAMLAttributeStructToSchema(attr)) + } + if len(customAttributes) != 0 { + m["custom_attribute"] = customAttributes + } - return []interface{}{m} + return []interface{}{m} + } } From 0ac29632c37abecf96ee1357d48c181797d06577 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 21 Feb 2024 02:47:51 +0000 Subject: [PATCH 092/264] Update CHANGELOG.md for #3133 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af932b8855..d81c39869f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ BREAKING CHANGES: ENHANCEMENTS: +* resource/cloudflare_access_application: adds oidc saas application support ([#3133](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3133)) * resource/cloudflare_access_application: adds the ability to set allow_authenticate_via_warp. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) * resource/cloudflare_access_organization: adds the ability to set allow_authenticate_via_warp and warp_auth_session_duration. ([#3103](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3103)) * resource/cloudflare_teams_account: Add support for extended e-mail matching ([#3089](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3089)) From c58feb69b94c19a1a295e29672a74b981ac846ac Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 21 Feb 2024 13:53:46 +1100 Subject: [PATCH 093/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d81c39869f..6acc0a9ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.25.0 (Unreleased) +## 4.26.0 (Unreleased) + +## 4.25.0 (February 21st, 2024) BREAKING CHANGES: From 6cc4534837c6b9dd981f054e778d9da99bc61db5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 23:56:15 +0000 Subject: [PATCH 094/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.25.0...v1.25.1) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.1...config/v1.27.2) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.2/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.1...v1.17.2) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.2...service/s3/v1.50.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 34 ++++++++++++++--------------- go.sum | 68 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/go.mod b/go.mod index 2f33555b9e..5e141221c7 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.25.0 - github.com/aws/aws-sdk-go-v2/config v1.27.1 - github.com/aws/aws-sdk-go-v2/credentials v1.17.1 - github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2 + github.com/aws/aws-sdk-go-v2 v1.25.1 + github.com/aws/aws-sdk-go-v2/config v1.27.2 + github.com/aws/aws-sdk-go-v2/credentials v1.17.2 + github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -50,20 +50,20 @@ require ( require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.19.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.27.1 // indirect - github.com/aws/smithy-go v1.20.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 // indirect + github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/goccy/go-json v0.10.2 // indirect diff --git a/go.sum b/go.sum index f8d280dad4..1cabe70490 100644 --- a/go.sum +++ b/go.sum @@ -9,42 +9,42 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ= -github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 h1:2UO6/nT1lCZq1LqM67Oa4tdgP1CvL1sLSxvuD+VrOeE= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0/go.mod h1:5zGj2eA85ClyedTDK+Whsu+w9yimnVIZvhvBKrDquM8= -github.com/aws/aws-sdk-go-v2/config v1.27.1 h1:oxvGd/cielb+oumJkQmXI0i5tQCRqfdCHV58AfE0pGY= -github.com/aws/aws-sdk-go-v2/config v1.27.1/go.mod h1:SpmaZYWeTF91NQcnnp2AScnZawBWwdkYCupHRNIhVSQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.1 h1:H4WlK2OnVotRmbVgS8Ww2Z4B3/dDHxDS7cW6EiCECN4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.1/go.mod h1:qTfT/OIE9RAVirZDq0PcEYOOM4Pkmf1Hrk1iInKRS4k= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 h1:xWCwjjvVz2ojYTP4kBKUuUh9ZrXfcAXpflhOUUeXg1k= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0/go.mod h1:j3fACuqXg4oMTQOR2yY7m0NmJY0yBK4L4sLsRXq1Ins= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0/go.mod h1:D+duLy2ylgatV+yTlQ8JTuLfDD0BnFvnQRc+o6tbZ4M= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 h1:ks7KGMVUMoDzcxNWUlEdI+/lokMFD136EL6DWmUOV80= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0/go.mod h1:hL6BWM/d/qz113fVitZjbXR0E+RCTU1+x+1Idyn5NgE= +github.com/aws/aws-sdk-go-v2 v1.25.1 h1:P7hU6A5qEdmajGwvae/zDkOq+ULLC9tQBTwqqiwFGpI= +github.com/aws/aws-sdk-go-v2 v1.25.1/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= +github.com/aws/aws-sdk-go-v2/config v1.27.2 h1:XnMKB9JRjfnxg9ZkUic4MiapnWJISWRo8HVM+7nx9qQ= +github.com/aws/aws-sdk-go-v2/config v1.27.2/go.mod h1:z/XIktFoVIKNEqX/811vx4eHetrC3tAkgJKL1ZY/KM4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.2 h1:tCZXWtH0HiIEZ50NJ7/QEaXmuzEd36L+2JUiZkp2nsc= +github.com/aws/aws-sdk-go-v2/credentials v1.17.2/go.mod h1:7Zo+D6q4auSIo3p4EItuTKTk7J+RqjASISZqLvmUgpc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 h1:lk1ZZFbdb24qpOwVC1AwYNrswUjAxeyey6kFBVANudQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1/go.mod h1:/xJ6x1NehNGCX4tvGzzj2bq5TBOT/Yxq+qbL9Jpx2Vk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 h1:evvi7FbTAoFxdP/mixmP7LIYzQWAmzBcwNB/es9XPNc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1/go.mod h1:rH61DT6FDdikhPghymripNUCsf+uVF4Cnk4c4DBKH64= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 h1:RAnaIrbxPtlXNVI/OIlh1sidTQ3e1qM6LRjs7N0bE0I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1/go.mod h1:nbgAGkH5lk0RZRMh6A4K/oG6Xj11eC/1CyDow+DUAFI= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 h1:TkbRExyKSVHELwG9gz2+gql37jjec2R5vus9faTomwE= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0/go.mod h1:T3/9xMKudHhnj8it5EqIrhvv11tVZqWYkKcot+BFStc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 h1:a33HuFlO0KsveiP90IUJh8Xr/cx9US2PqkSroaLc+o8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0/go.mod h1:SxIkWpByiGbhbHYTo9CMTUnx2G4p4ZQMrDPcRRy//1c= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 h1:UiSyK6ent6OKpkMJN3+k5HZ4sk4UfchEaaW5wv7SblQ= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0/go.mod h1:l7kzl8n8DXoRyFz5cIMG70HnPauWa649TUhgw8Rq6lo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLTmFTmYfI+gkanz6da3vK8Kvj/5wkqnTHbuA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2 h1:UxJGNZ+/VhocG50aui1p7Ub2NjDzijCpg8Y3NuznijM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.1 h1:GokXLGW3JkH/XzEVp1jDVRxty1eNGB7emkjDG1qxGK8= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.1/go.mod h1:YqbU3RS/pkDVu+v+Nwxvn0i1WB0HkNWEePWbmODEbbs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1 h1:2oxSGiYNxTHsuRuPD9McWvcvR6s61G3ssZLyQzcxQL0= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.1/go.mod h1:olUAyg+FaoFaL/zFaeQQONjOZ9HXoxgvI/c7mQTYz7M= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.1 h1:QFT2KUWaVwwGi5/2sQNBOViFpLSkZmiyiHUxE2k6sOU= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.1/go.mod h1:nXfOBMWPokIbOY+Gi7a1psWMSvskUCemZzI+SMB7Akc= -github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= -github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1 h1:rtYJd3w6IWCTVS8vmMaiXjW198noh2PBm5CiXyJea9o= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1/go.mod h1:zvXu+CTlib30LUy4LTNFc6HTZ/K6zCae5YIHTdX9wIo= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 h1:5Wxh862HkXL9CbQ83BIkWKLIgQapGeuh5zG2G9OZtQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1/go.mod h1:V7GLA01pNUxMCYSQsibdVrqUrNIYIT/9lCOyR8ExNvQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 h1:cVP8mng1RjDyI3JN/AXFCn5FHNlsBaBH0/MBtG1bg0o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1/go.mod h1:C8sQjoyAsdfjC7hpy4+S6B92hnFzx0d0UAyHicaOTIE= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 h1:OYmmIcyw19f7x0qLBLQ3XsrCZSSyLhxd9GXng5evsN4= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1/go.mod h1:s5rqdn74Vdg10k61Pwf4ZHEApOSD6CKRe6qpeHDq32I= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 h1:Cv/HH7sLzEdJMYQi4MCNHxZeyubQNOOIdVc0VU0lo3Q= +github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3/go.mod h1:lTW7O4iMAnO2o7H3XJTvqaWFZCH6zIPs+eP7RdG/yp0= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 h1:pnj8llQoBAHD4UmbM8UM5GdfycFJKMhgPSeaOyRaZ34= +github.com/aws/aws-sdk-go-v2/service/sso v1.19.2/go.mod h1:x6/tCd1o/AOKQR+iYnjrzhJxD+w0xRN34asGPaSV7ew= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 h1:L4yhKxW6HbTSQ08OsvPJuaspaLE40qMgprgXUNFUiMg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2/go.mod h1:lZB123q0SVQ3dfIbEOcGzhQHrwVBcHVReNS9tm20oU4= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 h1:Dr+7r/p20XpN+1U5tVNZfA2bLq0kQ9IjVBM0iAyMMLg= +github.com/aws/aws-sdk-go-v2/service/sts v1.27.2/go.mod h1:ozhhG9/NB5c9jcmhGq6tX9dpp21LYdmRWRQVppASim4= +github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= +github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= From 0d17684cbccaca7027658ef6ed789eb161ec3715 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 21 Feb 2024 23:58:44 +0000 Subject: [PATCH 095/264] add CHANGELOG for #3136 --- .changelog/3136.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .changelog/3136.txt diff --git a/.changelog/3136.txt b/.changelog/3136.txt new file mode 100644 index 0000000000..e997861e34 --- /dev/null +++ b/.changelog/3136.txt @@ -0,0 +1,15 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 +``` +```release-note:dependency +provider:
  • Feature: bump to Event Signaling and Management (ESAM) API and documentation.
  • +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 +``` From 7a6db2a7f74fa863bc0779c20b1acbf5a087044c Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 22 Feb 2024 11:11:17 +1100 Subject: [PATCH 096/264] Update 3136.txt --- .changelog/3136.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/.changelog/3136.txt b/.changelog/3136.txt index e997861e34..30743ab515 100644 --- a/.changelog/3136.txt +++ b/.changelog/3136.txt @@ -8,8 +8,5 @@ provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ``` ```release-note:dependency -provider:
  • Feature: bump to Event Signaling and Management (ESAM) API and documentation.
  • -``` -```release-note:dependency provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ``` From aa85aa116014998a87ec795cdd795af81edfa00c Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 22 Feb 2024 00:12:07 +0000 Subject: [PATCH 097/264] Update CHANGELOG.md for #3136 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acc0a9ae5..15406d6991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## 4.26.0 (Unreleased) +DEPENDENCIES: + +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) + ## 4.25.0 (February 21st, 2024) BREAKING CHANGES: From 046efc727e90cf3cb46dad307139996f8f716521 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:15:00 +0000 Subject: [PATCH 098/264] build(deps): bump the aws group with 3 updates Bumps the aws group with 3 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.2...config/v1.27.3) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.3/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.2...v1.17.3) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.3...service/s3/v1.51.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 5e141221c7..0d60864966 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.25.1 - github.com/aws/aws-sdk-go-v2/config v1.27.2 - github.com/aws/aws-sdk-go-v2/credentials v1.17.2 - github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 + github.com/aws/aws-sdk-go-v2/config v1.27.3 + github.com/aws/aws-sdk-go-v2/credentials v1.17.3 + github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -60,9 +60,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.0 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 1cabe70490..6aaca17901 100644 --- a/go.sum +++ b/go.sum @@ -13,10 +13,10 @@ github.com/aws/aws-sdk-go-v2 v1.25.1 h1:P7hU6A5qEdmajGwvae/zDkOq+ULLC9tQBTwqqiwF github.com/aws/aws-sdk-go-v2 v1.25.1/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.2 h1:XnMKB9JRjfnxg9ZkUic4MiapnWJISWRo8HVM+7nx9qQ= -github.com/aws/aws-sdk-go-v2/config v1.27.2/go.mod h1:z/XIktFoVIKNEqX/811vx4eHetrC3tAkgJKL1ZY/KM4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.2 h1:tCZXWtH0HiIEZ50NJ7/QEaXmuzEd36L+2JUiZkp2nsc= -github.com/aws/aws-sdk-go-v2/credentials v1.17.2/go.mod h1:7Zo+D6q4auSIo3p4EItuTKTk7J+RqjASISZqLvmUgpc= +github.com/aws/aws-sdk-go-v2/config v1.27.3 h1:0PRdb/q5a77HVYj+2rvPiCObfMfl/pWhwa5cs3cnl3c= +github.com/aws/aws-sdk-go-v2/config v1.27.3/go.mod h1:WeRAr9ENap9NAegbfNsLqGQd8ERz5ypdIUx4j0/ZgKI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.3 h1:dDM5wrgwOL5gTZ0Gv/bvewPldjBcJywoaO5ClERrOGE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.3/go.mod h1:G96Nuaw9qJS+s3OnK8RW8VEKEOjXi8H5Jk4lC/ZyZbw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 h1:lk1ZZFbdb24qpOwVC1AwYNrswUjAxeyey6kFBVANudQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1/go.mod h1:/xJ6x1NehNGCX4tvGzzj2bq5TBOT/Yxq+qbL9Jpx2Vk= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 h1:evvi7FbTAoFxdP/mixmP7LIYzQWAmzBcwNB/es9XPNc= @@ -35,14 +35,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 h1:cVP8mng1R github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1/go.mod h1:C8sQjoyAsdfjC7hpy4+S6B92hnFzx0d0UAyHicaOTIE= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 h1:OYmmIcyw19f7x0qLBLQ3XsrCZSSyLhxd9GXng5evsN4= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1/go.mod h1:s5rqdn74Vdg10k61Pwf4ZHEApOSD6CKRe6qpeHDq32I= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 h1:Cv/HH7sLzEdJMYQi4MCNHxZeyubQNOOIdVc0VU0lo3Q= -github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3/go.mod h1:lTW7O4iMAnO2o7H3XJTvqaWFZCH6zIPs+eP7RdG/yp0= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 h1:pnj8llQoBAHD4UmbM8UM5GdfycFJKMhgPSeaOyRaZ34= -github.com/aws/aws-sdk-go-v2/service/sso v1.19.2/go.mod h1:x6/tCd1o/AOKQR+iYnjrzhJxD+w0xRN34asGPaSV7ew= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 h1:L4yhKxW6HbTSQ08OsvPJuaspaLE40qMgprgXUNFUiMg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2/go.mod h1:lZB123q0SVQ3dfIbEOcGzhQHrwVBcHVReNS9tm20oU4= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 h1:Dr+7r/p20XpN+1U5tVNZfA2bLq0kQ9IjVBM0iAyMMLg= -github.com/aws/aws-sdk-go-v2/service/sts v1.27.2/go.mod h1:ozhhG9/NB5c9jcmhGq6tX9dpp21LYdmRWRQVppASim4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0 h1:rNVsCe3bqTAhG+qjnHJKgYKdHEsqqo/GMK3gEYY8W6g= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0/go.mod h1:lTW7O4iMAnO2o7H3XJTvqaWFZCH6zIPs+eP7RdG/yp0= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.0 h1:6YL8G91QZ52KlPrLkEgEez5kejIVwChVCgND3qgY5j0= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.0/go.mod h1:x6/tCd1o/AOKQR+iYnjrzhJxD+w0xRN34asGPaSV7ew= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0 h1:+DqIa5Ll7W311QLUvGFDdVit9uC4G0VioDdw08cXcow= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0/go.mod h1:lZB123q0SVQ3dfIbEOcGzhQHrwVBcHVReNS9tm20oU4= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.0 h1:F7tQr61zYnTaeY50Rn4jwfVQbtcqJuBRwN/nGGNwzb0= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.0/go.mod h1:ozhhG9/NB5c9jcmhGq6tX9dpp21LYdmRWRQVppASim4= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 21df3e67f4bca9786b3cc3a970241c1da90273a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:15:06 +0000 Subject: [PATCH 099/264] build(deps): bump github.com/hashicorp/terraform-plugin-go Bumps [github.com/hashicorp/terraform-plugin-go](https://github.com/hashicorp/terraform-plugin-go) from 0.21.0 to 0.22.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-go/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-go/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5e141221c7..d240a42f8e 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.21.0 + github.com/hashicorp/terraform-plugin-go v0.22.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -91,7 +91,7 @@ require ( golang.org/x/mod v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.61.0 // indirect + google.golang.org/grpc v1.61.1 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1cabe70490..64443ecb2c 100644 --- a/go.sum +++ b/go.sum @@ -120,8 +120,8 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= -github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= +github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= +github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= @@ -264,8 +264,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= From c41bdfdcd9e6415489f56210acaf9d575dab15df Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Feb 2024 23:15:14 +0000 Subject: [PATCH 100/264] add CHANGELOG for #3138 --- .changelog/3138.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changelog/3138.txt diff --git a/.changelog/3138.txt b/.changelog/3138.txt new file mode 100644 index 0000000000..c51aafcc5a --- /dev/null +++ b/.changelog/3138.txt @@ -0,0 +1,9 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 +``` From 65504e72668e41f4fda469befbbe9f9a2f08173b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Feb 2024 23:15:20 +0000 Subject: [PATCH 101/264] add CHANGELOG for #3139 --- .changelog/3139.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3139.txt diff --git a/.changelog/3139.txt b/.changelog/3139.txt new file mode 100644 index 0000000000..7a54308e3c --- /dev/null +++ b/.changelog/3139.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 +``` From a3b544340f611aefd79a370e9ec4ebd3bf33d638 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 23 Feb 2024 01:59:47 +0000 Subject: [PATCH 102/264] Update CHANGELOG.md for #3139 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15406d6991..5525946e88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,13 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 ([#3139](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3139)) ## 4.25.0 (February 21st, 2024) From 49f32e409a1883fe466c22f90d84eae1327b3e26 Mon Sep 17 00:00:00 2001 From: Russell Kerns Date: Fri, 23 Feb 2024 13:05:07 -0600 Subject: [PATCH 103/264] AUTH-5608 fixed bug on update access application always sending allow_authenticate_via_warp --- .changelog/3140.txt | 3 +++ .../sdkv2provider/resource_cloudflare_access_application.go | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changelog/3140.txt diff --git a/.changelog/3140.txt b/.changelog/3140.txt new file mode 100644 index 0000000000..7c8b83ca3a --- /dev/null +++ b/.changelog/3140.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_access_application: Fix issue with sending allow_authenticate_via_warp on updates when it is not provided +``` diff --git a/internal/sdkv2provider/resource_cloudflare_access_application.go b/internal/sdkv2provider/resource_cloudflare_access_application.go index 596b25014b..093a1d0648 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application.go @@ -235,7 +235,10 @@ func resourceCloudflareAccessApplicationUpdate(ctx context.Context, d *schema.Re SkipInterstitial: cloudflare.BoolPtr(d.Get("skip_interstitial").(bool)), AppLauncherVisible: cloudflare.BoolPtr(d.Get("app_launcher_visible").(bool)), ServiceAuth401Redirect: cloudflare.BoolPtr(d.Get("service_auth_401_redirect").(bool)), - AllowAuthenticateViaWarp: cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)), + } + + if _, ok := d.GetOk("allow_authenticate_via_warp"); ok { + updatedAccessApplication.AllowAuthenticateViaWarp = cloudflare.BoolPtr(d.Get("allow_authenticate_via_warp").(bool)) } if appType != "saas" { From b38f81dccb39275183c48471c6d5b551a26918f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 23:45:43 +0000 Subject: [PATCH 104/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.25.1...v1.25.2) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.3...config/v1.27.4) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.4/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.3...v1.17.4) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.51.0...service/s3/v1.51.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 28 ++++++++++++++-------------- go.sum | 56 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 788f07cf34..62e37214b4 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.25.1 - github.com/aws/aws-sdk-go-v2/config v1.27.3 - github.com/aws/aws-sdk-go-v2/credentials v1.17.3 - github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0 + github.com/aws/aws-sdk-go-v2 v1.25.2 + github.com/aws/aws-sdk-go-v2/config v1.27.4 + github.com/aws/aws-sdk-go-v2/credentials v1.17.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -51,18 +51,18 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 2ef1b162e1..6e61190763 100644 --- a/go.sum +++ b/go.sum @@ -9,40 +9,40 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.25.1 h1:P7hU6A5qEdmajGwvae/zDkOq+ULLC9tQBTwqqiwFGpI= -github.com/aws/aws-sdk-go-v2 v1.25.1/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= +github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w= +github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.3 h1:0PRdb/q5a77HVYj+2rvPiCObfMfl/pWhwa5cs3cnl3c= -github.com/aws/aws-sdk-go-v2/config v1.27.3/go.mod h1:WeRAr9ENap9NAegbfNsLqGQd8ERz5ypdIUx4j0/ZgKI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.3 h1:dDM5wrgwOL5gTZ0Gv/bvewPldjBcJywoaO5ClERrOGE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.3/go.mod h1:G96Nuaw9qJS+s3OnK8RW8VEKEOjXi8H5Jk4lC/ZyZbw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 h1:lk1ZZFbdb24qpOwVC1AwYNrswUjAxeyey6kFBVANudQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1/go.mod h1:/xJ6x1NehNGCX4tvGzzj2bq5TBOT/Yxq+qbL9Jpx2Vk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 h1:evvi7FbTAoFxdP/mixmP7LIYzQWAmzBcwNB/es9XPNc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1/go.mod h1:rH61DT6FDdikhPghymripNUCsf+uVF4Cnk4c4DBKH64= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 h1:RAnaIrbxPtlXNVI/OIlh1sidTQ3e1qM6LRjs7N0bE0I= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1/go.mod h1:nbgAGkH5lk0RZRMh6A4K/oG6Xj11eC/1CyDow+DUAFI= +github.com/aws/aws-sdk-go-v2/config v1.27.4 h1:AhfWb5ZwimdsYTgP7Od8E9L1u4sKmDW2ZVeLcf2O42M= +github.com/aws/aws-sdk-go-v2/config v1.27.4/go.mod h1:zq2FFXK3A416kiukwpsd+rD4ny6JC7QSkp4QdN1Mp2g= +github.com/aws/aws-sdk-go-v2/credentials v1.17.4 h1:h5Vztbd8qLppiPwX+y0Q6WiwMZgpd9keKe2EAENgAuI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.4/go.mod h1:+30tpwrkOgvkJL1rUZuRLoxcJwtI/OkeBLYnHxJtVe0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1 h1:rtYJd3w6IWCTVS8vmMaiXjW198noh2PBm5CiXyJea9o= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1/go.mod h1:zvXu+CTlib30LUy4LTNFc6HTZ/K6zCae5YIHTdX9wIo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 h1:en92G0Z7xlksoOylkUhuBSfJgijC7rHVLRdnIlHEs0E= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2/go.mod h1:HgtQ/wN5G+8QSlK62lbOtNwQ3wTSByJ4wH2rCkPt+AE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 h1:5Wxh862HkXL9CbQ83BIkWKLIgQapGeuh5zG2G9OZtQk= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1/go.mod h1:V7GLA01pNUxMCYSQsibdVrqUrNIYIT/9lCOyR8ExNvQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 h1:cVP8mng1RjDyI3JN/AXFCn5FHNlsBaBH0/MBtG1bg0o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1/go.mod h1:C8sQjoyAsdfjC7hpy4+S6B92hnFzx0d0UAyHicaOTIE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 h1:OYmmIcyw19f7x0qLBLQ3XsrCZSSyLhxd9GXng5evsN4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1/go.mod h1:s5rqdn74Vdg10k61Pwf4ZHEApOSD6CKRe6qpeHDq32I= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0 h1:rNVsCe3bqTAhG+qjnHJKgYKdHEsqqo/GMK3gEYY8W6g= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.0/go.mod h1:lTW7O4iMAnO2o7H3XJTvqaWFZCH6zIPs+eP7RdG/yp0= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.0 h1:6YL8G91QZ52KlPrLkEgEez5kejIVwChVCgND3qgY5j0= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.0/go.mod h1:x6/tCd1o/AOKQR+iYnjrzhJxD+w0xRN34asGPaSV7ew= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0 h1:+DqIa5Ll7W311QLUvGFDdVit9uC4G0VioDdw08cXcow= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.0/go.mod h1:lZB123q0SVQ3dfIbEOcGzhQHrwVBcHVReNS9tm20oU4= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.0 h1:F7tQr61zYnTaeY50Rn4jwfVQbtcqJuBRwN/nGGNwzb0= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.0/go.mod h1:ozhhG9/NB5c9jcmhGq6tX9dpp21LYdmRWRQVppASim4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2 h1:zSdTXYLwuXDNPUS+V41i1SFDXG7V0ITp0D9UT9Cvl18= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2/go.mod h1:v8m8k+qVy95nYi7d56uP1QImleIIY25BPiNJYzPBdFE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 h1:1oY1AVEisRI4HNuFoLdRUB0hC63ylDAN6Me3MrfclEg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2/go.mod h1:KZ03VgvZwSjkT7fOetQ/wF3MZUvYFirlI1H5NklUNsY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1 h1:juZ+uGargZOrQGNxkVHr9HHR/0N+Yu8uekQnV7EAVRs= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1/go.mod h1:SoR0c7Jnq8Tpmt0KSLXIavhjmaagRqQpe9r70W3POJg= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 h1:3I2cBEYgKhrWlwyZgfpSO2BpaMY1LHPqXYk/QGlu2ew= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1CD3efFLOUNH77MrUCvx5oA= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 6a0aaf739cd780c28bc5a603e15b357c55c17355 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 23:45:49 +0000 Subject: [PATCH 105/264] build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.32.0 to 2.33.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.32.0...v2.33.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 37 +++++++++---------------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 788f07cf34..48d0262079 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/terraform-plugin-go v0.22.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -48,7 +48,7 @@ require ( ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 // indirect @@ -72,7 +72,7 @@ require ( github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.6.2 // indirect + github.com/hashicorp/hc-install v0.6.3 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.20.0 // indirect github.com/hashicorp/terraform-json v0.21.0 // indirect @@ -88,7 +88,7 @@ require ( github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect - golang.org/x/mod v0.14.0 // indirect + golang.org/x/mod v0.15.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/grpc v1.61.1 // indirect diff --git a/go.sum b/go.sum index 2ef1b162e1..ed3346244d 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= @@ -46,8 +46,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.0/go.mod h1:ozhhG9/NB5c9jcmhGq6tX github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= @@ -63,7 +61,7 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-git/v5 v5.10.1 h1:tu8/D8i+TWxgKpzQ3Vc43e+kkhXqtsZCKI/egajKnxk= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -106,8 +104,8 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.6.2 h1:V1k+Vraqz4olgZ9UzKiAcbman9i9scg9GgSt/U3mw/M= -github.com/hashicorp/hc-install v0.6.2/go.mod h1:2JBpd+NCFKiHiu/yYCGaPyPHhZLxXTpz8oreHa/a3Ps= +github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= +github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -126,8 +124,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= @@ -194,29 +192,22 @@ github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -228,26 +219,17 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -255,7 +237,6 @@ golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 35c2dfedea3cb6ed54597cbca6844f09f36a8cc3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 23 Feb 2024 23:45:59 +0000 Subject: [PATCH 106/264] add CHANGELOG for #3141 --- .changelog/3141.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changelog/3141.txt diff --git a/.changelog/3141.txt b/.changelog/3141.txt new file mode 100644 index 0000000000..3d8dbf4956 --- /dev/null +++ b/.changelog/3141.txt @@ -0,0 +1,12 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 +``` From ed606e253c13172dbdb05ab758f605055b7d1a76 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 23 Feb 2024 23:46:02 +0000 Subject: [PATCH 107/264] add CHANGELOG for #3142 --- .changelog/3142.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3142.txt diff --git a/.changelog/3142.txt b/.changelog/3142.txt new file mode 100644 index 0000000000..cc822451bf --- /dev/null +++ b/.changelog/3142.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 +``` From 39c2b429507b877852cd539dd73121c778ebae80 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sat, 24 Feb 2024 01:36:34 +0000 Subject: [PATCH 108/264] Update CHANGELOG.md for #3142 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5525946e88..2242e13c91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,17 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 ([#3139](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3139)) +* provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) ## 4.25.0 (February 21st, 2024) From 01f83544391fab3caa69a9f0c2e33ed2542f5e08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:37:02 +0000 Subject: [PATCH 109/264] build(deps): bump github.com/hashicorp/terraform-plugin-mux Bumps [github.com/hashicorp/terraform-plugin-mux](https://github.com/hashicorp/terraform-plugin-mux) from 0.14.0 to 0.15.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-mux/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-mux/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-mux/compare/v0.14.0...v0.15.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-mux dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 5a0de0d420..6987dcdef3 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.14.0 + github.com/hashicorp/terraform-plugin-mux v0.15.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.8.4 ) @@ -90,8 +90,8 @@ require ( golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect golang.org/x/mod v0.15.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.61.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 177d855153..6d0985f68b 100644 --- a/go.sum +++ b/go.sum @@ -122,8 +122,8 @@ github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2 github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= -github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= +github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= +github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= @@ -243,10 +243,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= From 2dc7aaf73041c2ccacc59fdc0a02b6ecfaf02cd7 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 27 Feb 2024 11:20:07 +1100 Subject: [PATCH 110/264] deps: downgrade hashicorp/terraform-plugin-go to v0.21.0 Pending release of terraform-plugin-framework@v1.6.0 Ref: hashicorp/terraform-plugin-go#380 --- go.mod | 6 +++--- go.sum | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6987dcdef3..21a856d84c 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.22.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 + github.com/hashicorp/terraform-plugin-go v0.21.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -42,7 +42,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.15.0 + github.com/hashicorp/terraform-plugin-mux v0.14.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 6d0985f68b..2a188a53fb 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -46,26 +48,34 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1 github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= github.com/cloudflare/cloudflare-go v0.88.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -118,12 +128,18 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= +github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= +github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= +github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= @@ -135,15 +151,20 @@ github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv2 github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -166,6 +187,7 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -173,7 +195,9 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -187,6 +211,7 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21 github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= @@ -225,6 +250,7 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -238,6 +264,7 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -254,6 +281,8 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 7efdea7db67fb4060aa6a5e48fa4cb16b6654555 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 27 Feb 2024 04:40:15 +0000 Subject: [PATCH 111/264] Update CHANGELOG.md for #3140 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2242e13c91..82e5ea8855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.26.0 (Unreleased) +BUG FIXES: + +* resource/cloudflare_access_application: Fix issue with sending allow_authenticate_via_warp on updates when it is not provided ([#3140](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3140)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) From 4b690c412869a85eb2d3ab41999b9b45c68a5324 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:46:27 +0000 Subject: [PATCH 112/264] build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.32.0 to 2.33.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.32.0...v2.33.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 29 ----------------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index 21a856d84c..810b2c0cc2 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.21.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 + github.com/hashicorp/terraform-plugin-go v0.22.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect diff --git a/go.sum b/go.sum index 2a188a53fb..5f43cacad0 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,7 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -48,34 +46,26 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1 github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= github.com/cloudflare/cloudflare-go v0.88.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= -github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -128,18 +118,12 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= -github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= -github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= @@ -151,20 +135,15 @@ github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv2 github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -187,7 +166,6 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -195,9 +173,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= -github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -211,7 +187,6 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21 github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= -github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= @@ -250,7 +225,6 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -264,7 +238,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -281,8 +254,6 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From b51f39e710e563bd8cafa186bca29ccdf97f88f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 27 Feb 2024 23:46:40 +0000 Subject: [PATCH 113/264] add CHANGELOG for #3147 --- .changelog/3147.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3147.txt diff --git a/.changelog/3147.txt b/.changelog/3147.txt new file mode 100644 index 0000000000..cc822451bf --- /dev/null +++ b/.changelog/3147.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 +``` From a8145adc3d03b508a07040bd4a70bcb6c2412bf1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 28 Feb 2024 02:56:38 +0000 Subject: [PATCH 114/264] Update CHANGELOG.md for #3147 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82e5ea8855..3183c9eabe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 ([#3139](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3139)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) +* provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) ## 4.25.0 (February 21st, 2024) From fe2b1578ebe4c514501ac47e362c803aee168cfb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 02:56:49 +0000 Subject: [PATCH 115/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.88.0 to 0.89.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.88.0...v0.89.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 810b2c0cc2..3719e45b21 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.88.0 + github.com/cloudflare/cloudflare-go v0.89.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 5f43cacad0..518b154ba4 100644 --- a/go.sum +++ b/go.sum @@ -48,8 +48,8 @@ github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= -github.com/cloudflare/cloudflare-go v0.88.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= +github.com/cloudflare/cloudflare-go v0.89.0 h1:3zoVntC8xmUR/weFEcNE1RizdW4LRZdQnJ/AN8DDa1U= +github.com/cloudflare/cloudflare-go v0.89.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From 2e9686a33e28a142f89efd7f40bef50a7b79dd64 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 Feb 2024 02:57:03 +0000 Subject: [PATCH 116/264] add CHANGELOG for #3148 --- .changelog/3148.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3148.txt diff --git a/.changelog/3148.txt b/.changelog/3148.txt new file mode 100644 index 0000000000..64cf12d245 --- /dev/null +++ b/.changelog/3148.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 +``` From 241f3ddf33bb2f9076c906f3e4bafc34763e8645 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 28 Feb 2024 02:59:35 +0000 Subject: [PATCH 117/264] Update CHANGELOG.md for #3148 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3183c9eabe..0dd2711b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 ([#3148](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3148)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 ([#3139](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3139)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) From a0a0652fe3e557c8968495f188f4eaa9130bedac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 02:59:55 +0000 Subject: [PATCH 118/264] build(deps): bump github.com/hashicorp/terraform-plugin-mux Bumps [github.com/hashicorp/terraform-plugin-mux](https://github.com/hashicorp/terraform-plugin-mux) from 0.14.0 to 0.15.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-mux/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-mux/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-mux/compare/v0.14.0...v0.15.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-mux dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3719e45b21..78fe66f52b 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.14.0 + github.com/hashicorp/terraform-plugin-mux v0.15.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 518b154ba4..861e079305 100644 --- a/go.sum +++ b/go.sum @@ -122,8 +122,8 @@ github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2 github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= -github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= +github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= +github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= From 92c68a4c99b63e9b5f027a9e397aaf32a1d77aeb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 Feb 2024 03:00:13 +0000 Subject: [PATCH 119/264] add CHANGELOG for #3149 --- .changelog/3149.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3149.txt diff --git a/.changelog/3149.txt b/.changelog/3149.txt new file mode 100644 index 0000000000..6fcec877a7 --- /dev/null +++ b/.changelog/3149.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-mux from 0.14.0 to 0.15.0 +``` From 48433173a6b030dcafd55846ebf5960bd46bbfc6 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 28 Feb 2024 03:01:52 +0000 Subject: [PATCH 120/264] Update CHANGELOG.md for #3149 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd2711b90..a8f0e17fb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 ([#3148](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3148)) * provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 ([#3139](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3139)) +* provider: bump github.com/hashicorp/terraform-plugin-mux from 0.14.0 to 0.15.0 ([#3149](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3149)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) From 15e4c6b97381c459fecdc229698e4c35d4a5d40c Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 28 Feb 2024 14:49:32 +1100 Subject: [PATCH 121/264] deps: downgrade hashicorp/terraform-plugin-go to v0.21.0 Pending release of terraform-plugin-framework@v1.6.0 Ref: hashicorp/terraform-plugin-go#380 --- go.mod | 10 ++++++---- go.sum | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 78fe66f52b..66e9cdb55d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/cloudflare/terraform-provider-cloudflare -go 1.20 +go 1.21 + +toolchain go1.21.7 require ( github.com/agext/levenshtein v1.2.3 // indirect @@ -14,8 +16,8 @@ require ( github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.22.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 + github.com/hashicorp/terraform-plugin-go v0.21.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -42,7 +44,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.15.0 + github.com/hashicorp/terraform-plugin-mux v0.14.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 861e079305..8293ff89df 100644 --- a/go.sum +++ b/go.sum @@ -118,12 +118,16 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= +github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= +github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= From b6d42b1b54835b9986b4658cf6debbbce783f35b Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 28 Feb 2024 14:53:28 +1100 Subject: [PATCH 122/264] go mod tidy --- go.sum | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/go.sum b/go.sum index 8293ff89df..6394e2c979 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -46,26 +48,34 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1 github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudflare/cloudflare-go v0.89.0 h1:3zoVntC8xmUR/weFEcNE1RizdW4LRZdQnJ/AN8DDa1U= github.com/cloudflare/cloudflare-go v0.89.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -120,16 +130,12 @@ github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEz github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= -github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= -github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9o2eZASoOnLsWbKME= -github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= @@ -139,15 +145,20 @@ github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv2 github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -170,6 +181,7 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -177,7 +189,9 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -191,6 +205,7 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21 github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= @@ -229,6 +244,7 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -242,6 +258,7 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -258,6 +275,8 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 737a9741d5c2f95db511118f46cd93d845abfcd0 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 1 Mar 2024 11:47:18 +1100 Subject: [PATCH 123/264] remove toolchain directive --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 66e9cdb55d..6b838a0a39 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/cloudflare/terraform-provider-cloudflare go 1.21 -toolchain go1.21.7 - require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/cloudflare/cloudflare-go v0.89.0 From adb12113d6cfc8f8708efd675270ef262a1bd04f Mon Sep 17 00:00:00 2001 From: Rishabh Bector Date: Wed, 21 Feb 2024 14:11:01 -0600 Subject: [PATCH 124/264] DLP-1223: Add DLP dataset support to terraform --- .changelog/3135.txt | 3 + .changelog/3136.txt | 12 ++++ .changelog/3138.txt | 9 +++ .changelog/3139.txt | 3 + .changelog/3140.txt | 3 + .changelog/3141.txt | 12 ++++ .changelog/3142.txt | 3 + .changelog/3147.txt | 3 + .changelog/3148.txt | 3 + .changelog/3149.txt | 3 + docs/data-sources/dlp_datasets.md | 41 +++++++++++ .../cloudflare_dlp_datasets/data-source.tf | 3 + internal/framework/provider/provider.go | 2 + .../service/dlp_datasets/data_source.go | 70 +++++++++++++++++++ .../service/dlp_datasets/data_source_test.go | 35 ++++++++++ .../framework/service/dlp_datasets/model.go | 18 +++++ .../framework/service/dlp_datasets/schema.go | 35 ++++++++++ 17 files changed, 258 insertions(+) create mode 100644 .changelog/3135.txt create mode 100644 .changelog/3136.txt create mode 100644 .changelog/3138.txt create mode 100644 .changelog/3139.txt create mode 100644 .changelog/3140.txt create mode 100644 .changelog/3141.txt create mode 100644 .changelog/3142.txt create mode 100644 .changelog/3147.txt create mode 100644 .changelog/3148.txt create mode 100644 .changelog/3149.txt create mode 100644 docs/data-sources/dlp_datasets.md create mode 100644 examples/data-sources/cloudflare_dlp_datasets/data-source.tf create mode 100644 internal/framework/service/dlp_datasets/data_source.go create mode 100644 internal/framework/service/dlp_datasets/data_source_test.go create mode 100644 internal/framework/service/dlp_datasets/model.go create mode 100644 internal/framework/service/dlp_datasets/schema.go diff --git a/.changelog/3135.txt b/.changelog/3135.txt new file mode 100644 index 0000000000..a745488149 --- /dev/null +++ b/.changelog/3135.txt @@ -0,0 +1,3 @@ +```release-note:new-data-source +cloudflare_dlp_datasets +``` diff --git a/.changelog/3136.txt b/.changelog/3136.txt new file mode 100644 index 0000000000..30743ab515 --- /dev/null +++ b/.changelog/3136.txt @@ -0,0 +1,12 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 +``` diff --git a/.changelog/3138.txt b/.changelog/3138.txt new file mode 100644 index 0000000000..c51aafcc5a --- /dev/null +++ b/.changelog/3138.txt @@ -0,0 +1,9 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 +``` diff --git a/.changelog/3139.txt b/.changelog/3139.txt new file mode 100644 index 0000000000..7a54308e3c --- /dev/null +++ b/.changelog/3139.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-go from 0.21.0 to 0.22.0 +``` diff --git a/.changelog/3140.txt b/.changelog/3140.txt new file mode 100644 index 0000000000..7c8b83ca3a --- /dev/null +++ b/.changelog/3140.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_access_application: Fix issue with sending allow_authenticate_via_warp on updates when it is not provided +``` diff --git a/.changelog/3141.txt b/.changelog/3141.txt new file mode 100644 index 0000000000..3d8dbf4956 --- /dev/null +++ b/.changelog/3141.txt @@ -0,0 +1,12 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 +``` diff --git a/.changelog/3142.txt b/.changelog/3142.txt new file mode 100644 index 0000000000..cc822451bf --- /dev/null +++ b/.changelog/3142.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 +``` diff --git a/.changelog/3147.txt b/.changelog/3147.txt new file mode 100644 index 0000000000..cc822451bf --- /dev/null +++ b/.changelog/3147.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 +``` diff --git a/.changelog/3148.txt b/.changelog/3148.txt new file mode 100644 index 0000000000..64cf12d245 --- /dev/null +++ b/.changelog/3148.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 +``` diff --git a/.changelog/3149.txt b/.changelog/3149.txt new file mode 100644 index 0000000000..6fcec877a7 --- /dev/null +++ b/.changelog/3149.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-mux from 0.14.0 to 0.15.0 +``` diff --git a/docs/data-sources/dlp_datasets.md b/docs/data-sources/dlp_datasets.md new file mode 100644 index 0000000000..a82cbb6861 --- /dev/null +++ b/docs/data-sources/dlp_datasets.md @@ -0,0 +1,41 @@ +--- +page_title: "cloudflare_dlp_datasets Data Source - Cloudflare" +subcategory: "" +description: |- + Use this data source to retrieve all DLP datasets for an account. +--- + +# cloudflare_dlp_datasets (Data Source) + +Use this data source to retrieve all DLP datasets for an account. + +## Example Usage + +```terraform +data "cloudflare_dlp_datasets" "example" { + account_id = "f037e56e89293a057740de681ac9abbe" +} +``` + +## Schema + +### Required + +- `account_id` (String) The account ID to fetch DLP Datasets from. + +### Read-Only + +- `datasets` (List of Object) A list of DLP Datasets. (see [below for nested schema](#nestedatt--datasets)) + + +### Nested Schema for `datasets` + +Read-Only: + +- `description` (String) +- `id` (String) +- `name` (String) +- `secret` (Boolean) +- `status` (String) + + diff --git a/examples/data-sources/cloudflare_dlp_datasets/data-source.tf b/examples/data-sources/cloudflare_dlp_datasets/data-source.tf new file mode 100644 index 0000000000..9b2aeb2fdd --- /dev/null +++ b/examples/data-sources/cloudflare_dlp_datasets/data-source.tf @@ -0,0 +1,3 @@ +data "cloudflare_dlp_datasets" "example" { + account_id = "f037e56e89293a057740de681ac9abbe" +} diff --git a/internal/framework/provider/provider.go b/internal/framework/provider/provider.go index 5c76dee802..e0ff5bc27f 100644 --- a/internal/framework/provider/provider.go +++ b/internal/framework/provider/provider.go @@ -13,6 +13,7 @@ import ( "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/api_token_permissions_groups" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/d1" + "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/dlp_datasets" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/email_routing_address" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/email_routing_rule" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/list_item" @@ -345,6 +346,7 @@ func (p *CloudflareProvider) DataSources(ctx context.Context) []func() datasourc api_token_permissions_groups.NewDataSource, origin_ca_certificate.NewDataSource, user.NewDataSource, + dlp_datasets.NewDataSource, } } diff --git a/internal/framework/service/dlp_datasets/data_source.go b/internal/framework/service/dlp_datasets/data_source.go new file mode 100644 index 0000000000..d28375e20c --- /dev/null +++ b/internal/framework/service/dlp_datasets/data_source.go @@ -0,0 +1,70 @@ +package dlp_datasets + +import ( + "context" + "fmt" + + "github.com/cloudflare/cloudflare-go" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +var _ datasource.DataSource = &CloudflareDlpDatasetsDataSource{} + +func NewDataSource() datasource.DataSource { + return &CloudflareDlpDatasetsDataSource{} +} + +type CloudflareDlpDatasetsDataSource struct { + client *cloudflare.API +} + +func (d *CloudflareDlpDatasetsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_dlp_datasets" +} + +func (d *CloudflareDlpDatasetsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*cloudflare.API) + if !ok { + resp.Diagnostics.AddError( + "Unexpected resource configure type", + fmt.Sprintf("Expected *cloudflare.API, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + return + } + + d.client = client +} + +func (d *CloudflareDlpDatasetsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data DlpDatasetsModel + + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + + accountDatasets, err := d.client.ListDLPDatasets(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.ListDLPDatasetsParams{}) + if err != nil { + resp.Diagnostics.AddError("failed to fetch DLP Datasets: %w", err.Error()) + return + } + + var datasets []*DlpDatasetModel + for _, dataset := range accountDatasets { + datasets = append(datasets, &DlpDatasetModel{ + ID: types.StringValue(dataset.ID), + Name: types.StringValue(dataset.Name), + Description: types.StringValue(dataset.Description), + Status: types.StringValue(dataset.Status), + Secret: types.BoolValue(*dataset.Secret), + }) + } + + data.Datasets = datasets + resp.Diagnostics.Append(resp.State.Set(ctx, datasets)...) + if resp.Diagnostics.HasError() { + return + } +} diff --git a/internal/framework/service/dlp_datasets/data_source_test.go b/internal/framework/service/dlp_datasets/data_source_test.go new file mode 100644 index 0000000000..cf698ca482 --- /dev/null +++ b/internal/framework/service/dlp_datasets/data_source_test.go @@ -0,0 +1,35 @@ +package dlp_datasets_test + +import ( + "fmt" + "os" + "testing" + + "github.com/cloudflare/terraform-provider-cloudflare/internal/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func TestAccCloudflareDLPDatasets_DataSource(t *testing.T) { + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.TestAccPreCheck(t) }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccCheckCloudflareDlpDatasetsDataSourceConfig(accountID), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.cloudflare_dlp_datasets.my_datasets", "account_id"), + ), + }, + }, + }) +} + +func testAccCheckCloudflareDlpDatasetsDataSourceConfig(accountID string) string { + return fmt.Sprintf(` +data "cloudflare_dlp_datasets" "my_datasets" { + account_id = "%s" +} +`, accountID) +} diff --git a/internal/framework/service/dlp_datasets/model.go b/internal/framework/service/dlp_datasets/model.go new file mode 100644 index 0000000000..70ad4833c1 --- /dev/null +++ b/internal/framework/service/dlp_datasets/model.go @@ -0,0 +1,18 @@ +package dlp_datasets + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type DlpDatasetsModel struct { + AccountID types.String `tfsdk:"account_id"` + Datasets []*DlpDatasetModel `tfsdk:"datasets"` +} + +type DlpDatasetModel struct { + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Description types.String `tfsdk:"description"` + Status types.String `tfsdk:"status"` + Secret types.Bool `tfsdk:"secret"` +} diff --git a/internal/framework/service/dlp_datasets/schema.go b/internal/framework/service/dlp_datasets/schema.go new file mode 100644 index 0000000000..caf824bcb5 --- /dev/null +++ b/internal/framework/service/dlp_datasets/schema.go @@ -0,0 +1,35 @@ +package dlp_datasets + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +func (d *CloudflareDlpDatasetsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Description: "Use this data source to retrieve all DLP datasets for an account.", + Attributes: map[string]schema.Attribute{ + "account_id": schema.StringAttribute{ + Required: true, + Description: "The account ID to fetch DLP Datasets from.", + }, + "datasets": schema.ListAttribute{ + Computed: true, + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "name": types.StringType, + "description": types.StringType, + "status": types.StringType, + "secret": types.BoolType, + }, + }, + Description: "A list of DLP Datasets.", + }, + }, + } +} From 212582814b36fbcb388edf1782307ab3e53b3378 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 23:45:04 +0000 Subject: [PATCH 125/264] build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6b838a0a39..eaaa8e6e78 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-mux v0.14.0 github.com/hashicorp/terraform-plugin-testing v1.6.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( diff --git a/go.sum b/go.sum index 6394e2c979..7319750afc 100644 --- a/go.sum +++ b/go.sum @@ -195,8 +195,8 @@ github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= From cca66a2b1400c9df13e2fe56a323a2c0f95fbd79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 1 Mar 2024 23:45:17 +0000 Subject: [PATCH 126/264] add CHANGELOG for #3157 --- .changelog/3157.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3157.txt diff --git a/.changelog/3157.txt b/.changelog/3157.txt new file mode 100644 index 0000000000..d2f8c82fe2 --- /dev/null +++ b/.changelog/3157.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/stretchr/testify from 1.8.4 to 1.9.0 +``` From 5ee69e295d78fc3e02f542258d156450f3d433db Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sat, 2 Mar 2024 02:29:02 +0000 Subject: [PATCH 127/264] Update CHANGELOG.md for #3157 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8f0e17fb1..724e7dcabf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ DEPENDENCIES: * provider: bump github.com/hashicorp/terraform-plugin-mux from 0.14.0 to 0.15.0 ([#3149](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3149)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) +* provider: bump github.com/stretchr/testify from 1.8.4 to 1.9.0 ([#3157](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3157)) ## 4.25.0 (February 21st, 2024) From 9c58ed443e74a950b2717317e93098ecaa75f0a4 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 4 Mar 2024 12:44:06 +1100 Subject: [PATCH 128/264] account for empty DLP datasets --- internal/framework/service/dlp_datasets/data_source.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/framework/service/dlp_datasets/data_source.go b/internal/framework/service/dlp_datasets/data_source.go index d28375e20c..a52ef0f77b 100644 --- a/internal/framework/service/dlp_datasets/data_source.go +++ b/internal/framework/service/dlp_datasets/data_source.go @@ -51,6 +51,10 @@ func (d *CloudflareDlpDatasetsDataSource) Read(ctx context.Context, req datasour return } + if len(accountDatasets) < 1 { + return + } + var datasets []*DlpDatasetModel for _, dataset := range accountDatasets { datasets = append(datasets, &DlpDatasetModel{ From 5486cca99b5c32236c5bcc54ca65230ddb65e1e4 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 4 Mar 2024 01:49:39 +0000 Subject: [PATCH 129/264] Update CHANGELOG.md for #3135 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 724e7dcabf..71b8dbc12f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.26.0 (Unreleased) +FEATURES: + +* **New Data Source:** `cloudflare_dlp_datasets` ([#3135](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3135)) + BUG FIXES: * resource/cloudflare_access_application: Fix issue with sending allow_authenticate_via_warp on updates when it is not provided ([#3140](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3140)) From 1d12822fe6492e647a9a7c8476c98774aaacf1d5 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 4 Mar 2024 14:20:25 +1100 Subject: [PATCH 130/264] add documentation issue links --- .github/ISSUE_TEMPLATE/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4942b3914e..c32a205bf2 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Terraform Registry documentation problem + url: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md + about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and propose a change. There rarely needs to be design discussion about these and they are great first contributions! - name: Cloudflare Support url: https://dash.cloudflare.com/redirect?account=support about: Get in contact with Support regarding account or zone issues not related to Terraform From 79d482318156ba1a82d768e30cbb5b8c9a1385da Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 4 Mar 2024 14:39:02 +1100 Subject: [PATCH 131/264] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c32a205bf2..d960a1e6d6 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,7 +2,7 @@ blank_issues_enabled: false contact_links: - name: Terraform Registry documentation problem url: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md - about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and propose a change. There rarely needs to be design discussion about these and they are great first contributions! + about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and
    propose a change. There rarely needs to be design discussion about these and they are great first contributions! - name: Cloudflare Support url: https://dash.cloudflare.com/redirect?account=support about: Get in contact with Support regarding account or zone issues not related to Terraform From 3f3681a34b9ad80c7f04b3a46faf62ebf297f67f Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 4 Mar 2024 14:39:20 +1100 Subject: [PATCH 132/264] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d960a1e6d6..c32a205bf2 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,7 +2,7 @@ blank_issues_enabled: false contact_links: - name: Terraform Registry documentation problem url: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md - about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and
    propose a change. There rarely needs to be design discussion about these and they are great first contributions! + about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and propose a change. There rarely needs to be design discussion about these and they are great first contributions! - name: Cloudflare Support url: https://dash.cloudflare.com/redirect?account=support about: Get in contact with Support regarding account or zone issues not related to Terraform From 307bdd21c3f2aacae7ae29dad1e85dd32f5d29f7 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 4 Mar 2024 14:39:49 +1100 Subject: [PATCH 133/264] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c32a205bf2..0b335347ce 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,7 +2,9 @@ blank_issues_enabled: false contact_links: - name: Terraform Registry documentation problem url: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md - about: If you are looking to report an issue with the Terraform Registry documentation, please review the contributing link and propose a change. There rarely needs to be design discussion about these and they are great first contributions! + about: | + If you are looking to report an issue with the Terraform Registry documentation, please review the contributing + link and propose a change. There rarely needs to be design discussion about these and they are great first contributions! - name: Cloudflare Support url: https://dash.cloudflare.com/redirect?account=support about: Get in contact with Support regarding account or zone issues not related to Terraform From 04c49d4d2a1f1fdf28e005b1cf01c60f2910c7ab Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Wed, 31 Jan 2024 16:01:14 +0000 Subject: [PATCH 134/264] Add Hyperdrive provider --- .changelog/3111.txt | 3 + docs/resources/hyperdrive_config.md | 90 +++++++ .../cloudflare_hyperdrive_config/import.sh | 1 + .../cloudflare_hyperdrive_config/resource.tf | 31 +++ internal/framework/provider/provider.go | 2 + .../service/hyperdrive_config/model.go | 26 ++ .../service/hyperdrive_config/resource.go | 232 ++++++++++++++++++ .../hyperdrive_config/resource_test.go | 200 +++++++++++++++ .../service/hyperdrive_config/schema.go | 94 +++++++ 9 files changed, 679 insertions(+) create mode 100644 .changelog/3111.txt create mode 100644 docs/resources/hyperdrive_config.md create mode 100644 examples/resources/cloudflare_hyperdrive_config/import.sh create mode 100644 examples/resources/cloudflare_hyperdrive_config/resource.tf create mode 100644 internal/framework/service/hyperdrive_config/model.go create mode 100644 internal/framework/service/hyperdrive_config/resource.go create mode 100644 internal/framework/service/hyperdrive_config/resource_test.go create mode 100644 internal/framework/service/hyperdrive_config/schema.go diff --git a/.changelog/3111.txt b/.changelog/3111.txt new file mode 100644 index 0000000000..ce9ce04db2 --- /dev/null +++ b/.changelog/3111.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +cloudflare_hyperdrive_config +``` \ No newline at end of file diff --git a/docs/resources/hyperdrive_config.md b/docs/resources/hyperdrive_config.md new file mode 100644 index 0000000000..b94217014b --- /dev/null +++ b/docs/resources/hyperdrive_config.md @@ -0,0 +1,90 @@ +--- +page_title: "cloudflare_hyperdrive_config Resource - Cloudflare" +subcategory: "" +description: |- + The Hyperdrive Config https://developers.cloudflare.com/hyperdrive/ resource allows you to manage Cloudflare Hyperdrive Configs. +--- + +# cloudflare_hyperdrive_config (Resource) + +The [Hyperdrive Config](https://developers.cloudflare.com/hyperdrive/) resource allows you to manage Cloudflare Hyperdrive Configs. + +## Example Usage + +```terraform +# Config using all default values +resource "cloudflare_hyperdrive_config" "no_defaults" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "my-hyperdrive-config" + password = "my-password" + origin = { + database = "postgres" + host = "my-database.example.com" + } +} + +# Config not using any default values +resource "cloudflare_hyperdrive_config" "no_defaults" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "my-hyperdrive-config" + password = "my-password" + origin = { + database = "postgres" + host = "my-database.example.com" + port = 5432 + scheme = "postgres" + user = "my-user" + } + caching = { + disabled = false + max_age = 60 + stale_while_revalidate = 30 + } +} +``` + +## Schema + +### Required + +- `account_id` (String) The account identifier to target for the resource. +- `name` (String) The name of the Hyperdrive configuration. +- `origin` (Attributes) The origin details for the Hyperdrive configuration. (see [below for nested schema](#nestedatt--origin)) +- `password` (String) The password of the Hyperdrive configuration. + +### Optional + +- `caching` (Attributes) The caching details for the Hyperdrive configuration. (see [below for nested schema](#nestedatt--caching)) +- `id` (String) The identifier of this resource. This is the hyperdrive config value. + + +### Nested Schema for `origin` + +Required: + +- `database` (String) The name of your origin database. +- `host` (String) The host (hostname or IP) of your origin database. + +Optional: + +- `port` (Number) The port (default: 5432 for Postgres) of your origin database. +- `scheme` (String) Specifies the URL scheme used to connect to your origin database. +- `user` (String) The user of your origin database. + + + +### Nested Schema for `caching` + +Optional: + +- `disabled` (Boolean) Disable caching for this Hyperdrive configuration. +- `max_age` (Number) The maximum age of the cache. +- `stale_while_revalidate` (Number) The time to wait before revalidating the cache. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import cloudflare_hyperdrive_config.example / +``` diff --git a/examples/resources/cloudflare_hyperdrive_config/import.sh b/examples/resources/cloudflare_hyperdrive_config/import.sh new file mode 100644 index 0000000000..0bdb541d66 --- /dev/null +++ b/examples/resources/cloudflare_hyperdrive_config/import.sh @@ -0,0 +1 @@ +$ terraform import cloudflare_hyperdrive_config.example / diff --git a/examples/resources/cloudflare_hyperdrive_config/resource.tf b/examples/resources/cloudflare_hyperdrive_config/resource.tf new file mode 100644 index 0000000000..b26b536d78 --- /dev/null +++ b/examples/resources/cloudflare_hyperdrive_config/resource.tf @@ -0,0 +1,31 @@ +# Config using all default values +resource "cloudflare_hyperdrive_config" "no_defaults" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "my-hyperdrive-config" + password = "my-password" + origin = { + database = "postgres" + host = "my-database.example.com" + } +} + +# Config not using any default values +resource "cloudflare_hyperdrive_config" "no_defaults" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "my-hyperdrive-config" + password = "my-password" + origin = { + database = "postgres" + host = "my-database.example.com" + port = 5432 + scheme = "postgres" + user = "my-user" + } + caching = { + disabled = false + max_age = 60 + stale_while_revalidate = 30 + } +} + + diff --git a/internal/framework/provider/provider.go b/internal/framework/provider/provider.go index e0ff5bc27f..9753df6a7a 100644 --- a/internal/framework/provider/provider.go +++ b/internal/framework/provider/provider.go @@ -16,6 +16,7 @@ import ( "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/dlp_datasets" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/email_routing_address" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/email_routing_rule" + "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/hyperdrive_config" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/list_item" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/origin_ca_certificate" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/r2_bucket" @@ -334,6 +335,7 @@ func (p *CloudflareProvider) Resources(ctx context.Context) []func() resource.Re d1.NewResource, email_routing_address.NewResource, email_routing_rule.NewResource, + hyperdrive_config.NewResource, list_item.NewResource, r2_bucket.NewResource, rulesets.NewResource, diff --git a/internal/framework/service/hyperdrive_config/model.go b/internal/framework/service/hyperdrive_config/model.go new file mode 100644 index 0000000000..4887c58e85 --- /dev/null +++ b/internal/framework/service/hyperdrive_config/model.go @@ -0,0 +1,26 @@ +package hyperdrive_config + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type HyperdriveConfigModel struct { + AccountID types.String `tfsdk:"account_id"` + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Password types.String `tfsdk:"password"` + Origin *HyperdriveConfigOriginModel `tfsdk:"origin"` + Caching *HyperdriveConfigCachingModel `tfsdk:"caching"` +} + +type HyperdriveConfigOriginModel struct { + Database types.String `tfsdk:"database"` + Host types.String `tfsdk:"host"` + Port types.Int64 `tfsdk:"port"` + Scheme types.String `tfsdk:"scheme"` + User types.String `tfsdk:"user"` +} + +type HyperdriveConfigCachingModel struct { + Disabled types.Bool `tfsdk:"disabled"` + MaxAge types.Int64 `tfsdk:"max_age"` + StaleWhileRevalidate types.Int64 `tfsdk:"stale_while_revalidate"` +} diff --git a/internal/framework/service/hyperdrive_config/resource.go b/internal/framework/service/hyperdrive_config/resource.go new file mode 100644 index 0000000000..0fe2bd60b3 --- /dev/null +++ b/internal/framework/service/hyperdrive_config/resource.go @@ -0,0 +1,232 @@ +package hyperdrive_config + +import ( + "context" + "fmt" + "strings" + + "github.com/cloudflare/cloudflare-go" + + "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/flatteners" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +// Ensure provider defined types fully satisfy framework interfaces. +var _ resource.Resource = &HyperdriveConfigResource{} +var _ resource.ResourceWithImportState = &HyperdriveConfigResource{} + +func NewResource() resource.Resource { + return &HyperdriveConfigResource{} +} + +// HyperdriveConfigResource defines the resource implementation for hyperdrive configs. +type HyperdriveConfigResource struct { + client *cloudflare.API +} + +func (r *HyperdriveConfigResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_hyperdrive_config" +} + +func (r *HyperdriveConfigResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*cloudflare.API) + + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected *cloudflare.API, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + + return + } + + r.client = client +} + +func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *HyperdriveConfigModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + config := buildHyperdriveConfigFromModel(ctx, data) + + createHyperdriveConfig, err := r.client.CreateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), + cloudflare.CreateHyperdriveConfigParams{ + Name: config.Name, + Password: data.Password.ValueString(), + Origin: cloudflare.HyperdriveConfigOrigin{ + Database: config.Origin.Database, + Host: config.Origin.Host, + Port: config.Origin.Port, + Scheme: config.Origin.Scheme, + User: config.Origin.User, + }, + Caching: cloudflare.HyperdriveConfigCaching{ + Disabled: config.Caching.Disabled, + MaxAge: config.Caching.MaxAge, + StaleWhileRevalidate: config.Caching.StaleWhileRevalidate, + }, + }) + if err != nil { + resp.Diagnostics.AddError("Error creating hyperdrive config", err.Error()) + } + + data = buildHyperdriveConfigModelFromHyperdriveConfig( + data.AccountID, + createHyperdriveConfig, + ) + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *HyperdriveConfigResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *HyperdriveConfigModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + config, err := r.client.GetHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), data.ID.ValueString()) + + if err != nil { + resp.Diagnostics.AddError("Error reading hyperdrive config", err.Error()) + } + + data = buildHyperdriveConfigModelFromHyperdriveConfig(data.AccountID, config) + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *HyperdriveConfigModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + config := buildHyperdriveConfigFromModel(ctx, data) + + updatedConfig, err := r.client.UpdateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.UpdateHyperdriveConfigParams{ + Name: config.Name, + Password: data.Password.ValueString(), + Origin: cloudflare.HyperdriveConfigOrigin{ + Database: config.Origin.Database, + Host: config.Origin.Host, + Port: config.Origin.Port, + Scheme: config.Origin.Scheme, + User: config.Origin.User, + }, + Caching: cloudflare.HyperdriveConfigCaching{ + Disabled: config.Caching.Disabled, + MaxAge: config.Caching.MaxAge, + StaleWhileRevalidate: config.Caching.StaleWhileRevalidate, + }, + }) + + if err != nil { + resp.Diagnostics.AddError("Error updating hyperdrive config", err.Error()) + } + + data = buildHyperdriveConfigModelFromHyperdriveConfig( + data.AccountID, + updatedConfig, + ) + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *HyperdriveConfigResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *HyperdriveConfigModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + err := r.client.DeleteHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), data.ID.ValueString()) + if err != nil { + resp.Diagnostics.AddError("Error deleting hyperdrive config", err.Error()) + } +} + +func (r *HyperdriveConfigResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + idParts := strings.Split(req.ID, "/") + if len(idParts) != 2 { + resp.Diagnostics.AddError("Error importing hyperdrive config", "Invalid ID specified. Please specify the ID as \"accounts_id/hyperdrive_config_id\"") + } + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("account_id"), idParts[0])...) + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("id"), idParts[1])...) +} + +func buildHyperdriveConfigFromModel(ctx context.Context, config *HyperdriveConfigModel) cloudflare.HyperdriveConfig { + built := cloudflare.HyperdriveConfig{ + Name: config.Name.ValueString(), + Origin: cloudflare.HyperdriveConfigOrigin{ + Database: config.Origin.Database.ValueString(), + Host: config.Origin.Host.ValueString(), + Port: int(config.Origin.Port.ValueInt64()), + }, + } + + if !config.Origin.Scheme.IsNull() { + built.Origin.Scheme = config.Origin.Scheme.ValueString() + } + + if !config.Origin.User.IsNull() { + built.Origin.User = config.Origin.User.ValueString() + } + + if !config.Caching.Disabled.IsNull() || !config.Caching.MaxAge.IsNull() || !config.Caching.StaleWhileRevalidate.IsNull() { + built.Caching = cloudflare.HyperdriveConfigCaching{} + } + + if !config.Caching.Disabled.IsNull() { + built.Caching.Disabled = cloudflare.BoolPtr(config.Caching.Disabled.ValueBool()) + } + + if !config.Caching.MaxAge.IsNull() { + built.Caching.MaxAge = int(config.Caching.MaxAge.ValueInt64()) + } + + if !config.Caching.StaleWhileRevalidate.IsNull() { + built.Caching.StaleWhileRevalidate = int(config.Caching.StaleWhileRevalidate.ValueInt64()) + } + + return built +} + +func buildHyperdriveConfigModelFromHyperdriveConfig(accountID types.String, config cloudflare.HyperdriveConfig) *HyperdriveConfigModel { + built := HyperdriveConfigModel{ + AccountID: accountID, + Name: flatteners.String(config.Name), + Origin: &HyperdriveConfigOriginModel{ + Database: flatteners.String(config.Origin.Database), + Host: flatteners.String(config.Origin.Host), + Port: flatteners.Int64(int64(config.Origin.Port)), + Scheme: flatteners.String(config.Origin.Scheme), + User: flatteners.String(config.Origin.User), + }, + Caching: &HyperdriveConfigCachingModel{ + Disabled: flatteners.Bool(config.Caching.Disabled), + MaxAge: flatteners.Int64(int64(config.Caching.MaxAge)), + StaleWhileRevalidate: flatteners.Int64(int64(config.Caching.StaleWhileRevalidate)), + }, + } + + return &built +} diff --git a/internal/framework/service/hyperdrive_config/resource_test.go b/internal/framework/service/hyperdrive_config/resource_test.go new file mode 100644 index 0000000000..d32cffcae2 --- /dev/null +++ b/internal/framework/service/hyperdrive_config/resource_test.go @@ -0,0 +1,200 @@ +package hyperdrive_config_test + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go" + "github.com/cloudflare/terraform-provider-cloudflare/internal/acctest" + "github.com/cloudflare/terraform-provider-cloudflare/internal/utils" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func TestMain(m *testing.M) { + resource.TestMain(m) +} + +func init() { + resource.AddTestSweepers("cloudflare_hyperdrive_config", &resource.Sweeper{ + Name: "cloudflare_hyperdrive_config", + F: func(region string) error { + client, err := acctest.SharedClient() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + + ctx := context.Background() + + if err != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to create Cloudflare client: %s", err)) + } + + resp, err := client.ListHyperdriveConfigs(ctx, cloudflare.AccountIdentifier(accountID), cloudflare.ListHyperdriveConfigParams{}) + if err != nil { + return err + } + + for _, q := range resp { + err := client.DeleteHyperdriveConfig(ctx, cloudflare.AccountIdentifier(accountID), q.ID) + if err != nil { + return err + } + } + + return nil + }, + }) +} + +func TestAccCloudflareHyperdriveConfig_Basic(t *testing.T) { + rnd := utils.GenerateRandomResourceName() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + resourceName := "cloudflare_hyperdrive_config." + rnd + + var origin = cloudflare.HyperdriveConfigOrigin{ + Database: "database", + Host: "host.example.com", + Port: 5432, + Scheme: "postgres", + User: "user", + } + + var disabled = false + + var caching = cloudflare.HyperdriveConfigCaching{ + Disabled: &disabled, + MaxAge: 1, + StaleWhileRevalidate: 1, + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.TestAccPreCheck(t) }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testHyperdriveConfigConfig( + rnd, + accountID, + rnd, + "password", + origin, + caching, + ), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", rnd), + resource.TestCheckResourceAttr(resourceName, "account_id", accountID), + resource.TestCheckResourceAttr(resourceName, "password", "password"), + resource.TestCheckResourceAttr(resourceName, "origin.#", "1"), + resource.TestCheckResourceAttr(resourceName, "origin.0.database", "database"), + resource.TestCheckResourceAttr(resourceName, "origin.0.host", "host.example.com"), + resource.TestCheckResourceAttr(resourceName, "origin.0.port", "5432"), + resource.TestCheckResourceAttr(resourceName, "origin.0.scheme", "postgres"), + resource.TestCheckResourceAttr(resourceName, "origin.0.user", "user"), + resource.TestCheckResourceAttr(resourceName, "caching.#", "1"), + resource.TestCheckResourceAttr(resourceName, "caching.0.disabled", "false"), + resource.TestCheckResourceAttr(resourceName, "caching.0.max_age", "1"), + resource.TestCheckResourceAttr(resourceName, "caching.0.stale_while_revalidate", "1"), + ), + }, + { + ResourceName: resourceName, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccCloudflareHyperdriveConfig_Minimum(t *testing.T) { + rnd := utils.GenerateRandomResourceName() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + resourceName := "cloudflare_hyperdrive_config." + rnd + + var origin = cloudflare.HyperdriveConfigOrigin{ + Database: "database", + Host: "host.example.com", + Port: 5432, + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.TestAccPreCheck(t) }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testHyperdriveConfigConfigMinimum( + rnd, + accountID, + rnd, + "password", + origin, + ), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", rnd), + resource.TestCheckResourceAttr(resourceName, "account_id", accountID), + resource.TestCheckResourceAttr(resourceName, "password", "password"), + resource.TestCheckResourceAttr(resourceName, "origin.#", "1"), + resource.TestCheckResourceAttr(resourceName, "origin.0.database", "database"), + resource.TestCheckResourceAttr(resourceName, "origin.0.host", "host.example.com"), + resource.TestCheckResourceAttr(resourceName, "origin.0.port", "5432"), + resource.TestCheckResourceAttr(resourceName, "origin.0.scheme", "postgres"), + resource.TestCheckResourceAttr(resourceName, "origin.0.user", "user"), + resource.TestCheckResourceAttr(resourceName, "caching.#", "1"), + resource.TestCheckResourceAttr(resourceName, "caching.0.disabled", "false"), + resource.TestCheckResourceAttr(resourceName, "caching.0.max_age", "1"), + resource.TestCheckResourceAttr(resourceName, "caching.0.stale_while_revalidate", "1"), + ), + }, + { + ResourceName: resourceName, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testHyperdriveConfigConfig( + rnd, accountId, name string, password string, origin cloudflare.HyperdriveConfigOrigin, caching cloudflare.HyperdriveConfigCaching, +) string { + return fmt.Sprintf(` + resource "cloudflare_hyperdrive_config" "%[1]s" { + account_id = "%[2]s" + name = "%[3]s" + password = "%[4]s" + origin = { + database = "%[5]s" + host = "%[6]s" + port = "%[7]s" + scheme = "%[8]s" + user = "%[9]s" + } + caching = { + disabled = %[10]s + max_age = %[11]s + stale_while_revalidate = %[12]s + } + }`, + rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), origin.Scheme, origin.User, fmt.Sprintf("%t", *caching.Disabled), fmt.Sprintf("%d", caching.MaxAge), fmt.Sprintf("%d", caching.StaleWhileRevalidate), + ) +} + +func testHyperdriveConfigConfigMinimum( + rnd, accountId, name string, password string, origin cloudflare.HyperdriveConfigOrigin, +) string { + return fmt.Sprintf(` + resource "cloudflare_hyperdrive_config" "%[1]s" { + account_id = "%[2]s" + name = "%[3]s" + password = "%[4]s" + origin = { + database = "%[5]s" + host = "%[6]s" + port = "%[7]s" + } + }`, + rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), + ) +} diff --git a/internal/framework/service/hyperdrive_config/schema.go b/internal/framework/service/hyperdrive_config/schema.go new file mode 100644 index 0000000000..edc24db524 --- /dev/null +++ b/internal/framework/service/hyperdrive_config/schema.go @@ -0,0 +1,94 @@ +package hyperdrive_config + +import ( + "context" + + "github.com/MakeNowJust/heredoc/v2" + "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" +) + +func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + MarkdownDescription: heredoc.Doc(` + The [Hyperdrive Config](https://developers.cloudflare.com/hyperdrive/) resource allows you to manage Cloudflare Hyperdrive Configs. +`), + + Attributes: map[string]schema.Attribute{ + consts.IDSchemaKey: schema.StringAttribute{ + Computed: true, + Optional: true, + MarkdownDescription: consts.IDSchemaDescription + " This is the hyperdrive config value.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + consts.AccountIDSchemaKey: schema.StringAttribute{ + MarkdownDescription: consts.AccountIDSchemaDescription, + Required: true, + }, + "name": schema.StringAttribute{ + MarkdownDescription: "The name of the Hyperdrive configuration.", + Required: true, + }, + "password": schema.StringAttribute{ + MarkdownDescription: "The password of the Hyperdrive configuration.", + Required: true, + Sensitive: true, + }, + "origin": schema.SingleNestedAttribute{ + MarkdownDescription: "The origin details for the Hyperdrive configuration.", + Required: true, + Attributes: map[string]schema.Attribute{ + "database": schema.StringAttribute{ + MarkdownDescription: "The name of your origin database.", + Required: true, + }, + "host": schema.StringAttribute{ + MarkdownDescription: "The host (hostname or IP) of your origin database.", + Required: true, + }, + "port": schema.Int64Attribute{ + MarkdownDescription: "The port (default: 5432 for Postgres) of your origin database.", + Optional: true, + Default: int64default.StaticInt64(5432), + Computed: true, + }, + "scheme": schema.StringAttribute{ + MarkdownDescription: "Specifies the URL scheme used to connect to your origin database.", + Optional: true, + Default: stringdefault.StaticString("postgres"), + Computed: true, + }, + "user": schema.StringAttribute{ + MarkdownDescription: "The user of your origin database.", + Optional: true, + }, + }, + }, + "caching": schema.SingleNestedAttribute{ + MarkdownDescription: "The caching details for the Hyperdrive configuration.", + Optional: true, + Attributes: map[string]schema.Attribute{ + "disabled": schema.BoolAttribute{ + MarkdownDescription: "Disable caching for this Hyperdrive configuration.", + Optional: true, + }, + "max_age": schema.Int64Attribute{ + MarkdownDescription: "The maximum age of the cache.", + Optional: true, + }, + "stale_while_revalidate": schema.Int64Attribute{ + MarkdownDescription: "The time to wait before revalidating the cache.", + Optional: true, + }, + }, + }, + }, + } +} From a94ec36f0896a17e67420d7df15f7af561cd66fb Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Thu, 8 Feb 2024 16:29:26 +0000 Subject: [PATCH 135/264] Update hyperdrive so password is nested in origin --- internal/framework/service/hyperdrive_config/model.go | 2 +- .../framework/service/hyperdrive_config/resource.go | 9 +++++---- .../service/hyperdrive_config/resource_test.go | 10 +++++----- internal/framework/service/hyperdrive_config/schema.go | 10 +++++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/internal/framework/service/hyperdrive_config/model.go b/internal/framework/service/hyperdrive_config/model.go index 4887c58e85..6c5074b31f 100644 --- a/internal/framework/service/hyperdrive_config/model.go +++ b/internal/framework/service/hyperdrive_config/model.go @@ -6,13 +6,13 @@ type HyperdriveConfigModel struct { AccountID types.String `tfsdk:"account_id"` ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` - Password types.String `tfsdk:"password"` Origin *HyperdriveConfigOriginModel `tfsdk:"origin"` Caching *HyperdriveConfigCachingModel `tfsdk:"caching"` } type HyperdriveConfigOriginModel struct { Database types.String `tfsdk:"database"` + Password types.String `tfsdk:"password"` Host types.String `tfsdk:"host"` Port types.Int64 `tfsdk:"port"` Scheme types.String `tfsdk:"scheme"` diff --git a/internal/framework/service/hyperdrive_config/resource.go b/internal/framework/service/hyperdrive_config/resource.go index 0fe2bd60b3..5f267eb52f 100644 --- a/internal/framework/service/hyperdrive_config/resource.go +++ b/internal/framework/service/hyperdrive_config/resource.go @@ -62,10 +62,10 @@ func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.Crea createHyperdriveConfig, err := r.client.CreateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.CreateHyperdriveConfigParams{ - Name: config.Name, - Password: data.Password.ValueString(), + Name: config.Name, Origin: cloudflare.HyperdriveConfigOrigin{ Database: config.Origin.Database, + Password: config.Origin.Password, Host: config.Origin.Host, Port: config.Origin.Port, Scheme: config.Origin.Scheme, @@ -121,10 +121,10 @@ func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.Upda config := buildHyperdriveConfigFromModel(ctx, data) updatedConfig, err := r.client.UpdateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.UpdateHyperdriveConfigParams{ - Name: config.Name, - Password: data.Password.ValueString(), + Name: config.Name, Origin: cloudflare.HyperdriveConfigOrigin{ Database: config.Origin.Database, + Password: config.Origin.Password, Host: config.Origin.Host, Port: config.Origin.Port, Scheme: config.Origin.Scheme, @@ -178,6 +178,7 @@ func buildHyperdriveConfigFromModel(ctx context.Context, config *HyperdriveConfi Name: config.Name.ValueString(), Origin: cloudflare.HyperdriveConfigOrigin{ Database: config.Origin.Database.ValueString(), + Password: config.Origin.Password.ValueString(), Host: config.Origin.Host.ValueString(), Port: int(config.Origin.Port.ValueInt64()), }, diff --git a/internal/framework/service/hyperdrive_config/resource_test.go b/internal/framework/service/hyperdrive_config/resource_test.go index d32cffcae2..32d28aedd1 100644 --- a/internal/framework/service/hyperdrive_config/resource_test.go +++ b/internal/framework/service/hyperdrive_config/resource_test.go @@ -163,8 +163,8 @@ func testHyperdriveConfigConfig( resource "cloudflare_hyperdrive_config" "%[1]s" { account_id = "%[2]s" name = "%[3]s" - password = "%[4]s" origin = { + password = "%[4]s" database = "%[5]s" host = "%[6]s" port = "%[7]s" @@ -188,11 +188,11 @@ func testHyperdriveConfigConfigMinimum( resource "cloudflare_hyperdrive_config" "%[1]s" { account_id = "%[2]s" name = "%[3]s" - password = "%[4]s" origin = { - database = "%[5]s" - host = "%[6]s" - port = "%[7]s" + password = "%[4]s" + database = "%[5]s" + host = "%[6]s" + port = "%[7]s" } }`, rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), diff --git a/internal/framework/service/hyperdrive_config/schema.go b/internal/framework/service/hyperdrive_config/schema.go index edc24db524..ec680a261e 100644 --- a/internal/framework/service/hyperdrive_config/schema.go +++ b/internal/framework/service/hyperdrive_config/schema.go @@ -36,11 +36,6 @@ func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.Sche MarkdownDescription: "The name of the Hyperdrive configuration.", Required: true, }, - "password": schema.StringAttribute{ - MarkdownDescription: "The password of the Hyperdrive configuration.", - Required: true, - Sensitive: true, - }, "origin": schema.SingleNestedAttribute{ MarkdownDescription: "The origin details for the Hyperdrive configuration.", Required: true, @@ -49,6 +44,11 @@ func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.Sche MarkdownDescription: "The name of your origin database.", Required: true, }, + "password": schema.StringAttribute{ + MarkdownDescription: "The password of the Hyperdrive configuration.", + Required: true, + Sensitive: true, + }, "host": schema.StringAttribute{ MarkdownDescription: "The host (hostname or IP) of your origin database.", Required: true, From e5e1a39b8879dfd0b1dd5b24526cf64895d18fdf Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Fri, 9 Feb 2024 09:43:40 +0000 Subject: [PATCH 136/264] Improve docs about defaults --- docs/resources/hyperdrive_config.md | 8 ++++---- internal/framework/service/hyperdrive_config/schema.go | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/resources/hyperdrive_config.md b/docs/resources/hyperdrive_config.md index b94217014b..98010a75fd 100644 --- a/docs/resources/hyperdrive_config.md +++ b/docs/resources/hyperdrive_config.md @@ -50,7 +50,6 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { - `account_id` (String) The account identifier to target for the resource. - `name` (String) The name of the Hyperdrive configuration. - `origin` (Attributes) The origin details for the Hyperdrive configuration. (see [below for nested schema](#nestedatt--origin)) -- `password` (String) The password of the Hyperdrive configuration. ### Optional @@ -64,12 +63,13 @@ Required: - `database` (String) The name of your origin database. - `host` (String) The host (hostname or IP) of your origin database. +- `password` (String, Sensitive) The password of the Hyperdrive configuration. Optional: -- `port` (Number) The port (default: 5432 for Postgres) of your origin database. -- `scheme` (String) Specifies the URL scheme used to connect to your origin database. -- `user` (String) The user of your origin database. +- `port` (Number) The port (default: 5432 for Postgres) of your origin database. If not specified, defaults to `5432`. +- `scheme` (String) Specifies the URL scheme used to connect to your origin database. If not specified, defaults to `postgres`. +- `user` (String) The user of your origin database. If not specified, defaults to `postgres`. diff --git a/internal/framework/service/hyperdrive_config/schema.go b/internal/framework/service/hyperdrive_config/schema.go index ec680a261e..563f241ae2 100644 --- a/internal/framework/service/hyperdrive_config/schema.go +++ b/internal/framework/service/hyperdrive_config/schema.go @@ -54,20 +54,22 @@ func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.Sche Required: true, }, "port": schema.Int64Attribute{ - MarkdownDescription: "The port (default: 5432 for Postgres) of your origin database.", + MarkdownDescription: "The port (default: 5432 for Postgres) of your origin database. If not specified, defaults to `5432`.", Optional: true, Default: int64default.StaticInt64(5432), Computed: true, }, "scheme": schema.StringAttribute{ - MarkdownDescription: "Specifies the URL scheme used to connect to your origin database.", + MarkdownDescription: "Specifies the URL scheme used to connect to your origin database. If not specified, defaults to `postgres`.", Optional: true, Default: stringdefault.StaticString("postgres"), Computed: true, }, "user": schema.StringAttribute{ - MarkdownDescription: "The user of your origin database.", + MarkdownDescription: "The user of your origin database. If not specified, defaults to `postgres`.", Optional: true, + Default: stringdefault.StaticString("postgres"), + Computed: true, }, }, }, From 55cd23e6a41f916c421b7532a5127746720520d3 Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Mon, 12 Feb 2024 09:01:18 +0000 Subject: [PATCH 137/264] Make hyperdrive fields required --- docs/resources/hyperdrive_config.md | 16 +++++++-------- .../cloudflare_hyperdrive_config/resource.tf | 7 +++++-- .../service/hyperdrive_config/schema.go | 20 ++++++------------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/docs/resources/hyperdrive_config.md b/docs/resources/hyperdrive_config.md index 98010a75fd..70c71605c7 100644 --- a/docs/resources/hyperdrive_config.md +++ b/docs/resources/hyperdrive_config.md @@ -16,10 +16,13 @@ The [Hyperdrive Config](https://developers.cloudflare.com/hyperdrive/) resource resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - password = "my-password" origin = { database = "postgres" + password = "my-password" host = "my-database.example.com" + port = 5432 + scheme = "postgres" + user = "my-user" } } @@ -27,9 +30,9 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - password = "my-password" origin = { database = "postgres" + password = "my-password" host = "my-database.example.com" port = 5432 scheme = "postgres" @@ -64,12 +67,9 @@ Required: - `database` (String) The name of your origin database. - `host` (String) The host (hostname or IP) of your origin database. - `password` (String, Sensitive) The password of the Hyperdrive configuration. - -Optional: - -- `port` (Number) The port (default: 5432 for Postgres) of your origin database. If not specified, defaults to `5432`. -- `scheme` (String) Specifies the URL scheme used to connect to your origin database. If not specified, defaults to `postgres`. -- `user` (String) The user of your origin database. If not specified, defaults to `postgres`. +- `port` (Number) The port (default: 5432 for Postgres) of your origin database. +- `scheme` (String) Specifies the URL scheme used to connect to your origin database. +- `user` (String) The user of your origin database. diff --git a/examples/resources/cloudflare_hyperdrive_config/resource.tf b/examples/resources/cloudflare_hyperdrive_config/resource.tf index b26b536d78..a866bc5ee0 100644 --- a/examples/resources/cloudflare_hyperdrive_config/resource.tf +++ b/examples/resources/cloudflare_hyperdrive_config/resource.tf @@ -2,10 +2,13 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - password = "my-password" origin = { database = "postgres" + password = "my-password" host = "my-database.example.com" + port = 5432 + scheme = "postgres" + user = "my-user" } } @@ -13,9 +16,9 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - password = "my-password" origin = { database = "postgres" + password = "my-password" host = "my-database.example.com" port = 5432 scheme = "postgres" diff --git a/internal/framework/service/hyperdrive_config/schema.go b/internal/framework/service/hyperdrive_config/schema.go index 563f241ae2..08c0ffb54a 100644 --- a/internal/framework/service/hyperdrive_config/schema.go +++ b/internal/framework/service/hyperdrive_config/schema.go @@ -7,9 +7,7 @@ import ( "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" ) @@ -54,22 +52,16 @@ func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.Sche Required: true, }, "port": schema.Int64Attribute{ - MarkdownDescription: "The port (default: 5432 for Postgres) of your origin database. If not specified, defaults to `5432`.", - Optional: true, - Default: int64default.StaticInt64(5432), - Computed: true, + MarkdownDescription: "The port (default: 5432 for Postgres) of your origin database.", + Required: true, }, "scheme": schema.StringAttribute{ - MarkdownDescription: "Specifies the URL scheme used to connect to your origin database. If not specified, defaults to `postgres`.", - Optional: true, - Default: stringdefault.StaticString("postgres"), - Computed: true, + MarkdownDescription: "Specifies the URL scheme used to connect to your origin database.", + Required: true, }, "user": schema.StringAttribute{ - MarkdownDescription: "The user of your origin database. If not specified, defaults to `postgres`.", - Optional: true, - Default: stringdefault.StaticString("postgres"), - Computed: true, + MarkdownDescription: "The user of your origin database.", + Required: true, }, }, }, From b76e5857e73be369246057dd8ba958f68469f458 Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Mon, 19 Feb 2024 12:49:03 +0000 Subject: [PATCH 138/264] Fix linting error --- internal/framework/service/hyperdrive_config/resource.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/framework/service/hyperdrive_config/resource.go b/internal/framework/service/hyperdrive_config/resource.go index 5f267eb52f..574fba86e8 100644 --- a/internal/framework/service/hyperdrive_config/resource.go +++ b/internal/framework/service/hyperdrive_config/resource.go @@ -58,7 +58,7 @@ func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.Crea return } - config := buildHyperdriveConfigFromModel(ctx, data) + config := buildHyperdriveConfigFromModel(data) createHyperdriveConfig, err := r.client.CreateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.CreateHyperdriveConfigParams{ @@ -118,7 +118,7 @@ func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.Upda return } - config := buildHyperdriveConfigFromModel(ctx, data) + config := buildHyperdriveConfigFromModel(data) updatedConfig, err := r.client.UpdateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.UpdateHyperdriveConfigParams{ Name: config.Name, @@ -173,7 +173,7 @@ func (r *HyperdriveConfigResource) ImportState(ctx context.Context, req resource resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("id"), idParts[1])...) } -func buildHyperdriveConfigFromModel(ctx context.Context, config *HyperdriveConfigModel) cloudflare.HyperdriveConfig { +func buildHyperdriveConfigFromModel(config *HyperdriveConfigModel) cloudflare.HyperdriveConfig { built := cloudflare.HyperdriveConfig{ Name: config.Name.ValueString(), Origin: cloudflare.HyperdriveConfigOrigin{ From ae65f57b46f41d6384892ac15b4f5ce391ce92c9 Mon Sep 17 00:00:00 2001 From: Carl Henderson Date: Mon, 26 Feb 2024 14:28:01 +0000 Subject: [PATCH 139/264] Fix issues with hyperdrive_config - Drop support for max_age and stale_while_revalidate as the api does not return these values. The docs also state they are not yet used. - Fix the caching schema to allow it to be computed. I have ran the tests, however they require a real db to connect to, so will fial if the configuration is not updated to point to a real db. --- docs/resources/hyperdrive_config.md | 4 - .../cloudflare_hyperdrive_config/resource.tf | 2 - .../service/hyperdrive_config/model.go | 25 ++++-- .../service/hyperdrive_config/resource.go | 84 ++++++++++--------- .../hyperdrive_config/resource_test.go | 70 +++++++--------- .../service/hyperdrive_config/schema.go | 10 +-- tools/cmd/sync-github-issue-to-jira/main.go | 6 +- 7 files changed, 99 insertions(+), 102 deletions(-) diff --git a/docs/resources/hyperdrive_config.md b/docs/resources/hyperdrive_config.md index 70c71605c7..3f451a4dfe 100644 --- a/docs/resources/hyperdrive_config.md +++ b/docs/resources/hyperdrive_config.md @@ -40,8 +40,6 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { } caching = { disabled = false - max_age = 60 - stale_while_revalidate = 30 } } ``` @@ -78,8 +76,6 @@ Required: Optional: - `disabled` (Boolean) Disable caching for this Hyperdrive configuration. -- `max_age` (Number) The maximum age of the cache. -- `stale_while_revalidate` (Number) The time to wait before revalidating the cache. ## Import diff --git a/examples/resources/cloudflare_hyperdrive_config/resource.tf b/examples/resources/cloudflare_hyperdrive_config/resource.tf index a866bc5ee0..9ed93c4027 100644 --- a/examples/resources/cloudflare_hyperdrive_config/resource.tf +++ b/examples/resources/cloudflare_hyperdrive_config/resource.tf @@ -26,8 +26,6 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { } caching = { disabled = false - max_age = 60 - stale_while_revalidate = 30 } } diff --git a/internal/framework/service/hyperdrive_config/model.go b/internal/framework/service/hyperdrive_config/model.go index 6c5074b31f..16977b0b7d 100644 --- a/internal/framework/service/hyperdrive_config/model.go +++ b/internal/framework/service/hyperdrive_config/model.go @@ -1,13 +1,16 @@ package hyperdrive_config -import "github.com/hashicorp/terraform-plugin-framework/types" +import ( + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" +) type HyperdriveConfigModel struct { - AccountID types.String `tfsdk:"account_id"` - ID types.String `tfsdk:"id"` - Name types.String `tfsdk:"name"` - Origin *HyperdriveConfigOriginModel `tfsdk:"origin"` - Caching *HyperdriveConfigCachingModel `tfsdk:"caching"` + AccountID types.String `tfsdk:"account_id"` + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Origin *HyperdriveConfigOriginModel `tfsdk:"origin"` + Caching types.Object `tfsdk:"caching"` } type HyperdriveConfigOriginModel struct { @@ -20,7 +23,11 @@ type HyperdriveConfigOriginModel struct { } type HyperdriveConfigCachingModel struct { - Disabled types.Bool `tfsdk:"disabled"` - MaxAge types.Int64 `tfsdk:"max_age"` - StaleWhileRevalidate types.Int64 `tfsdk:"stale_while_revalidate"` + Disabled types.Bool `tfsdk:"disabled"` +} + +func (m HyperdriveConfigCachingModel) AttributeTypes() map[string]attr.Type { + return map[string]attr.Type{ + "disabled": types.BoolType, + } } diff --git a/internal/framework/service/hyperdrive_config/resource.go b/internal/framework/service/hyperdrive_config/resource.go index 574fba86e8..f63cf2147d 100644 --- a/internal/framework/service/hyperdrive_config/resource.go +++ b/internal/framework/service/hyperdrive_config/resource.go @@ -8,9 +8,11 @@ import ( "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/flatteners" + "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) // Ensure provider defined types fully satisfy framework interfaces. @@ -51,14 +53,16 @@ func (r *HyperdriveConfigResource) Configure(ctx context.Context, req resource.C func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { var data *HyperdriveConfigModel + var caching *HyperdriveConfigCachingModel resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + resp.Diagnostics.Append(data.Caching.As(ctx, &caching, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: true, UnhandledUnknownAsEmpty: true})...) if resp.Diagnostics.HasError() { return } - config := buildHyperdriveConfigFromModel(data) + config := buildHyperdriveConfigFromModel(data, caching) createHyperdriveConfig, err := r.client.CreateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.CreateHyperdriveConfigParams{ @@ -72,19 +76,16 @@ func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.Crea User: config.Origin.User, }, Caching: cloudflare.HyperdriveConfigCaching{ - Disabled: config.Caching.Disabled, - MaxAge: config.Caching.MaxAge, - StaleWhileRevalidate: config.Caching.StaleWhileRevalidate, + Disabled: config.Caching.Disabled, }, }) if err != nil { resp.Diagnostics.AddError("Error creating hyperdrive config", err.Error()) } - data = buildHyperdriveConfigModelFromHyperdriveConfig( - data.AccountID, - createHyperdriveConfig, - ) + var diags diag.Diagnostics + data, diags = buildHyperdriveConfigModelFromHyperdriveConfig(ctx, data, createHyperdriveConfig) + resp.Diagnostics.Append(diags...) resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } @@ -104,21 +105,25 @@ func (r *HyperdriveConfigResource) Read(ctx context.Context, req resource.ReadRe resp.Diagnostics.AddError("Error reading hyperdrive config", err.Error()) } - data = buildHyperdriveConfigModelFromHyperdriveConfig(data.AccountID, config) + var diags diag.Diagnostics + data, diags = buildHyperdriveConfigModelFromHyperdriveConfig(ctx, data, config) + resp.Diagnostics.Append(diags...) resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { var data *HyperdriveConfigModel + var caching *HyperdriveConfigCachingModel resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + resp.Diagnostics.Append(data.Caching.As(ctx, &caching, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: true, UnhandledUnknownAsEmpty: true})...) if resp.Diagnostics.HasError() { return } - config := buildHyperdriveConfigFromModel(data) + config := buildHyperdriveConfigFromModel(data, caching) updatedConfig, err := r.client.UpdateHyperdriveConfig(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), cloudflare.UpdateHyperdriveConfigParams{ Name: config.Name, @@ -131,9 +136,7 @@ func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.Upda User: config.Origin.User, }, Caching: cloudflare.HyperdriveConfigCaching{ - Disabled: config.Caching.Disabled, - MaxAge: config.Caching.MaxAge, - StaleWhileRevalidate: config.Caching.StaleWhileRevalidate, + Disabled: config.Caching.Disabled, }, }) @@ -141,10 +144,9 @@ func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.Upda resp.Diagnostics.AddError("Error updating hyperdrive config", err.Error()) } - data = buildHyperdriveConfigModelFromHyperdriveConfig( - data.AccountID, - updatedConfig, - ) + var diags diag.Diagnostics + data, diags = buildHyperdriveConfigModelFromHyperdriveConfig(ctx, data, updatedConfig) + resp.Diagnostics.Append(diags...) resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } @@ -173,7 +175,7 @@ func (r *HyperdriveConfigResource) ImportState(ctx context.Context, req resource resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("id"), idParts[1])...) } -func buildHyperdriveConfigFromModel(config *HyperdriveConfigModel) cloudflare.HyperdriveConfig { +func buildHyperdriveConfigFromModel(config *HyperdriveConfigModel, caching *HyperdriveConfigCachingModel) cloudflare.HyperdriveConfig { built := cloudflare.HyperdriveConfig{ Name: config.Name.ValueString(), Origin: cloudflare.HyperdriveConfigOrigin{ @@ -192,42 +194,48 @@ func buildHyperdriveConfigFromModel(config *HyperdriveConfigModel) cloudflare.Hy built.Origin.User = config.Origin.User.ValueString() } - if !config.Caching.Disabled.IsNull() || !config.Caching.MaxAge.IsNull() || !config.Caching.StaleWhileRevalidate.IsNull() { - built.Caching = cloudflare.HyperdriveConfigCaching{} - } + built.Caching = cloudflare.HyperdriveConfigCaching{} - if !config.Caching.Disabled.IsNull() { - built.Caching.Disabled = cloudflare.BoolPtr(config.Caching.Disabled.ValueBool()) + if caching != nil && !caching.Disabled.IsNull() { + built.Caching.Disabled = cloudflare.BoolPtr(caching.Disabled.ValueBool()) } - if !config.Caching.MaxAge.IsNull() { - built.Caching.MaxAge = int(config.Caching.MaxAge.ValueInt64()) + return built +} + +func buildHyperdriveConfigModelFromHyperdriveConfig(ctx context.Context, data *HyperdriveConfigModel, config cloudflare.HyperdriveConfig) (*HyperdriveConfigModel, diag.Diagnostics) { + var scheme = flatteners.String("postgres") + if data.Origin != nil { + scheme = data.Origin.Scheme } - if !config.Caching.StaleWhileRevalidate.IsNull() { - built.Caching.StaleWhileRevalidate = int(config.Caching.StaleWhileRevalidate.ValueInt64()) + var password = flatteners.String("") + if data.Origin != nil { + password = data.Origin.Password } - return built -} + var caching, diags = types.ObjectValueFrom( + ctx, + HyperdriveConfigCachingModel{}.AttributeTypes(), + HyperdriveConfigCachingModel{ + Disabled: types.BoolValue(*config.Caching.Disabled), + }, + ) -func buildHyperdriveConfigModelFromHyperdriveConfig(accountID types.String, config cloudflare.HyperdriveConfig) *HyperdriveConfigModel { built := HyperdriveConfigModel{ - AccountID: accountID, + AccountID: data.AccountID, + ID: flatteners.String(config.ID), Name: flatteners.String(config.Name), Origin: &HyperdriveConfigOriginModel{ Database: flatteners.String(config.Origin.Database), Host: flatteners.String(config.Origin.Host), Port: flatteners.Int64(int64(config.Origin.Port)), - Scheme: flatteners.String(config.Origin.Scheme), User: flatteners.String(config.Origin.User), + Scheme: scheme, + Password: password, }, - Caching: &HyperdriveConfigCachingModel{ - Disabled: flatteners.Bool(config.Caching.Disabled), - MaxAge: flatteners.Int64(int64(config.Caching.MaxAge)), - StaleWhileRevalidate: flatteners.Int64(int64(config.Caching.StaleWhileRevalidate)), - }, + Caching: caching, } - return &built + return &built, diags } diff --git a/internal/framework/service/hyperdrive_config/resource_test.go b/internal/framework/service/hyperdrive_config/resource_test.go index 32d28aedd1..87bb453f21 100644 --- a/internal/framework/service/hyperdrive_config/resource_test.go +++ b/internal/framework/service/hyperdrive_config/resource_test.go @@ -60,12 +60,10 @@ func TestAccCloudflareHyperdriveConfig_Basic(t *testing.T) { User: "user", } - var disabled = false + var disabled = true var caching = cloudflare.HyperdriveConfigCaching{ - Disabled: &disabled, - MaxAge: 1, - StaleWhileRevalidate: 1, + Disabled: &disabled, } resource.ParallelTest(t, resource.TestCase{ @@ -84,24 +82,21 @@ func TestAccCloudflareHyperdriveConfig_Basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", rnd), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), - resource.TestCheckResourceAttr(resourceName, "password", "password"), - resource.TestCheckResourceAttr(resourceName, "origin.#", "1"), - resource.TestCheckResourceAttr(resourceName, "origin.0.database", "database"), - resource.TestCheckResourceAttr(resourceName, "origin.0.host", "host.example.com"), - resource.TestCheckResourceAttr(resourceName, "origin.0.port", "5432"), - resource.TestCheckResourceAttr(resourceName, "origin.0.scheme", "postgres"), - resource.TestCheckResourceAttr(resourceName, "origin.0.user", "user"), - resource.TestCheckResourceAttr(resourceName, "caching.#", "1"), - resource.TestCheckResourceAttr(resourceName, "caching.0.disabled", "false"), - resource.TestCheckResourceAttr(resourceName, "caching.0.max_age", "1"), - resource.TestCheckResourceAttr(resourceName, "caching.0.stale_while_revalidate", "1"), + resource.TestCheckResourceAttr(resourceName, "origin.database", "database"), + resource.TestCheckResourceAttr(resourceName, "origin.host", "host.example.com"), + resource.TestCheckResourceAttr(resourceName, "origin.port", "5432"), + resource.TestCheckResourceAttr(resourceName, "origin.scheme", "postgres"), + resource.TestCheckResourceAttr(resourceName, "origin.user", "user"), + resource.TestCheckResourceAttr(resourceName, "origin.password", "password"), + resource.TestCheckResourceAttr(resourceName, "caching.disabled", "true"), ), }, { - ResourceName: resourceName, - ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), - ImportState: true, - ImportStateVerify: true, + ResourceName: resourceName, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"origin.password"}, }, }, }) @@ -116,6 +111,8 @@ func TestAccCloudflareHyperdriveConfig_Minimum(t *testing.T) { Database: "database", Host: "host.example.com", Port: 5432, + Scheme: "postgres", + User: "user", } resource.ParallelTest(t, resource.TestCase{ @@ -133,24 +130,21 @@ func TestAccCloudflareHyperdriveConfig_Minimum(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", rnd), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), - resource.TestCheckResourceAttr(resourceName, "password", "password"), - resource.TestCheckResourceAttr(resourceName, "origin.#", "1"), - resource.TestCheckResourceAttr(resourceName, "origin.0.database", "database"), - resource.TestCheckResourceAttr(resourceName, "origin.0.host", "host.example.com"), - resource.TestCheckResourceAttr(resourceName, "origin.0.port", "5432"), - resource.TestCheckResourceAttr(resourceName, "origin.0.scheme", "postgres"), - resource.TestCheckResourceAttr(resourceName, "origin.0.user", "user"), - resource.TestCheckResourceAttr(resourceName, "caching.#", "1"), - resource.TestCheckResourceAttr(resourceName, "caching.0.disabled", "false"), - resource.TestCheckResourceAttr(resourceName, "caching.0.max_age", "1"), - resource.TestCheckResourceAttr(resourceName, "caching.0.stale_while_revalidate", "1"), + resource.TestCheckResourceAttr(resourceName, "origin.database", "database"), + resource.TestCheckResourceAttr(resourceName, "origin.host", "host.example.com"), + resource.TestCheckResourceAttr(resourceName, "origin.port", "5432"), + resource.TestCheckResourceAttr(resourceName, "origin.scheme", "postgres"), + resource.TestCheckResourceAttr(resourceName, "origin.user", "user"), + resource.TestCheckResourceAttr(resourceName, "origin.password", "password"), + resource.TestCheckResourceAttr(resourceName, "caching.disabled", "false"), ), }, { - ResourceName: resourceName, - ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), - ImportState: true, - ImportStateVerify: true, + ResourceName: resourceName, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"origin.password"}, }, }, }) @@ -173,11 +167,9 @@ func testHyperdriveConfigConfig( } caching = { disabled = %[10]s - max_age = %[11]s - stale_while_revalidate = %[12]s } }`, - rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), origin.Scheme, origin.User, fmt.Sprintf("%t", *caching.Disabled), fmt.Sprintf("%d", caching.MaxAge), fmt.Sprintf("%d", caching.StaleWhileRevalidate), + rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), origin.Scheme, origin.User, fmt.Sprintf("%t", *caching.Disabled), ) } @@ -193,8 +185,10 @@ func testHyperdriveConfigConfigMinimum( database = "%[5]s" host = "%[6]s" port = "%[7]s" + scheme = "%[8]s" + user = "%[9]s" } }`, - rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), + rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), origin.Scheme, origin.User, ) } diff --git a/internal/framework/service/hyperdrive_config/schema.go b/internal/framework/service/hyperdrive_config/schema.go index 08c0ffb54a..ab10bcb88e 100644 --- a/internal/framework/service/hyperdrive_config/schema.go +++ b/internal/framework/service/hyperdrive_config/schema.go @@ -68,18 +68,12 @@ func (r *HyperdriveConfigResource) Schema(ctx context.Context, req resource.Sche "caching": schema.SingleNestedAttribute{ MarkdownDescription: "The caching details for the Hyperdrive configuration.", Optional: true, + Computed: true, Attributes: map[string]schema.Attribute{ "disabled": schema.BoolAttribute{ MarkdownDescription: "Disable caching for this Hyperdrive configuration.", Optional: true, - }, - "max_age": schema.Int64Attribute{ - MarkdownDescription: "The maximum age of the cache.", - Optional: true, - }, - "stale_while_revalidate": schema.Int64Attribute{ - MarkdownDescription: "The time to wait before revalidating the cache.", - Optional: true, + Computed: true, }, }, }, diff --git a/tools/cmd/sync-github-issue-to-jira/main.go b/tools/cmd/sync-github-issue-to-jira/main.go index 738dd54424..ed5499ffb9 100644 --- a/tools/cmd/sync-github-issue-to-jira/main.go +++ b/tools/cmd/sync-github-issue-to-jira/main.go @@ -151,15 +151,15 @@ var ( }, "service/addressing": { teamName: "Address", - owner: "jabley", + owner: "jabley", }, "service/zero_trust_devices": { teamName: "ZT Device Services", - owner: "suhrit", + owner: "suhrit", }, "service/dns": { teamName: "DNS", - owner: "elmerot", + owner: "elmerot", }, } ) From 4961d36436d607cf3e61e9b1d6cea4cfc74dfc02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:12:20 +0000 Subject: [PATCH 140/264] build(deps): bump the aws group with 3 updates Bumps the aws group with 3 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.4 to 1.27.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.4...config/v1.27.5) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.4 to 1.17.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.5/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.4...v1.17.5) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.1 to 1.51.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.51.1...service/s3/v1.51.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index eaaa8e6e78..59381681d0 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.25.2 - github.com/aws/aws-sdk-go-v2/config v1.27.4 - github.com/aws/aws-sdk-go-v2/credentials v1.17.4 - github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1 + github.com/aws/aws-sdk-go-v2/config v1.27.5 + github.com/aws/aws-sdk-go-v2/credentials v1.17.5 + github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -57,12 +57,12 @@ require ( github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.2 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 7319750afc..9575be0bf4 100644 --- a/go.sum +++ b/go.sum @@ -15,10 +15,10 @@ github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HU github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.4 h1:AhfWb5ZwimdsYTgP7Od8E9L1u4sKmDW2ZVeLcf2O42M= -github.com/aws/aws-sdk-go-v2/config v1.27.4/go.mod h1:zq2FFXK3A416kiukwpsd+rD4ny6JC7QSkp4QdN1Mp2g= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4 h1:h5Vztbd8qLppiPwX+y0Q6WiwMZgpd9keKe2EAENgAuI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4/go.mod h1:+30tpwrkOgvkJL1rUZuRLoxcJwtI/OkeBLYnHxJtVe0= +github.com/aws/aws-sdk-go-v2/config v1.27.5 h1:brBPsyRFQn97M1ZhQ9tLXkO7Zytiar0NS06FGmEJBdg= +github.com/aws/aws-sdk-go-v2/config v1.27.5/go.mod h1:I53uvsfddRRTG5YcC4n5Z3aOD1BU8hYCoIG7iEJG4wM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.5 h1:yn3zSvIKC2NZIs40cY3kckcy9Zma96PrRR07N54PCvY= +github.com/aws/aws-sdk-go-v2/credentials v1.17.5/go.mod h1:8JcKPAGZVnDWuR5lusAwmrSDtZnDIAnpQWaDC9RFt2g= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= @@ -31,20 +31,20 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 h1:en92G0Z7xlksoOylkUhuBSfJgijC github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2/go.mod h1:HgtQ/wN5G+8QSlK62lbOtNwQ3wTSByJ4wH2rCkPt+AE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2 h1:zSdTXYLwuXDNPUS+V41i1SFDXG7V0ITp0D9UT9Cvl18= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.2/go.mod h1:v8m8k+qVy95nYi7d56uP1QImleIIY25BPiNJYzPBdFE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3 h1:fpFzBoro/MetYBk+8kxoQGMeKSkXbymnbUh2gy6nVgk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3/go.mod h1:qmQPbMe5NQk/nEmpkl8iHyCSREJjEbRUrnqHpHabLlM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3 h1:x0N5ftQzgcfRpCpTiyZC40pvNUJYhzf4UgCsAyO6/P8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 h1:1oY1AVEisRI4HNuFoLdRUB0hC63ylDAN6Me3MrfclEg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2/go.mod h1:KZ03VgvZwSjkT7fOetQ/wF3MZUvYFirlI1H5NklUNsY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1 h1:juZ+uGargZOrQGNxkVHr9HHR/0N+Yu8uekQnV7EAVRs= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.1/go.mod h1:SoR0c7Jnq8Tpmt0KSLXIavhjmaagRqQpe9r70W3POJg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2 h1:ukAaTX8n/pX0Essg9CxW8VCjACv75vnNo2GRONR1w1Q= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2/go.mod h1:wt4wZz/CBlJJwY0L7X6vPQ9njh2aHi59knqpJ6B/2cM= github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 h1:3I2cBEYgKhrWlwyZgfpSO2BpaMY1LHPqXYk/QGlu2ew= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1CD3efFLOUNH77MrUCvx5oA= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.2 h1:0YjXuWdYHvsm0HnT4vO8XpwG1D+i2roxSCBoN6deJ7M= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.2/go.mod h1:jI+FWmYkSMn+4APWmZiZTgt0oM0TrvymD51FMqCnWgA= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 93abeb3e87dba663a3797d92e2b2cb15c50eec5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:12:26 +0000 Subject: [PATCH 141/264] build(deps): bump golang.org/x/net from 0.21.0 to 0.22.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/net/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index eaaa8e6e78..11ada8482b 100644 --- a/go.mod +++ b/go.mod @@ -24,9 +24,9 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 github.com/zclconf/go-cty v1.14.2 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/net v0.21.0 - golang.org/x/sys v0.17.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.22.0 + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index 7319750afc..2c0a73552f 100644 --- a/go.sum +++ b/go.sum @@ -211,8 +211,8 @@ github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -222,8 +222,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -239,12 +239,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From f81ccf0b99d3779fac0091b7be8f2f31b18e7235 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Mar 2024 23:12:34 +0000 Subject: [PATCH 142/264] add CHANGELOG for #3159 --- .changelog/3159.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changelog/3159.txt diff --git a/.changelog/3159.txt b/.changelog/3159.txt new file mode 100644 index 0000000000..d5ea1bb001 --- /dev/null +++ b/.changelog/3159.txt @@ -0,0 +1,9 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.4 to 1.27.5 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.4 to 1.17.5 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.1 to 1.51.2 +``` From 21b26760b83fe427f1472445c0c99ab90a267272 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Mar 2024 23:12:41 +0000 Subject: [PATCH 143/264] add CHANGELOG for #3160 --- .changelog/3160.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3160.txt diff --git a/.changelog/3160.txt b/.changelog/3160.txt new file mode 100644 index 0000000000..b8d249969a --- /dev/null +++ b/.changelog/3160.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump golang.org/x/net from 0.21.0 to 0.22.0 +``` From fd4e7c3cb93dd59d825d13a961687a664e04b100 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 5 Mar 2024 03:12:40 +0000 Subject: [PATCH 144/264] Update CHANGELOG.md for #3160 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71b8dbc12f..a09c43f955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ DEPENDENCIES: * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) * provider: bump github.com/stretchr/testify from 1.8.4 to 1.9.0 ([#3157](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3157)) +* provider: bump golang.org/x/net from 0.21.0 to 0.22.0 ([#3160](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3160)) ## 4.25.0 (February 21st, 2024) From 0047f869fdefe8d80f760c189cc14e5e896a7a11 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 5 Mar 2024 03:26:29 +0000 Subject: [PATCH 145/264] Update CHANGELOG.md for #3159 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a09c43f955..b844a52bf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,12 +13,15 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.1 to 1.27.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.4 to 1.27.5 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.4 to 1.17.5 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.1 to 1.51.2 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 ([#3148](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3148)) From ed85736e8e3f0be08f14dd022344c48500ec78e9 Mon Sep 17 00:00:00 2001 From: Kyle Hiller Date: Tue, 20 Feb 2024 10:47:07 -0500 Subject: [PATCH 146/264] AUTH-5858 add name_id_transform_jsonata field to access applications --- .changelog/3132.txt | 3 ++ docs/resources/access_application.md | 2 ++ ...urce_cloudflare_access_application_test.go | 4 +++ .../schema_cloudflare_access_application.go | 31 ++++++++++++------- 4 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 .changelog/3132.txt diff --git a/.changelog/3132.txt b/.changelog/3132.txt new file mode 100644 index 0000000000..3d838b96da --- /dev/null +++ b/.changelog/3132.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_access_application: adds `name_id_transform_jsonata` to SaaS applications +``` \ No newline at end of file diff --git a/docs/resources/access_application.md b/docs/resources/access_application.md index a4ef33141a..74756c292e 100644 --- a/docs/resources/access_application.md +++ b/docs/resources/access_application.md @@ -134,6 +134,8 @@ Optional: - `custom_attribute` (Block List) Custom attribute mapped from IDPs. (see [below for nested schema](#nestedblock--saas_app--custom_attribute)) - `default_relay_state` (String) The relay state used if not provided by the identity provider. - `name_id_format` (String) The format of the name identifier sent to the SaaS application. Defaults to `email`. +- `name_id_transform_jsonata` (String) A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting. + Read-Only: diff --git a/internal/sdkv2provider/resource_cloudflare_access_application_test.go b/internal/sdkv2provider/resource_cloudflare_access_application_test.go index a823326ed2..4789ee2ff5 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application_test.go @@ -188,6 +188,8 @@ func TestAccCloudflareAccessApplication_WithSAMLSaas(t *testing.T) { resource.TestCheckResourceAttr(name, "saas_app.0.consumer_service_url", "https://saas-app.example/sso/saml/consume"), resource.TestCheckResourceAttr(name, "saas_app.0.name_id_format", "email"), resource.TestCheckResourceAttr(name, "saas_app.0.default_relay_state", "https://saas-app.example"), + resource.TestCheckResourceAttr(name, "saas_app.0.name_id_transform_jsonata", "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"), + resource.TestCheckResourceAttrSet(name, "saas_app.0.idp_entity_id"), resource.TestCheckResourceAttrSet(name, "saas_app.0.public_key"), resource.TestCheckResourceAttrSet(name, "saas_app.0.sso_endpoint"), @@ -222,6 +224,7 @@ func TestAccCloudflareAccessApplication_WithSAMLSaas_Import(t *testing.T) { resource.TestCheckResourceAttr(name, "saas_app.0.consumer_service_url", "https://saas-app.example/sso/saml/consume"), resource.TestCheckResourceAttr(name, "saas_app.0.name_id_format", "email"), resource.TestCheckResourceAttr(name, "saas_app.0.default_relay_state", "https://saas-app.example"), + resource.TestCheckResourceAttr(name, "saas_app.0.name_id_transform_jsonata", "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"), resource.TestCheckResourceAttr(name, "saas_app.0.custom_attribute.#", "2"), resource.TestCheckResourceAttr(name, "saas_app.0.custom_attribute.0.name", "email"), @@ -767,6 +770,7 @@ resource "cloudflare_access_application" "%[1]s" { sp_entity_id = "saas-app.example" name_id_format = "email" default_relay_state = "https://saas-app.example" + name_id_transform_jsonata = "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')" custom_attribute { name = "email" name_format = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 873194e9a9..0eef97152a 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -286,6 +286,11 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { Optional: true, Description: "The relay state used if not provided by the identity provider.", }, + "name_id_transform_jsonata": { + Type: schema.TypeString, + Optional: true, + Description: "A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting.", + }, }, }, }, @@ -548,12 +553,12 @@ func convertSAMLAttributeSchemaToStruct(data map[string]interface{}) cloudflare. func convertSaasSchemaToStruct(d *schema.ResourceData) *cloudflare.SaasApplication { SaasConfig := cloudflare.SaasApplication{} if _, ok := d.GetOk("saas_app"); ok { - auth_type := "saml" - if raw_auth_type, ok := d.GetOk("saas_app.0.auth_type"); ok { - auth_type = raw_auth_type.(string) + authType := "saml" + if rawAuthType, ok := d.GetOk("saas_app.0.auth_type"); ok { + authType = rawAuthType.(string) } - SaasConfig.AuthType = auth_type - if auth_type == "oidc" { + SaasConfig.AuthType = authType + if authType == "oidc" { SaasConfig.ClientID = d.Get("saas_app.0.client_id").(string) SaasConfig.AppLauncherURL = d.Get("saas_app.0.app_launcher_url").(string) SaasConfig.RedirectURIs = expandInterfaceToStringList(d.Get("saas_app.0.redirect_uris").(*schema.Set).List()) @@ -565,6 +570,7 @@ func convertSaasSchemaToStruct(d *schema.ResourceData) *cloudflare.SaasApplicati SaasConfig.ConsumerServiceUrl = d.Get("saas_app.0.consumer_service_url").(string) SaasConfig.NameIDFormat = d.Get("saas_app.0.name_id_format").(string) SaasConfig.DefaultRelayState = d.Get("saas_app.0.default_relay_state").(string) + SaasConfig.NameIDTransformJsonata = d.Get("saas_app.0.name_id_transform_jsonata").(string) customAttributes, _ := d.Get("saas_app.0.custom_attribute").([]interface{}) for _, customAttributes := range customAttributes { @@ -682,13 +688,14 @@ func convertSaasStructToSchema(d *schema.ResourceData, app *cloudflare.SaasAppli return []interface{}{m} } else { m := map[string]interface{}{ - "sp_entity_id": app.SPEntityID, - "consumer_service_url": app.ConsumerServiceUrl, - "name_id_format": app.NameIDFormat, - "idp_entity_id": app.IDPEntityID, - "public_key": app.PublicKey, - "sso_endpoint": app.SSOEndpoint, - "default_relay_state": app.DefaultRelayState, + "sp_entity_id": app.SPEntityID, + "consumer_service_url": app.ConsumerServiceUrl, + "name_id_format": app.NameIDFormat, + "idp_entity_id": app.IDPEntityID, + "public_key": app.PublicKey, + "sso_endpoint": app.SSOEndpoint, + "default_relay_state": app.DefaultRelayState, + "name_id_transform_jsonata": app.NameIDTransformJsonata, } var customAttributes []interface{} From 97d2bb4b3d57f0be350cf8df50f35dd0051c5344 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:04:42 +0000 Subject: [PATCH 147/264] build(deps): bump the aws group with 3 updates Bumps the aws group with 3 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.5 to 1.27.6 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.5...config/v1.27.6) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.5 to 1.17.6 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.6/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.5...v1.17.6) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.2 to 1.51.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.51.2...service/s3/v1.51.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index e89d7360e7..15a9feaeb4 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.25.2 - github.com/aws/aws-sdk-go-v2/config v1.27.5 - github.com/aws/aws-sdk-go-v2/credentials v1.17.5 - github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2 + github.com/aws/aws-sdk-go-v2/config v1.27.6 + github.com/aws/aws-sdk-go-v2/credentials v1.17.6 + github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -57,12 +57,12 @@ require ( github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.3 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 38ed4c5b89..e9174dbd25 100644 --- a/go.sum +++ b/go.sum @@ -15,10 +15,10 @@ github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HU github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.5 h1:brBPsyRFQn97M1ZhQ9tLXkO7Zytiar0NS06FGmEJBdg= -github.com/aws/aws-sdk-go-v2/config v1.27.5/go.mod h1:I53uvsfddRRTG5YcC4n5Z3aOD1BU8hYCoIG7iEJG4wM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.5 h1:yn3zSvIKC2NZIs40cY3kckcy9Zma96PrRR07N54PCvY= -github.com/aws/aws-sdk-go-v2/credentials v1.17.5/go.mod h1:8JcKPAGZVnDWuR5lusAwmrSDtZnDIAnpQWaDC9RFt2g= +github.com/aws/aws-sdk-go-v2/config v1.27.6 h1:WmoH1aPrxwcqAZTTnETjKr+fuvqzKd4hRrKxQUiuKP4= +github.com/aws/aws-sdk-go-v2/config v1.27.6/go.mod h1:W9RZFF2pL+OhnUSZsQS/eDMWD8v+R+yWgjj3nSlrXVU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.6 h1:akhj/nSC6SEx3OmiYGG/7mAyXMem9ZNVVf+DXkikcTk= +github.com/aws/aws-sdk-go-v2/credentials v1.17.6/go.mod h1:chJZuJ7TkW4kiMwmldOJOEueBoSkUb4ynZS1d9dhygo= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= @@ -31,20 +31,20 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 h1:en92G0Z7xlksoOylkUhuBSfJgijC github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2/go.mod h1:HgtQ/wN5G+8QSlK62lbOtNwQ3wTSByJ4wH2rCkPt+AE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3 h1:fpFzBoro/MetYBk+8kxoQGMeKSkXbymnbUh2gy6nVgk= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3/go.mod h1:qmQPbMe5NQk/nEmpkl8iHyCSREJjEbRUrnqHpHabLlM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3 h1:x0N5ftQzgcfRpCpTiyZC40pvNUJYhzf4UgCsAyO6/P8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4 h1:J3Q6N2sTChfYLZSTey3Qeo7n3JSm6RTJDcKev+7Sbus= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4/go.mod h1:ZopsdDMVg1H03X7BdzpGaufOkuz27RjtKDzioP2U0Hg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4 h1:jRiWxyuVO8PlkN72wDMVn/haVH4SDCBkUt0Lf/dxd7s= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 h1:1oY1AVEisRI4HNuFoLdRUB0hC63ylDAN6Me3MrfclEg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2/go.mod h1:KZ03VgvZwSjkT7fOetQ/wF3MZUvYFirlI1H5NklUNsY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2 h1:ukAaTX8n/pX0Essg9CxW8VCjACv75vnNo2GRONR1w1Q= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2/go.mod h1:wt4wZz/CBlJJwY0L7X6vPQ9njh2aHi59knqpJ6B/2cM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3 h1:7cR4xxS480TI0R6Bd75g9Npdw89VriquvQPlMNmuds4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3/go.mod h1:zb72GZ2MvfCX5ynVJ+Mc/NCx7hncbsko4NZm5E+p6J4= github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.2 h1:0YjXuWdYHvsm0HnT4vO8XpwG1D+i2roxSCBoN6deJ7M= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.2/go.mod h1:jI+FWmYkSMn+4APWmZiZTgt0oM0TrvymD51FMqCnWgA= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.3 h1:TkiFkSVX990ryWIMBCT4kPqZEgThQe1xPU/AQXavtvU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.3/go.mod h1:xYNauIUqSuvzlPVb3VB5no/n48YGhmlInD3Uh0Co8Zc= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 780730cfd3426a4b9a555ed9939b5019850d57a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:04:48 +0000 Subject: [PATCH 148/264] build(deps): bump github.com/hashicorp/terraform-plugin-testing Bumps [github.com/hashicorp/terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-testing/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-testing/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-testing/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-testing dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index e89d7360e7..0b350d70dd 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,13 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/hcl/v2 v2.19.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.21.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 + github.com/hashicorp/hcl/v2 v2.20.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.22.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -23,7 +23,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 - github.com/zclconf/go-cty v1.14.2 // indirect + github.com/zclconf/go-cty v1.14.3 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/net v0.22.0 golang.org/x/sys v0.18.0 // indirect @@ -43,7 +43,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-mux v0.14.0 - github.com/hashicorp/terraform-plugin-testing v1.6.0 + github.com/hashicorp/terraform-plugin-testing v1.7.0 github.com/stretchr/testify v1.9.0 ) @@ -87,8 +87,8 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect golang.org/x/mod v0.15.0 // indirect + golang.org/x/tools v0.13.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/grpc v1.62.0 // indirect diff --git a/go.sum b/go.sum index 38ed4c5b89..b08befa5db 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= @@ -116,8 +116,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= -github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= -github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= +github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo= @@ -128,16 +128,16 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= -github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= +github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= +github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= -github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= -github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= +github.com/hashicorp/terraform-plugin-testing v1.7.0 h1:I6aeCyZ30z4NiI3tzyDoO6fS7YxP5xSL1ceOon3gTe8= +github.com/hashicorp/terraform-plugin-testing v1.7.0/go.mod h1:sbAreCleJNOCz+y5vVHV8EJkIWZKi/t4ndKiUjM9vao= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -207,14 +207,12 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= -github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= +github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= -golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -227,6 +225,8 @@ golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From ebc415116cbe0da057ba639c4a024ed8df043a9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 Mar 2024 00:07:11 +0000 Subject: [PATCH 149/264] add CHANGELOG for #3161 --- .changelog/3161.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changelog/3161.txt diff --git a/.changelog/3161.txt b/.changelog/3161.txt new file mode 100644 index 0000000000..64f2cc4e05 --- /dev/null +++ b/.changelog/3161.txt @@ -0,0 +1,9 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.5 to 1.27.6 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.5 to 1.17.6 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.2 to 1.51.3 +``` From 4b36aa80cd6dcaa8c1b581b4e3d85edf7f0f8142 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 Mar 2024 00:09:07 +0000 Subject: [PATCH 150/264] add CHANGELOG for #3162 --- .changelog/3162.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3162.txt diff --git a/.changelog/3162.txt b/.changelog/3162.txt new file mode 100644 index 0000000000..3c2d55b57f --- /dev/null +++ b/.changelog/3162.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/hashicorp/terraform-plugin-testing from 1.6.0 to 1.7.0 +``` From ca468f33bff91f74091c975b122b99c3757d108c Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 6 Mar 2024 01:51:03 +0000 Subject: [PATCH 151/264] Update CHANGELOG.md for #3161 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b844a52bf4..213433c545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ FEATURES: * **New Data Source:** `cloudflare_dlp_datasets` ([#3135](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3135)) +ENHANCEMENTS: + +* resource/cloudflare_access_application: adds `name_id_transform_jsonata` to SaaS applications ([#3132](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3132)) + BUG FIXES: * resource/cloudflare_access_application: Fix issue with sending allow_authenticate_via_warp on updates when it is not provided ([#3140](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3140)) @@ -14,14 +18,17 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.2 to 1.27.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.3 to 1.27.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.4 to 1.27.5 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.5 to 1.27.6 ([#3161](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3161)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.1 to 1.17.2 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.2 to 1.17.3 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.3 to 1.17.4 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.4 to 1.17.5 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.5 to 1.17.6 ([#3161](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3161)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.50.3 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.3 to 1.51.0 ([#3138](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3138)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.0 to 1.51.1 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.1 to 1.51.2 ([#3159](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3159)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.2 to 1.51.3 ([#3161](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3161)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.25.1 ([#3136](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3136)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.1 to 1.25.2 ([#3141](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3141)) * provider: bump github.com/cloudflare/cloudflare-go from 0.88.0 to 0.89.0 ([#3148](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3148)) From 3d1001d370a92edb222052e9e4b637262575bb54 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 6 Mar 2024 01:51:51 +0000 Subject: [PATCH 152/264] Update CHANGELOG.md for #3162 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 213433c545..97df232da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ DEPENDENCIES: * provider: bump github.com/hashicorp/terraform-plugin-mux from 0.14.0 to 0.15.0 ([#3149](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3149)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3142](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3142)) * provider: bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 ([#3147](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3147)) +* provider: bump github.com/hashicorp/terraform-plugin-testing from 1.6.0 to 1.7.0 ([#3162](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3162)) * provider: bump github.com/stretchr/testify from 1.8.4 to 1.9.0 ([#3157](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3157)) * provider: bump golang.org/x/net from 0.21.0 to 0.22.0 ([#3160](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3160)) From dcd0c9801d544a042f9bc9d368e34f93b13f782e Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 6 Mar 2024 13:06:38 +1100 Subject: [PATCH 153/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97df232da2..948b52ac00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.26.0 (Unreleased) +## 4.27.0 (Unreleased) + +## 4.26.0 (March 6th, 2024) FEATURES: From 3ec5cffe09d0bf6c48d05907a36a3b34d5237ff1 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 6 Mar 2024 13:37:25 +1100 Subject: [PATCH 154/264] Revert "build(deps): bump github.com/hashicorp/terraform-plugin-testing from 1.6.0 to 1.7.0" --- .changelog/3162.txt | 3 --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 .changelog/3162.txt diff --git a/.changelog/3162.txt b/.changelog/3162.txt deleted file mode 100644 index 3c2d55b57f..0000000000 --- a/.changelog/3162.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:dependency -provider: bump github.com/hashicorp/terraform-plugin-testing from 1.6.0 to 1.7.0 -``` diff --git a/go.mod b/go.mod index f2ce42a9b4..15a9feaeb4 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,13 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.6.2 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/hcl/v2 v2.20.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.22.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 + github.com/hashicorp/hcl/v2 v2.19.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.21.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -23,7 +23,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 - github.com/zclconf/go-cty v1.14.3 // indirect + github.com/zclconf/go-cty v1.14.2 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/net v0.22.0 golang.org/x/sys v0.18.0 // indirect @@ -43,7 +43,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-mux v0.14.0 - github.com/hashicorp/terraform-plugin-testing v1.7.0 + github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/stretchr/testify v1.9.0 ) @@ -87,8 +87,8 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/tools v0.13.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/grpc v1.62.0 // indirect diff --git a/go.sum b/go.sum index 29a85a385a..e9174dbd25 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= -github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= @@ -116,8 +116,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= -github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= -github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo= @@ -128,16 +128,16 @@ github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgs github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= -github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= +github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0= +github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.14.0 h1:+UeiTaYy8zPAk1pktNRp3288pIih8gxiRJ6O0e7fS0U= github.com/hashicorp/terraform-plugin-mux v0.14.0/go.mod h1:UzkNhewtpuqSnBvo1ZXSagAxu+hQ+Ir3F5Mpm86dWn0= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= -github.com/hashicorp/terraform-plugin-testing v1.7.0 h1:I6aeCyZ30z4NiI3tzyDoO6fS7YxP5xSL1ceOon3gTe8= -github.com/hashicorp/terraform-plugin-testing v1.7.0/go.mod h1:sbAreCleJNOCz+y5vVHV8EJkIWZKi/t4ndKiUjM9vao= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA= +github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= +github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -207,12 +207,14 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= -github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= +github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= +golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -225,8 +227,6 @@ golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 12abe3064346909455328a3d1573dc4682966c03 Mon Sep 17 00:00:00 2001 From: Alex Holland Date: Thu, 7 Mar 2024 00:52:22 -0500 Subject: [PATCH 155/264] AUTH-5770 Add Sensitive to oidc client secret and preserve across apply --- .changelog/3168.txt | 3 +++ .../sdkv2provider/schema_cloudflare_access_application.go | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changelog/3168.txt diff --git a/.changelog/3168.txt b/.changelog/3168.txt new file mode 100644 index 0000000000..88d0c2f335 --- /dev/null +++ b/.changelog/3168.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_access_application: Add Sensitive to oidc client_secret and preserve client_secret across apply +``` \ No newline at end of file diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 0eef97152a..7c53630759 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -173,6 +173,7 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { Type: schema.TypeString, Computed: true, Description: "The application client secret, only returned on initial apply", + Sensitive: true, }, "redirect_uris": { Type: schema.TypeSet, @@ -675,7 +676,6 @@ func convertSaasStructToSchema(d *schema.ResourceData, app *cloudflare.SaasAppli } if app.AuthType == "oidc" { m := map[string]interface{}{ - // client secret not handled here as it is only returned on create "auth_type": app.AuthType, "client_id": app.ClientID, "redirect_uris": app.RedirectURIs, @@ -685,6 +685,10 @@ func convertSaasStructToSchema(d *schema.ResourceData, app *cloudflare.SaasAppli "group_filter_regex": app.GroupFilterRegex, "app_launcher_url": app.AppLauncherURL, } + // client secret is only returned on create, if it is present in the state, preserve it + if client_secret, ok := d.GetOk("saas_app.0.client_secret"); ok { + m["client_secret"] = client_secret.(string) + } return []interface{}{m} } else { m := map[string]interface{}{ From 607e6cc55b5a7e9c60b3948e0dd1baf9244f8d2a Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Wed, 6 Mar 2024 15:19:32 +0100 Subject: [PATCH 156/264] add logpush job output_options support --- .../resource_cloudflare_logpush_job.go | 69 +++++++++++++++++++ .../schema_cloudflare_logpush_job.go | 67 ++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/internal/sdkv2provider/resource_cloudflare_logpush_job.go b/internal/sdkv2provider/resource_cloudflare_logpush_job.go index 42fd912254..6e61ba9b32 100644 --- a/internal/sdkv2provider/resource_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/resource_cloudflare_logpush_job.go @@ -91,10 +91,33 @@ func resourceCloudflareLogpushJobRead(ctx context.Context, d *schema.ResourceDat filter = string(b) } + outputOptions := make(map[string]interface{}) + if job.OutputOptions != nil { + data, err := json.Marshal(&job.OutputOptions) + if err != nil { + return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) + } + err = json.Unmarshal(data, &outputOptions) + if err != nil { + return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) + } + // mapping from the API to the Schema: + // "cve20214428" -> "CVE-2021-44228" + // terraform does not allow the key to be upper case or contain dashes + if job.OutputOptions.CVE202144228 != nil { + delete(outputOptions, "CVE-2021-44228") + outputOptions["cve20214428"] = job.OutputOptions.CVE202144228 + } + } + d.Set("name", job.Name) d.Set("kind", job.Kind) d.Set("enabled", job.Enabled) d.Set("logpull_options", job.LogpullOptions) + err = d.Set("output_options", []map[string]interface{}{outputOptions}) + if err != nil { + return diag.FromErr(fmt.Errorf("failed to set output_options: %w", err)) + } d.Set("dataset", job.Dataset) d.Set("destination_conf", job.DestinationConf) d.Set("ownership_challenge", d.Get("ownership_challenge")) @@ -107,6 +130,36 @@ func resourceCloudflareLogpushJobRead(ctx context.Context, d *schema.ResourceDat return nil } +// converts the output_options state to the Cloudflare API struct representation +func toAPIOutputOptions(outputOptionsState interface{}) (*cloudflare.LogpushOutputOptions, error) { + var jobOutputOptions cloudflare.LogpushOutputOptions + + outputOptionsList, ok := outputOptionsState.([]interface{}) + if !ok { + return nil, fmt.Errorf("failed to convert to []interface{}") + } + if len(outputOptionsList) < 1 { + return nil, fmt.Errorf("failed to extract logpush output options") + } + outputOptions := outputOptionsList[0].(map[string]interface{}) + data, err := json.Marshal(outputOptions) + if err != nil { + return nil, fmt.Errorf("failed to extract logpush output options") + } + err = json.Unmarshal(data, &jobOutputOptions) + if err != nil { + return nil, fmt.Errorf("failed to extract logpush output options") + } + // mapping from the API to the Schema: + // "cve20214428" -> "CVE-2021-44228" + // terraform does not allow the key to be upper case or contain dashes + cve20214428, ok := outputOptions["cve20214428"].(bool) + if ok { + jobOutputOptions.CVE202144228 = &cve20214428 + } + return &jobOutputOptions, nil +} + func resourceCloudflareLogpushJobCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*cloudflare.API) @@ -136,6 +189,14 @@ func resourceCloudflareLogpushJobCreate(ctx context.Context, d *schema.ResourceD MaxUploadIntervalSeconds: d.Get("max_upload_interval_seconds").(int), } + outputOptions, ok := d.GetOk("output_options") + if ok { + job.OutputOptions, err = toAPIOutputOptions(outputOptions) + if err != nil { + return diag.FromErr(err) + } + } + filter := d.Get("filter") if filter != "" { var jobFilter cloudflare.LogpushJobFilters @@ -201,6 +262,14 @@ func resourceCloudflareLogpushJobUpdate(ctx context.Context, d *schema.ResourceD MaxUploadIntervalSeconds: d.Get("max_upload_interval_seconds").(int), } + outputOptions, ok := d.GetOk("output_options") + if ok { + job.OutputOptions, err = toAPIOutputOptions(outputOptions) + if err != nil { + return diag.FromErr(err) + } + } + filter := d.Get("filter") if filter != "" { var jobFilter cloudflare.LogpushJobFilters diff --git a/internal/sdkv2provider/schema_cloudflare_logpush_job.go b/internal/sdkv2provider/schema_cloudflare_logpush_job.go index 565bf3220c..5b13629227 100644 --- a/internal/sdkv2provider/schema_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/schema_cloudflare_logpush_job.go @@ -128,5 +128,72 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { ValidateFunc: validation.IntBetween(30, 300), Description: fmt.Sprint("The maximum interval in seconds for log batches. Value must be between 30 and 300."), }, + "output_options": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cve20214428": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "batch_prefix": { + Type: schema.TypeString, + Optional: true, + }, + "batch_suffix": { + Type: schema.TypeString, + Optional: true, + }, + "field_delimiter": { + Type: schema.TypeString, + Optional: true, + Default: ",", + }, + "field_names": { + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + }, + "output_type": { + Type: schema.TypeString, + Optional: true, + Default: "ndjson", + }, + "record_delimiter": { + Type: schema.TypeString, + Optional: true, + }, + "record_prefix": { + Type: schema.TypeString, + Optional: true, + Default: "{", + }, + "record_suffix": { + Type: schema.TypeString, + Optional: true, + Default: "}", + }, + "record_template": { + Type: schema.TypeString, + Optional: true, + }, + "sample_rate": { + Type: schema.TypeFloat, + Optional: true, + Default: 1.0, + }, + "timestamp_format": { + Type: schema.TypeString, + Optional: true, + Default: "unixnano", + }, + }, + }, + }, } } From a9d47c05b0139a4b7a4573e39b006ddb2d75a8db Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Thu, 7 Mar 2024 21:32:49 +0100 Subject: [PATCH 157/264] update docs --- docs/resources/logpush_job.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/resources/logpush_job.md b/docs/resources/logpush_job.md index 3d0dd308df..6544dcf1e4 100644 --- a/docs/resources/logpush_job.md +++ b/docs/resources/logpush_job.md @@ -125,6 +125,7 @@ resource "cloudflare_logpush_job" "example_job" { - `max_upload_interval_seconds` (Number) The maximum interval in seconds for log batches. Value must be between 30 and 300. - `max_upload_records` (Number) The maximum number of log lines per batch. Value must be between 1000 and 1,000,000. - `name` (String) The name of the logpush job to create. +- `output_options` (Block List, Max: 1) (see [below for nested schema](#nestedblock--output_options)) - `ownership_challenge` (String) Ownership challenge token to prove destination ownership, required when destination is Amazon S3, Google Cloud Storage, Microsoft Azure or Sumo Logic. See [Developer documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#usage). - `zone_id` (String) The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`. @@ -132,6 +133,24 @@ resource "cloudflare_logpush_job" "example_job" { - `id` (String) The ID of this resource. + +### Nested Schema for `output_options` + +Optional: + +- `batch_prefix` (String) +- `batch_suffix` (String) +- `cve20214428` (Boolean) Defaults to `false`. +- `field_delimiter` (String) Defaults to `,`. +- `field_names` (List of String) +- `output_type` (String) Defaults to `ndjson`. +- `record_delimiter` (String) +- `record_prefix` (String) Defaults to `{`. +- `record_suffix` (String) Defaults to `}`. +- `record_template` (String) +- `sample_rate` (Number) Defaults to `1`. +- `timestamp_format` (String) Defaults to `unixnano`. + ## Import Import is supported using the following syntax: From 3c9b797d4ff9303eee92b3f4d8145b68e50ae613 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Thu, 7 Mar 2024 21:36:58 +0100 Subject: [PATCH 158/264] add changelog --- .changelog/3162.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3162.txt diff --git a/.changelog/3162.txt b/.changelog/3162.txt new file mode 100644 index 0000000000..6c3a9debb7 --- /dev/null +++ b/.changelog/3162.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_logpush_job: Add `output_options` parameter +``` From c58255d564a4febd39929180a76429f61b162947 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Thu, 7 Mar 2024 21:43:20 +0100 Subject: [PATCH 159/264] rename changelog --- .changelog/{3162.txt => 3171.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changelog/{3162.txt => 3171.txt} (100%) diff --git a/.changelog/3162.txt b/.changelog/3171.txt similarity index 100% rename from .changelog/3162.txt rename to .changelog/3171.txt From ec26f4b92f35d23adff34b15b883a320339f65ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 23:37:16 +0000 Subject: [PATCH 160/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.25.2...v1.25.3) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.6...config/v1.27.7) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.7/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.6...v1.17.7) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.51.3...service/s3/v1.51.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 28 ++++++++++++++-------------- go.sum | 56 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 15a9feaeb4..56b7555cf6 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.25.2 - github.com/aws/aws-sdk-go-v2/config v1.27.6 - github.com/aws/aws-sdk-go-v2/credentials v1.17.6 - github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3 + github.com/aws/aws-sdk-go-v2 v1.25.3 + github.com/aws/aws-sdk-go-v2/config v1.27.7 + github.com/aws/aws-sdk-go-v2/credentials v1.17.7 + github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -51,18 +51,18 @@ require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index e9174dbd25..75c350bd11 100644 --- a/go.sum +++ b/go.sum @@ -11,40 +11,40 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w= -github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= +github.com/aws/aws-sdk-go-v2 v1.25.3 h1:xYiLpZTQs1mzvz5PaI6uR0Wh57ippuEthxS4iK5v0n0= +github.com/aws/aws-sdk-go-v2 v1.25.3/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.6 h1:WmoH1aPrxwcqAZTTnETjKr+fuvqzKd4hRrKxQUiuKP4= -github.com/aws/aws-sdk-go-v2/config v1.27.6/go.mod h1:W9RZFF2pL+OhnUSZsQS/eDMWD8v+R+yWgjj3nSlrXVU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.6 h1:akhj/nSC6SEx3OmiYGG/7mAyXMem9ZNVVf+DXkikcTk= -github.com/aws/aws-sdk-go-v2/credentials v1.17.6/go.mod h1:chJZuJ7TkW4kiMwmldOJOEueBoSkUb4ynZS1d9dhygo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM= +github.com/aws/aws-sdk-go-v2/config v1.27.7 h1:JSfb5nOQF01iOgxFI5OIKWwDiEXWTyTgg1Mm1mHi0A4= +github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I= +github.com/aws/aws-sdk-go-v2/credentials v1.17.7 h1:WJd+ubWKoBeRh7A5iNMnxEOs982SyVKOJD+K8HIezu4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 h1:p+y7FvkK2dxS+FEwRIDHDe//ZX+jDhP8HHE50ppj4iI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 h1:ifbIbHZyGl1alsAhPIYsHOg5MuApgqOvVeI8wIugXfs= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 h1:Qvodo9gHG9F3E8SfYOspPeBt0bjSbsevK8WhRAUHcoY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 h1:en92G0Z7xlksoOylkUhuBSfJgijC7rHVLRdnIlHEs0E= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2/go.mod h1:HgtQ/wN5G+8QSlK62lbOtNwQ3wTSByJ4wH2rCkPt+AE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 h1:mDnFOE2sVkyphMWtTH+stv0eW3k0OTx94K63xpxHty4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3/go.mod h1:V8MuRVcCRt5h1S+Fwu8KbC7l/gBGo3yBAyUbJM2IJOk= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4 h1:J3Q6N2sTChfYLZSTey3Qeo7n3JSm6RTJDcKev+7Sbus= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.4/go.mod h1:ZopsdDMVg1H03X7BdzpGaufOkuz27RjtKDzioP2U0Hg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4 h1:jRiWxyuVO8PlkN72wDMVn/haVH4SDCBkUt0Lf/dxd7s= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.4/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 h1:1oY1AVEisRI4HNuFoLdRUB0hC63ylDAN6Me3MrfclEg= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2/go.mod h1:KZ03VgvZwSjkT7fOetQ/wF3MZUvYFirlI1H5NklUNsY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3 h1:7cR4xxS480TI0R6Bd75g9Npdw89VriquvQPlMNmuds4= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.3/go.mod h1:zb72GZ2MvfCX5ynVJ+Mc/NCx7hncbsko4NZm5E+p6J4= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.3 h1:TkiFkSVX990ryWIMBCT4kPqZEgThQe1xPU/AQXavtvU= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.3/go.mod h1:xYNauIUqSuvzlPVb3VB5no/n48YGhmlInD3Uh0Co8Zc= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 h1:mbWNpfRUTT6bnacmvOTKXZjR/HycibdWzNpfbrbLDIs= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5/go.mod h1:FCOPWGjsshkkICJIn9hq9xr6dLKtyaWpuUojiN3W1/8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftOlX+oGgWGIa3jDyYLDNsdVhsjHmsBH2GLAQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 h1:4t+QEX7BsXz98W8W1lNvMAG+NX8qHz2CjLBxQKku40g= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4 h1:lW5xUzOPGAMY7HPuNF4FdyBwRc3UJ/e8KsapbesVeNU= +github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 h1:Ppup1nVNAOWbBOrcoOxaxPeEnSFB2RnnQdguhXpmeQk= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 31b68e1d2cac4f908af05cff17d433eba27035fa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Mar 2024 23:37:29 +0000 Subject: [PATCH 161/264] add CHANGELOG for #3172 --- .changelog/3172.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changelog/3172.txt diff --git a/.changelog/3172.txt b/.changelog/3172.txt new file mode 100644 index 0000000000..173d3a263d --- /dev/null +++ b/.changelog/3172.txt @@ -0,0 +1,12 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 +``` From 28a72037da9d6a3fc33e737ae06e8df95a276762 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 8 Mar 2024 00:13:51 +0000 Subject: [PATCH 162/264] Update CHANGELOG.md for #3172 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 948b52ac00..f71b4a85b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## 4.27.0 (Unreleased) +DEPENDENCIES: + +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) + ## 4.26.0 (March 6th, 2024) FEATURES: From de1c951e0738d521a0f4fdd093de89828f1ff9bc Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Fri, 8 Mar 2024 22:35:43 +0100 Subject: [PATCH 163/264] fix linter complaint --- internal/sdkv2provider/resource_cloudflare_logpush_job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sdkv2provider/resource_cloudflare_logpush_job.go b/internal/sdkv2provider/resource_cloudflare_logpush_job.go index 6e61ba9b32..5004eccb9b 100644 --- a/internal/sdkv2provider/resource_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/resource_cloudflare_logpush_job.go @@ -130,7 +130,7 @@ func resourceCloudflareLogpushJobRead(ctx context.Context, d *schema.ResourceDat return nil } -// converts the output_options state to the Cloudflare API struct representation +// converts the output_options state to the Cloudflare API struct representation. func toAPIOutputOptions(outputOptionsState interface{}) (*cloudflare.LogpushOutputOptions, error) { var jobOutputOptions cloudflare.LogpushOutputOptions From e0c93c8796a1e9b419c23a567e7232ebc340d766 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Sat, 9 Mar 2024 14:07:39 +0100 Subject: [PATCH 164/264] add validation checks --- .../schema_cloudflare_logpush_job.go | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/internal/sdkv2provider/schema_cloudflare_logpush_job.go b/internal/sdkv2provider/schema_cloudflare_logpush_job.go index 5b13629227..d639158897 100644 --- a/internal/sdkv2provider/schema_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/schema_cloudflare_logpush_job.go @@ -160,9 +160,10 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Optional: true, }, "output_type": { - Type: schema.TypeString, - Optional: true, - Default: "ndjson", + Type: schema.TypeString, + Optional: true, + Default: "ndjson", + ValidateFunc: validation.StringInSlice([]string{"ndjson", "csv"}, false), }, "record_delimiter": { Type: schema.TypeString, @@ -183,14 +184,16 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Optional: true, }, "sample_rate": { - Type: schema.TypeFloat, - Optional: true, - Default: 1.0, + Type: schema.TypeFloat, + Optional: true, + Default: 1.0, + ValidateFunc: validation.FloatBetween(0.0, 1.0), }, "timestamp_format": { - Type: schema.TypeString, - Optional: true, - Default: "unixnano", + Type: schema.TypeString, + Optional: true, + Default: "unixnano", + ValidateFunc: validation.StringInSlice([]string{"unixnano", "unix", "rfc3339"}, false), }, }, }, From 585e268d9888759cc315c0d6150df76f5ed20d06 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Sat, 9 Mar 2024 22:59:47 +0100 Subject: [PATCH 165/264] add test for toAPIOutputOptions --- .../resource_cloudflare_logpush_job_test.go | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 internal/sdkv2provider/resource_cloudflare_logpush_job_test.go diff --git a/internal/sdkv2provider/resource_cloudflare_logpush_job_test.go b/internal/sdkv2provider/resource_cloudflare_logpush_job_test.go new file mode 100644 index 0000000000..2cc5b6b085 --- /dev/null +++ b/internal/sdkv2provider/resource_cloudflare_logpush_job_test.go @@ -0,0 +1,69 @@ +package sdkv2provider + +import ( + "encoding/json" + "testing" + + "github.com/cloudflare/cloudflare-go" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func TestToAPIOutputOptions(t *testing.T) { + cve202144228 := true + testData := cloudflare.LogpushOutputOptions{ + CVE202144228: &cve202144228, + BatchPrefix: "a", + BatchSuffix: "b", + FieldDelimiter: ",", + FieldNames: []string{"a", "b", "c"}, + OutputType: "csv", + RecordDelimiter: "a", + RecordPrefix: "b", + RecordSuffix: "c", + RecordTemplate: "d", + SampleRate: 0.5, + TimestampFormat: "unix", + } + resourceDataMap := map[string]interface{}{ + "output_options": []interface{}{ + map[string]interface{}{ + "cve20214428": *testData.CVE202144228, + "batch_prefix": testData.BatchPrefix, + "batch_suffix": testData.BatchSuffix, + "field_delimiter": testData.FieldDelimiter, + "field_names": []interface{}{testData.FieldNames[0], testData.FieldNames[1], testData.FieldNames[2]}, + "output_type": testData.OutputType, + "record_delimiter": testData.RecordDelimiter, + "record_prefix": testData.RecordPrefix, + "record_suffix": testData.RecordSuffix, + "record_template": testData.RecordTemplate, + "sample_rate": testData.SampleRate, + "timestamp_format": testData.TimestampFormat, + }, + }, + } + resourceData := schema.TestResourceDataRaw(t, resourceCloudflareLogpushJobSchema(), resourceDataMap) + if resourceData == nil { + t.Fatal("failed to create test ResourceData") + } + outputOptions, ok := resourceData.GetOk("output_options") + if !ok { + t.Fatal("output_options not found") + } + output, err := toAPIOutputOptions(outputOptions) + if err != nil { + t.Fatal(err) + } + // compare output to the testData + testJSON, err := json.Marshal(testData) + if err != nil { + t.Fatal(err) + } + outJSON, err := json.Marshal(output) + if err != nil { + t.Fatal(err) + } + if string(testJSON) != string(outJSON) { + t.Fatalf("output and testData are not equal: %s != %s", string(outJSON), string(testJSON)) + } +} From f27f6c3d563adbf7ffed82c304cc4a913f3dd165 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Sun, 10 Mar 2024 14:58:40 +0100 Subject: [PATCH 166/264] add descriptions --- docs/resources/logpush_job.md | 24 ++++----- .../schema_cloudflare_logpush_job.go | 54 +++++++++++-------- 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/docs/resources/logpush_job.md b/docs/resources/logpush_job.md index 6544dcf1e4..29146f93d0 100644 --- a/docs/resources/logpush_job.md +++ b/docs/resources/logpush_job.md @@ -138,18 +138,18 @@ resource "cloudflare_logpush_job" "example_job" { Optional: -- `batch_prefix` (String) -- `batch_suffix` (String) -- `cve20214428` (Boolean) Defaults to `false`. -- `field_delimiter` (String) Defaults to `,`. -- `field_names` (List of String) -- `output_type` (String) Defaults to `ndjson`. -- `record_delimiter` (String) -- `record_prefix` (String) Defaults to `{`. -- `record_suffix` (String) Defaults to `}`. -- `record_template` (String) -- `sample_rate` (Number) Defaults to `1`. -- `timestamp_format` (String) Defaults to `unixnano`. +- `batch_prefix` (String) String to be prepended before each batch. +- `batch_suffix` (String) String to be appended after each batch. +- `cve20214428` (Boolean) Mitigation for CVE-2021-44228. If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{. Defaults to `false`. +- `field_delimiter` (String) String to join fields. This field be ignored when record_template is set. Defaults to `,`. +- `field_names` (List of String) List of field names to be included in the Logpush output. +- `output_type` (String) Specifies the output type. Available values: `ndjson`, `csv`. Defaults to `ndjson`. +- `record_delimiter` (String) String to be inserted in-between the records as separator. +- `record_prefix` (String) String to be prepended before each record. Defaults to `{`. +- `record_suffix` (String) String to be appended after each record. Defaults to `}`. +- `record_template` (String) String to use as template for each record instead of the default comma-separated list. +- `sample_rate` (Number) Specifies the sampling rate. Defaults to `1`. +- `timestamp_format` (String) Specifies the format for timestamps. Available values: `unixnano`, `unix`, `rfc3339`. Defaults to `unixnano`. ## Import diff --git a/internal/sdkv2provider/schema_cloudflare_logpush_job.go b/internal/sdkv2provider/schema_cloudflare_logpush_job.go index d639158897..d04c8f3b38 100644 --- a/internal/sdkv2provider/schema_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/schema_cloudflare_logpush_job.go @@ -135,65 +135,77 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cve20214428": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Mitigation for CVE-2021-44228. If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{", }, "batch_prefix": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: "String to be prepended before each batch", }, "batch_suffix": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: "String to be appended after each batch", }, "field_delimiter": { - Type: schema.TypeString, - Optional: true, - Default: ",", + Type: schema.TypeString, + Optional: true, + Default: ",", + Description: "String to join fields. This field be ignored when record_template is set", }, "field_names": { Type: schema.TypeList, Elem: &schema.Schema{ Type: schema.TypeString, }, - Optional: true, + Optional: true, + Description: "List of field names to be included in the Logpush output", }, "output_type": { Type: schema.TypeString, Optional: true, Default: "ndjson", ValidateFunc: validation.StringInSlice([]string{"ndjson", "csv"}, false), + Description: fmt.Sprintf("Specifies the output type. %s", renderAvailableDocumentationValuesStringSlice([]string{"ndjson", "csv"})), }, "record_delimiter": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: "String to be inserted in-between the records as separator", }, "record_prefix": { - Type: schema.TypeString, - Optional: true, - Default: "{", + Type: schema.TypeString, + Optional: true, + Default: "{", + Description: "String to be prepended before each record", }, "record_suffix": { - Type: schema.TypeString, - Optional: true, - Default: "}", + Type: schema.TypeString, + Optional: true, + Default: "}", + Description: "String to be appended after each record", }, "record_template": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: "String to use as template for each record instead of the default comma-separated list", }, "sample_rate": { Type: schema.TypeFloat, Optional: true, Default: 1.0, ValidateFunc: validation.FloatBetween(0.0, 1.0), + Description: "Specifies the sampling rate", }, "timestamp_format": { Type: schema.TypeString, Optional: true, Default: "unixnano", ValidateFunc: validation.StringInSlice([]string{"unixnano", "unix", "rfc3339"}, false), + Description: fmt.Sprintf("Specifies the format for timestamps. %s", renderAvailableDocumentationValuesStringSlice([]string{"unixnano", "unix", "rfc3339"})), }, }, }, From b520bbd51f89d4a258ce68c6cc74a7cbc29e1dc7 Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Sun, 10 Mar 2024 15:28:09 +0100 Subject: [PATCH 167/264] small cleanup --- .../schema_cloudflare_logpush_job.go | 80 ++++++++----------- 1 file changed, 34 insertions(+), 46 deletions(-) diff --git a/internal/sdkv2provider/schema_cloudflare_logpush_job.go b/internal/sdkv2provider/schema_cloudflare_logpush_job.go index d04c8f3b38..84ad29849b 100644 --- a/internal/sdkv2provider/schema_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/schema_cloudflare_logpush_job.go @@ -10,6 +10,28 @@ import ( ) func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { + kindAllowedValues := []string{"edge", "instant-logs", ""} + datasetAllowedValues := []string{ + "access_requests", + "casb_findings", + "firewall_events", + "http_requests", + "spectrum_events", + "nel_reports", + "audit_logs", + "gateway_dns", + "gateway_http", + "gateway_network", + "dns_logs", + "network_analytics_logs", + "workers_trace_events", + "device_posture_results", + "zero_trust_network_sessions", + "magic_ids_detections", + } + frequencyAllowedValues := []string{"high", "low"} + outputTypeAllowedValues := []string{"ndjson", "csv"} + timestampFormatAllowedValues := []string{"unixnano", "unix", "rfc3339"} return map[string]*schema.Schema{ consts.AccountIDSchemaKey: { Description: consts.AccountIDSchemaDescription, @@ -31,8 +53,8 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { "kind": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.StringInSlice([]string{"edge", "instant-logs", ""}, false), - Description: fmt.Sprintf("The kind of logpush job to create. %s", renderAvailableDocumentationValuesStringSlice([]string{"edge", "instant-logs", `""`})), + ValidateFunc: validation.StringInSlice(kindAllowedValues, false), + Description: fmt.Sprintf("The kind of logpush job to create. %s", renderAvailableDocumentationValuesStringSlice(kindAllowedValues)), }, "name": { Type: schema.TypeString, @@ -41,46 +63,12 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Description: "The name of the logpush job to create.", }, "dataset": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "access_requests", - "casb_findings", - "firewall_events", - "http_requests", - "spectrum_events", - "nel_reports", - "audit_logs", - "gateway_dns", - "gateway_http", - "gateway_network", - "dns_logs", - "network_analytics_logs", - "workers_trace_events", - "device_posture_results", - "zero_trust_network_sessions", - "magic_ids_detections", - }, false), + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice(datasetAllowedValues, false), Description: fmt.Sprintf( "The kind of the dataset to use with the logpush job. %s", - renderAvailableDocumentationValuesStringSlice([]string{ - "access_requests", - "casb_findings", - "firewall_events", - "http_requests", - "spectrum_events", - "nel_reports", - "audit_logs", - "gateway_dns", - "gateway_http", - "gateway_network", - "dns_logs", - "network_analytics_logs", - "workers_trace_events", - "device_posture_results", - "zero_trust_network_sessions", - "magic_ids_detections", - }), + renderAvailableDocumentationValuesStringSlice(datasetAllowedValues), ), }, "logpull_options": { @@ -107,8 +95,8 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, Default: "high", - ValidateFunc: validation.StringInSlice([]string{"high", "low"}, false), - Description: fmt.Sprintf("A higher frequency will result in logs being pushed on faster with smaller files. `low` frequency will push logs less often with larger files. %s", renderAvailableDocumentationValuesStringSlice([]string{"high", "low"})), + ValidateFunc: validation.StringInSlice(frequencyAllowedValues, false), + Description: fmt.Sprintf("A higher frequency will result in logs being pushed on faster with smaller files. `low` frequency will push logs less often with larger files. %s", renderAvailableDocumentationValuesStringSlice(frequencyAllowedValues)), }, "max_upload_bytes": { Type: schema.TypeInt, @@ -168,8 +156,8 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, Default: "ndjson", - ValidateFunc: validation.StringInSlice([]string{"ndjson", "csv"}, false), - Description: fmt.Sprintf("Specifies the output type. %s", renderAvailableDocumentationValuesStringSlice([]string{"ndjson", "csv"})), + ValidateFunc: validation.StringInSlice(outputTypeAllowedValues, false), + Description: fmt.Sprintf("Specifies the output type. %s", renderAvailableDocumentationValuesStringSlice(outputTypeAllowedValues)), }, "record_delimiter": { Type: schema.TypeString, @@ -204,8 +192,8 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, Default: "unixnano", - ValidateFunc: validation.StringInSlice([]string{"unixnano", "unix", "rfc3339"}, false), - Description: fmt.Sprintf("Specifies the format for timestamps. %s", renderAvailableDocumentationValuesStringSlice([]string{"unixnano", "unix", "rfc3339"})), + ValidateFunc: validation.StringInSlice(timestampFormatAllowedValues, false), + Description: fmt.Sprintf("Specifies the format for timestamps. %s", renderAvailableDocumentationValuesStringSlice(timestampFormatAllowedValues)), }, }, }, From 51e56885fb698851d62ac8447956be381361750f Mon Sep 17 00:00:00 2001 From: Daniel Lobl Date: Sun, 10 Mar 2024 21:54:23 +0100 Subject: [PATCH 168/264] output_options field: add description --- docs/resources/logpush_job.md | 2 +- internal/sdkv2provider/schema_cloudflare_logpush_job.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/resources/logpush_job.md b/docs/resources/logpush_job.md index 29146f93d0..fe42c60787 100644 --- a/docs/resources/logpush_job.md +++ b/docs/resources/logpush_job.md @@ -125,7 +125,7 @@ resource "cloudflare_logpush_job" "example_job" { - `max_upload_interval_seconds` (Number) The maximum interval in seconds for log batches. Value must be between 30 and 300. - `max_upload_records` (Number) The maximum number of log lines per batch. Value must be between 1000 and 1,000,000. - `name` (String) The name of the logpush job to create. -- `output_options` (Block List, Max: 1) (see [below for nested schema](#nestedblock--output_options)) +- `output_options` (Block List, Max: 1) Structured replacement for logpull_options. When including this field, the logpull_option field will be ignored. (see [below for nested schema](#nestedblock--output_options)) - `ownership_challenge` (String) Ownership challenge token to prove destination ownership, required when destination is Amazon S3, Google Cloud Storage, Microsoft Azure or Sumo Logic. See [Developer documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#usage). - `zone_id` (String) The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`. diff --git a/internal/sdkv2provider/schema_cloudflare_logpush_job.go b/internal/sdkv2provider/schema_cloudflare_logpush_job.go index 84ad29849b..288fcec0e8 100644 --- a/internal/sdkv2provider/schema_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/schema_cloudflare_logpush_job.go @@ -117,9 +117,10 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema { Description: fmt.Sprint("The maximum interval in seconds for log batches. Value must be between 30 and 300."), }, "output_options": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Structured replacement for logpull_options. When including this field, the logpull_option field will be ignored", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cve20214428": { From 772587faa5e7c190950d037d8c95fd83b9fe4264 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sun, 10 Mar 2024 22:21:19 +0000 Subject: [PATCH 169/264] Update CHANGELOG.md for #3171 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f71b4a85b0..6e1c53c3b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.27.0 (Unreleased) +ENHANCEMENTS: + +* resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) From b750dc4b2875882a80865165d29b91c7f50053f6 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Sun, 10 Mar 2024 22:23:58 +0000 Subject: [PATCH 170/264] Update CHANGELOG.md for #3168 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e1c53c3b6..f8bfc8d8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ENHANCEMENTS: * resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) +BUG FIXES: + +* resource/cloudflare_access_application: Add Sensitive to oidc client_secret and preserve client_secret across apply ([#3168](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3168)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) From 07d3b7d455f63b6480511cc975a5b1b271f3af52 Mon Sep 17 00:00:00 2001 From: docsbot Date: Sun, 10 Mar 2024 22:26:37 +0000 Subject: [PATCH 171/264] build registry documentation --- docs/data-sources/dlp_datasets.md | 4 ++-- docs/resources/access_application.md | 19 ++++++++++++------- docs/resources/access_organization.md | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/data-sources/dlp_datasets.md b/docs/data-sources/dlp_datasets.md index a82cbb6861..71d9d6f487 100644 --- a/docs/data-sources/dlp_datasets.md +++ b/docs/data-sources/dlp_datasets.md @@ -12,8 +12,8 @@ Use this data source to retrieve all DLP datasets for an account. ## Example Usage ```terraform -data "cloudflare_dlp_datasets" "example" { - account_id = "f037e56e89293a057740de681ac9abbe" +data "cloudflare_dlp_datasets" "example" { + account_id = "f037e56e89293a057740de681ac9abbe" } ``` diff --git a/docs/resources/access_application.md b/docs/resources/access_application.md index 74756c292e..0f07292e88 100644 --- a/docs/resources/access_application.md +++ b/docs/resources/access_application.md @@ -52,6 +52,7 @@ resource "cloudflare_access_application" "staging_app" { ### Optional - `account_id` (String) The account identifier to target for the resource. Conflicts with `zone_id`. +- `allow_authenticate_via_warp` (Boolean) When set to true, users can authenticate to this application using their WARP session. When set to false this application will always require direct IdP authentication. This setting always overrides the organization setting for WARP authentication. - `allowed_idps` (Set of String) The identity providers selected for the application. - `app_launcher_logo_url` (String) The logo URL of the app launcher. - `app_launcher_visible` (Boolean) Option to show/hide applications in App Launcher. Defaults to `true`. @@ -124,21 +125,25 @@ Optional: ### Nested Schema for `saas_app` -Required: - -- `consumer_service_url` (String) The service provider's endpoint that is responsible for receiving and parsing a SAML assertion. -- `sp_entity_id` (String) A globally unique name for an identity or service provider. - Optional: +- `app_launcher_url` (String) The URL where this applications tile redirects users. +- `auth_type` (String) +- `consumer_service_url` (String) The service provider's endpoint that is responsible for receiving and parsing a SAML assertion. - `custom_attribute` (Block List) Custom attribute mapped from IDPs. (see [below for nested schema](#nestedblock--saas_app--custom_attribute)) - `default_relay_state` (String) The relay state used if not provided by the identity provider. -- `name_id_format` (String) The format of the name identifier sent to the SaaS application. Defaults to `email`. +- `grant_types` (Set of String) The OIDC flows supported by this application. +- `group_filter_regex` (String) A regex to filter Cloudflare groups returned in ID token and userinfo endpoint. +- `name_id_format` (String) The format of the name identifier sent to the SaaS application. - `name_id_transform_jsonata` (String) A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting. - +- `redirect_uris` (Set of String) The permitted URL's for Cloudflare to return Authorization codes and Access/ID tokens. +- `scopes` (Set of String) Define the user information shared with access. +- `sp_entity_id` (String) A globally unique name for an identity or service provider. Read-Only: +- `client_id` (String) The application client id. +- `client_secret` (String, Sensitive) The application client secret, only returned on initial apply. - `idp_entity_id` (String) The unique identifier for the SaaS application. - `public_key` (String) The public certificate that will be used to verify identities. - `sso_endpoint` (String) The endpoint where the SaaS application will send login requests. diff --git a/docs/resources/access_organization.md b/docs/resources/access_organization.md index 152943a15d..a11378993c 100644 --- a/docs/resources/access_organization.md +++ b/docs/resources/access_organization.md @@ -39,6 +39,7 @@ resource "cloudflare_access_organization" "example" { ### Optional - `account_id` (String) The account identifier to target for the resource. Conflicts with `zone_id`. +- `allow_authenticate_via_warp` (Boolean) When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value. - `auto_redirect_to_identity` (Boolean) When set to true, users skip the identity provider selection step during login. - `custom_pages` (Block List) Custom pages for your Zero Trust organization. (see [below for nested schema](#nestedblock--custom_pages)) - `is_ui_read_only` (Boolean) When set to true, this will disable all editing of Access resources via the Zero Trust Dashboard. @@ -47,6 +48,7 @@ resource "cloudflare_access_organization" "example" { - `session_duration` (String) How often a user will be forced to re-authorise. Must be in the format `48h` or `2h45m`. - `ui_read_only_toggle_reason` (String) A description of the reason why the UI read only field is being toggled. - `user_seat_expiration_inactive_time` (String) The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Must be in the format `300ms` or `2h45m`. +- `warp_auth_session_duration` (String) The amount of time that tokens issued for applications will be valid. Must be in the format 30m or 2h45m. Valid time units are: m, h. - `zone_id` (String) The zone identifier to target for the resource. Conflicts with `account_id`. ### Read-Only From 0c9dd70953b2057f1ffbeed7c33af638ed128104 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:11:33 +0000 Subject: [PATCH 172/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.89.0 to 0.90.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.89.0...v0.90.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 56b7555cf6..75fed56b16 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.89.0 + github.com/cloudflare/cloudflare-go v0.90.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 75c350bd11..5c20911086 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.89.0 h1:3zoVntC8xmUR/weFEcNE1RizdW4LRZdQnJ/AN8DDa1U= -github.com/cloudflare/cloudflare-go v0.89.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= +github.com/cloudflare/cloudflare-go v0.90.0 h1:hFfZNPEd9FFh6AJCxSiYwNXwHIkoSWCB5Iuc8J0o7s8= +github.com/cloudflare/cloudflare-go v0.90.0/go.mod h1:nUqvBUUDRxNzsDSQjbqUNWHEIYAoUlgRmcAzMKlFdKs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= From 127a8693036825ea1a91755c8b32a0422fded396 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Mar 2024 00:11:47 +0000 Subject: [PATCH 173/264] add CHANGELOG for #3178 --- .changelog/3178.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3178.txt diff --git a/.changelog/3178.txt b/.changelog/3178.txt new file mode 100644 index 0000000000..56a5b01018 --- /dev/null +++ b/.changelog/3178.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 +``` From d02d856be9ac8c8c0ba5f93a81add570d4f7c470 Mon Sep 17 00:00:00 2001 From: Alex Holland Date: Mon, 11 Mar 2024 16:00:19 -0400 Subject: [PATCH 174/264] AUTH-5959 add support for access mutual tls hostname settings --- .changelog/3173.txt | 3 + internal/framework/provider/provider.go | 2 + .../model.go | 15 ++ .../resource.go | 241 ++++++++++++++++++ .../resource_test.go | 123 +++++++++ .../schema.go | 62 +++++ 6 files changed, 446 insertions(+) create mode 100644 .changelog/3173.txt create mode 100644 internal/framework/service/access_mutual_tls_hostname_settings/model.go create mode 100644 internal/framework/service/access_mutual_tls_hostname_settings/resource.go create mode 100644 internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go create mode 100644 internal/framework/service/access_mutual_tls_hostname_settings/schema.go diff --git a/.changelog/3173.txt b/.changelog/3173.txt new file mode 100644 index 0000000000..f05924d4b1 --- /dev/null +++ b/.changelog/3173.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +cloudflare_access_mutual_tls_hostname_settings +``` \ No newline at end of file diff --git a/internal/framework/provider/provider.go b/internal/framework/provider/provider.go index e0ff5bc27f..01305942c6 100644 --- a/internal/framework/provider/provider.go +++ b/internal/framework/provider/provider.go @@ -11,6 +11,7 @@ import ( "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" + "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/access_mutual_tls_hostname_settings" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/api_token_permissions_groups" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/d1" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/dlp_datasets" @@ -338,6 +339,7 @@ func (p *CloudflareProvider) Resources(ctx context.Context) []func() resource.Re r2_bucket.NewResource, rulesets.NewResource, turnstile.NewResource, + access_mutual_tls_hostname_settings.NewResource, } } diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/model.go b/internal/framework/service/access_mutual_tls_hostname_settings/model.go new file mode 100644 index 0000000000..355c4f25ab --- /dev/null +++ b/internal/framework/service/access_mutual_tls_hostname_settings/model.go @@ -0,0 +1,15 @@ +package access_mutual_tls_hostname_settings + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type Settings struct { + Hostname types.String `tfsdk:"hostname"` + ChinaNetwork types.Bool `tfsdk:"china_network"` + ClientCertificateForwarding types.Bool `tfsdk:"client_certificate_forwarding"` +} + +type AccessMutualTLSHostnameSettingsModel struct { + AccountID types.String `tfsdk:"account_id"` + ZoneID types.String `tfsdk:"zone_id"` + Settings []Settings `tfsdk:"settings"` +} diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/resource.go b/internal/framework/service/access_mutual_tls_hostname_settings/resource.go new file mode 100644 index 0000000000..c7d7fb0405 --- /dev/null +++ b/internal/framework/service/access_mutual_tls_hostname_settings/resource.go @@ -0,0 +1,241 @@ +package access_mutual_tls_hostname_settings + +import ( + "context" + "fmt" + "strings" + + cloudflare "github.com/cloudflare/cloudflare-go" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-log/tflog" +) + +// Ensure provider defined types fully satisfy framework interfaces. +var _ resource.Resource = &AccessMutualTLSHostnameSettingsResource{} +var _ resource.ResourceWithImportState = &AccessMutualTLSHostnameSettingsResource{} + +func NewResource() resource.Resource { + return &AccessMutualTLSHostnameSettingsResource{} +} + +type AccessMutualTLSHostnameSettingsResource struct { + client *cloudflare.API +} + +func (r *AccessMutualTLSHostnameSettingsResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_access_mutual_tls_hostname_settings" +} + +func (r *AccessMutualTLSHostnameSettingsResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*cloudflare.API) + + if !ok { + resp.Diagnostics.AddError( + "unexpected resource configure type", + fmt.Sprintf("Expected *cloudflare.API, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + + return + } + + r.client = client +} + +func (r *AccessMutualTLSHostnameSettingsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *AccessMutualTLSHostnameSettingsModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + identifier := getIdentifier(data) + + updatedSettings, err := r.update(ctx, data, identifier) + if err != nil { + resp.Diagnostics.AddError("error updating Access Mutual TLS Hostname Settings", err.Error()) + return + } + + data = buildAccessMutualTLSHostnameSettingsModel(updatedSettings, data.ZoneID, data.AccountID) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *AccessMutualTLSHostnameSettingsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *AccessMutualTLSHostnameSettingsModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + identifier := getIdentifier(data) + + accessMutualTLSHostnameSettings, err := r.client.GetAccessMutualTLSHostnameSettings(ctx, identifier) + if err != nil { + resp.Diagnostics.AddError("error reading Access Mutual TLS Hostname Settings", err.Error()) + return + } + data = buildAccessMutualTLSHostnameSettingsModel(accessMutualTLSHostnameSettings, data.ZoneID, data.AccountID) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +// Helper function used by both Update and Create +// We take the difference in hostnames between state and plan to determine which hostnames to delete. +// Those hostnames are updated with empty settings to delete them. +func (r *AccessMutualTLSHostnameSettingsResource) update(ctx context.Context, data *AccessMutualTLSHostnameSettingsModel, identifier *cloudflare.ResourceContainer) ([]cloudflare.AccessMutualTLSHostnameSettings, error) { + currentSettings, err := r.client.GetAccessMutualTLSHostnameSettings(ctx, identifier) + if err != nil { + return nil, fmt.Errorf("error finding Access Mutual TLS Hostname Settings: %w", err) + } + currentHostnames := make(map[string]struct{}) + for _, setting := range currentSettings { + currentHostnames[setting.Hostname] = struct{}{} + } + + updatedSettings := make([]cloudflare.AccessMutualTLSHostnameSettings, 0) + updatedHostnames := make(map[string]struct{}) + + settings := data.Settings + for _, setting := range settings { + updatedSetting := cloudflare.AccessMutualTLSHostnameSettings{ + Hostname: setting.Hostname.ValueString(), + ChinaNetwork: setting.ChinaNetwork.ValueBoolPointer(), + ClientCertificateForwarding: setting.ClientCertificateForwarding.ValueBoolPointer(), + } + updatedSettings = append(updatedSettings, updatedSetting) + updatedHostnames[updatedSetting.Hostname] = struct{}{} + } + + for hostname := range currentHostnames { + if _, ok := updatedHostnames[hostname]; !ok { + // Hostname has been removed + updatedSettings = append(updatedSettings, cloudflare.AccessMutualTLSHostnameSettings{ + Hostname: hostname, + }) + } + } + + updatedAccessMutualTLSHostnameSettings := cloudflare.UpdateAccessMutualTLSHostnameSettingsParams{ + Settings: updatedSettings, + } + + tflog.Debug(ctx, fmt.Sprintf("Updating Cloudflare Access Mutal TLS Hostname Settings from struct: %+v", updatedAccessMutualTLSHostnameSettings)) + + resultUpdatedSettings, err := r.client.UpdateAccessMutualTLSHostnameSettings(ctx, identifier, updatedAccessMutualTLSHostnameSettings) + if err != nil { + return nil, fmt.Errorf("error updating Access Mutual TLS Hostname Settings for %s %q: %w", identifier.Level, identifier.Identifier, err) + } + return resultUpdatedSettings, nil +} + +func (r *AccessMutualTLSHostnameSettingsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *AccessMutualTLSHostnameSettingsModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + identifier := getIdentifier(data) + + updatedSettings, err := r.update(ctx, data, identifier) + if err != nil { + resp.Diagnostics.AddError("error updating Access Mutual TLS Hostname Settings", err.Error()) + return + } + + data = buildAccessMutualTLSHostnameSettingsModel(updatedSettings, data.ZoneID, data.AccountID) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *AccessMutualTLSHostnameSettingsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *AccessMutualTLSHostnameSettingsModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + identifier := getIdentifier(data) + + currentSettings, err := r.client.GetAccessMutualTLSHostnameSettings(ctx, identifier) + if err != nil { + resp.Diagnostics.AddError("error finding Access Mutual TLS Hostname Settings", err.Error()) + return + } + updatedSettings := make([]cloudflare.AccessMutualTLSHostnameSettings, 0) + for _, setting := range currentSettings { + updatedSetting := cloudflare.AccessMutualTLSHostnameSettings{ + Hostname: setting.Hostname, + } + updatedSettings = append(updatedSettings, updatedSetting) + } + + // To actually delete the settings we issue an update for the changed hostnames with all fields set to false + deletedSettings := cloudflare.UpdateAccessMutualTLSHostnameSettingsParams{ + Settings: updatedSettings, + } + + _, err = r.client.UpdateAccessMutualTLSHostnameSettings(ctx, identifier, deletedSettings) + if err != nil { + resp.Diagnostics.AddError(fmt.Sprintf("error removing Access Mutual TLS Hostname Settings for %s %q", identifier.Level, identifier.Identifier), err.Error()) + return + } +} + +func (r *AccessMutualTLSHostnameSettingsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + attributes := strings.Split(req.ID, "/") + + invalidIDMessage := "invalid ID (\"%s\") specified, should be in format \"account_id/\" or \"zone_id/\"" + if len(attributes) != 2 { + resp.Diagnostics.AddError("error importing Access Mutual TLS Hostname Settings", fmt.Sprintf(invalidIDMessage, req.ID)) + return + } + + identifierType, identifierID := attributes[0], attributes[1] + + if !(identifierType == "zone_id" || identifierType == "account_id") { + resp.Diagnostics.AddError("invalid id specified", fmt.Sprintf(invalidIDMessage, req.ID)) + return + } + + tflog.Debug(ctx, fmt.Sprintf("Importing Cloudflare Access Mutual TLS Hostname Settings: for %s %s", identifierType, identifierID)) + + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(identifierType), identifierID)...) +} + +func buildAccessMutualTLSHostnameSettingsModel(settings []cloudflare.AccessMutualTLSHostnameSettings, zoneID, accountID basetypes.StringValue) *AccessMutualTLSHostnameSettingsModel { + model := &AccessMutualTLSHostnameSettingsModel{ + ZoneID: zoneID, + AccountID: accountID, + } + for _, setting := range settings { + model.Settings = append(model.Settings, Settings{ + Hostname: types.StringValue(setting.Hostname), + ChinaNetwork: types.BoolValue(cloudflare.Bool(setting.ChinaNetwork)), + ClientCertificateForwarding: types.BoolValue(cloudflare.Bool(setting.ClientCertificateForwarding)), + }) + } + return model +} + +func getIdentifier(data *AccessMutualTLSHostnameSettingsModel) *cloudflare.ResourceContainer { + accountID := data.AccountID + zoneID := data.ZoneID + + var identifier *cloudflare.ResourceContainer + if accountID.ValueString() != "" { + identifier = cloudflare.AccountIdentifier(accountID.ValueString()) + } else { + identifier = cloudflare.ZoneIdentifier(zoneID.ValueString()) + } + + return identifier +} diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go b/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go new file mode 100644 index 0000000000..bdb31ccf27 --- /dev/null +++ b/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go @@ -0,0 +1,123 @@ +package access_mutual_tls_hostname_settings_test + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go" + "github.com/cloudflare/terraform-provider-cloudflare/internal/acctest" + "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" + "github.com/cloudflare/terraform-provider-cloudflare/internal/utils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" +) + +func init() { + resource.AddTestSweepers("cloudflare_access_mutual_tls_hostname_settings", &resource.Sweeper{ + Name: "cloudflare_access_mutual_tls_hostname_settings", + F: func(region string) error { + ctx := context.Background() + + client, clientErr := acctest.SharedClient() + if clientErr != nil { + return fmt.Errorf("Failed to create Cloudflare client: %s", clientErr) + } + + deletedSettings := cloudflare.UpdateAccessMutualTLSHostnameSettingsParams{ + Settings: []cloudflare.AccessMutualTLSHostnameSettings{}, + } + + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + _, err := client.UpdateAccessMutualTLSHostnameSettings(ctx, cloudflare.AccountIdentifier(accountID), deletedSettings) + if err != nil { + return fmt.Errorf("Failed to fetch Cloudflare Access Mutual TLS hostname settings: %s", err) + } + + zoneID := os.Getenv("CLOUDFLARE_ZONE_ID") + _, err = client.UpdateAccessMutualTLSHostnameSettings(ctx, cloudflare.ZoneIdentifier(zoneID), deletedSettings) + if err != nil { + return fmt.Errorf("Failed to delete Cloudflare Access Mutual TLS hostname settings: %s", err) + } + + return nil + }, + }) +} + +func TestAccCloudflareAccessMutualTLSHostnameSettings(t *testing.T) { + // Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the Access + // service does not yet support the API tokens and it results in + // misleading state error messages. + if os.Getenv("CLOUDFLARE_API_TOKEN") != "" { + t.Setenv("CLOUDFLARE_API_TOKEN", "") + } + + rnd := utils.GenerateRandomResourceName() + name := fmt.Sprintf("cloudflare_access_mutual_tls_hostname_settings.%s", rnd) + domain := os.Getenv("CLOUDFLARE_DOMAIN") + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.TestAccPreCheck(t) + acctest.TestAccPreCheck_Account(t) + }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + CheckDestroy: testAccCheckCloudflareAccessMutualTLSHostnameSettingsDestroy, + Steps: []resource.TestStep{ + { + Config: testAccessMutualTLSHostnameSettingsConfig(rnd, cloudflare.AccountIdentifier(accountID), domain), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), + resource.TestCheckResourceAttr(name, "settings.0.hostname", domain), + resource.TestCheckResourceAttr(name, "settings.0.china_network", "false"), + resource.TestCheckResourceAttr(name, "settings.0.client_certificate_forwarding", "true"), + ), + }, + }, + }) +} + +func testAccCheckCloudflareAccessMutualTLSHostnameSettingsDestroy(s *terraform.State) error { + client, err := acctest.SharedClient() + if err != nil { + return fmt.Errorf("Failed to create Cloudflare client: %s", err) + } + + for _, rs := range s.RootModule().Resources { + if rs.Type != "cloudflare_access_mutual_tls_hostname_settings" { + continue + } + + if rs.Primary.Attributes[consts.ZoneIDSchemaKey] != "" { + settings, _ := client.GetAccessMutualTLSHostnameSettings(context.Background(), cloudflare.ZoneIdentifier(rs.Primary.Attributes[consts.ZoneIDSchemaKey])) + if len(settings) != 0 { + return fmt.Errorf("AccessMutualTLSHostnameSettings still exists") + } + } + + if rs.Primary.Attributes[consts.AccountIDSchemaKey] != "" { + settings, _ := client.GetAccessMutualTLSHostnameSettings(context.Background(), cloudflare.AccountIdentifier(rs.Primary.Attributes[consts.AccountIDSchemaKey])) + if len(settings) != 0 { + return fmt.Errorf("AccessMutualTLSHostnameSettings still exists") + } + } + } + + return nil +} + +func testAccessMutualTLSHostnameSettingsConfig(rnd string, identifier *cloudflare.ResourceContainer, domain string) string { + return fmt.Sprintf(` +resource "cloudflare_access_mutual_tls_hostname_settings" "%[1]s" { + %[2]s_id = "%[3]s" + settings { + hostname = "%[4]s" + client_certificate_forwarding = true + china_network = false + } +} +`, rnd, identifier.Type, identifier.Identifier, domain) +} diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/schema.go b/internal/framework/service/access_mutual_tls_hostname_settings/schema.go new file mode 100644 index 0000000000..191b626b77 --- /dev/null +++ b/internal/framework/service/access_mutual_tls_hostname_settings/schema.go @@ -0,0 +1,62 @@ +package access_mutual_tls_hostname_settings + +import ( + "context" + + "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" +) + +func (r *AccessMutualTLSHostnameSettingsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + Description: "", + Attributes: map[string]schema.Attribute{ + consts.AccountIDSchemaKey: schema.StringAttribute{ + Description: consts.AccountIDSchemaDescription, + Optional: true, + Validators: []validator.String{ + stringvalidator.ConflictsWith( + path.Expression(path.MatchRoot(consts.ZoneIDSchemaKey)), + ), + }, + }, + consts.ZoneIDSchemaKey: schema.StringAttribute{ + Description: consts.ZoneIDSchemaDescription, + Optional: true, + Validators: []validator.String{ + stringvalidator.ConflictsWith( + path.Expression(path.MatchRoot(consts.AccountIDSchemaKey)), + ), + }, + }, + }, + Blocks: map[string]schema.Block{ + "settings": schema.ListNestedBlock{ + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "hostname": schema.StringAttribute{ + Required: true, + Description: "The hostname that these settings apply to.", + }, + "china_network": schema.BoolAttribute{ + Optional: true, + Description: "Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.", + }, + "client_certificate_forwarding": schema.BoolAttribute{ + Optional: true, + Description: "Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.", + }, + }, + }, + Validators: []validator.List{ + listvalidator.SizeAtLeast(1), + }, + }, + }, + } +} From 73b96e8f5c8d21d14651dd55373aab5f9c1327c4 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 13 Mar 2024 02:13:45 +0000 Subject: [PATCH 175/264] Update CHANGELOG.md for #3178 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bfc8d8eb..2e4c04378c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) ## 4.26.0 (March 6th, 2024) From c38133ef9d4fddfbe410e5fa89d6b497422f5c8f Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 13 Mar 2024 13:24:37 +1100 Subject: [PATCH 176/264] fix lint for %w in Errorf --- .../resource_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go b/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go index bdb31ccf27..f4c5bc582b 100644 --- a/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go +++ b/internal/framework/service/access_mutual_tls_hostname_settings/resource_test.go @@ -22,7 +22,7 @@ func init() { client, clientErr := acctest.SharedClient() if clientErr != nil { - return fmt.Errorf("Failed to create Cloudflare client: %s", clientErr) + return fmt.Errorf("Failed to create Cloudflare client: %w", clientErr) } deletedSettings := cloudflare.UpdateAccessMutualTLSHostnameSettingsParams{ @@ -32,13 +32,13 @@ func init() { accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") _, err := client.UpdateAccessMutualTLSHostnameSettings(ctx, cloudflare.AccountIdentifier(accountID), deletedSettings) if err != nil { - return fmt.Errorf("Failed to fetch Cloudflare Access Mutual TLS hostname settings: %s", err) + return fmt.Errorf("Failed to fetch Cloudflare Access Mutual TLS hostname settings: %w", err) } zoneID := os.Getenv("CLOUDFLARE_ZONE_ID") _, err = client.UpdateAccessMutualTLSHostnameSettings(ctx, cloudflare.ZoneIdentifier(zoneID), deletedSettings) if err != nil { - return fmt.Errorf("Failed to delete Cloudflare Access Mutual TLS hostname settings: %s", err) + return fmt.Errorf("Failed to delete Cloudflare Access Mutual TLS hostname settings: %w", err) } return nil @@ -46,7 +46,7 @@ func init() { }) } -func TestAccCloudflareAccessMutualTLSHostnameSettings(t *testing.T) { +func TestAccCloudflareAccessMutualTLSHostnameSettings_Simple(t *testing.T) { // Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the Access // service does not yet support the API tokens and it results in // misleading state error messages. @@ -83,7 +83,7 @@ func TestAccCloudflareAccessMutualTLSHostnameSettings(t *testing.T) { func testAccCheckCloudflareAccessMutualTLSHostnameSettingsDestroy(s *terraform.State) error { client, err := acctest.SharedClient() if err != nil { - return fmt.Errorf("Failed to create Cloudflare client: %s", err) + return fmt.Errorf("Failed to create Cloudflare client: %w", err) } for _, rs := range s.RootModule().Resources { From 8e5f1a89b1d420cfb1eac49eec41ca74c44b76bf Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 13 Mar 2024 13:34:46 +1100 Subject: [PATCH 177/264] `make docs` --- .../access_mutual_tls_hostname_settings.md | 55 +++++++++++++++++++ .../import.sh | 5 ++ .../resource.tf | 8 +++ .../resource.go | 10 +++- .../schema.go | 2 +- 5 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 docs/resources/access_mutual_tls_hostname_settings.md create mode 100644 examples/resources/cloudflare_access_mutual_tls_hostname_settings/import.sh create mode 100644 examples/resources/cloudflare_access_mutual_tls_hostname_settings/resource.tf diff --git a/docs/resources/access_mutual_tls_hostname_settings.md b/docs/resources/access_mutual_tls_hostname_settings.md new file mode 100644 index 0000000000..f4df4cd186 --- /dev/null +++ b/docs/resources/access_mutual_tls_hostname_settings.md @@ -0,0 +1,55 @@ +--- +page_title: "cloudflare_access_mutual_tls_hostname_settings Resource - Cloudflare" +subcategory: "" +description: |- + Provides a Cloudflare Access Mutual TLS Certificate Settings resource. +--- + +# cloudflare_access_mutual_tls_hostname_settings (Resource) + +Provides a Cloudflare Access Mutual TLS Certificate Settings resource. + +## Example Usage + +```terraform +resource "cloudflare_access_mutual_tls_hostname_settings" "example" { + zone_id = "0da42c8d2132a9ddaf714f9e7c920711" + settings { + hostname = "example.com" + client_certificate_forwarding = true + china_network = false + } +} +``` + +## Schema + +### Optional + +- `account_id` (String) The account identifier to target for the resource. +- `settings` (Block List) (see [below for nested schema](#nestedblock--settings)) +- `zone_id` (String) The zone identifier to target for the resource. + + +### Nested Schema for `settings` + +Required: + +- `hostname` (String) The hostname that these settings apply to. + +Optional: + +- `china_network` (Boolean) Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled. +- `client_certificate_forwarding` (Boolean) Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin. + +## Import + +Import is supported using the following syntax: + +```shell +# Account level mTLS hostname settings import. +$ terraform import cloudflare_access_mutual_tls_hostname_settings.example account/ + +# Zone level mTLS hostname settings import. +$ terraform import cloudflare_access_mutual_tls_hostname_settings.example zone/ +``` diff --git a/examples/resources/cloudflare_access_mutual_tls_hostname_settings/import.sh b/examples/resources/cloudflare_access_mutual_tls_hostname_settings/import.sh new file mode 100644 index 0000000000..894f5cc03e --- /dev/null +++ b/examples/resources/cloudflare_access_mutual_tls_hostname_settings/import.sh @@ -0,0 +1,5 @@ +# Account level mTLS hostname settings import. +$ terraform import cloudflare_access_mutual_tls_hostname_settings.example account/ + +# Zone level mTLS hostname settings import. +$ terraform import cloudflare_access_mutual_tls_hostname_settings.example zone/ diff --git a/examples/resources/cloudflare_access_mutual_tls_hostname_settings/resource.tf b/examples/resources/cloudflare_access_mutual_tls_hostname_settings/resource.tf new file mode 100644 index 0000000000..a1bdec5d15 --- /dev/null +++ b/examples/resources/cloudflare_access_mutual_tls_hostname_settings/resource.tf @@ -0,0 +1,8 @@ +resource "cloudflare_access_mutual_tls_hostname_settings" "example" { + zone_id = "0da42c8d2132a9ddaf714f9e7c920711" + settings { + hostname = "example.com" + client_certificate_forwarding = true + china_network = false + } +} diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/resource.go b/internal/framework/service/access_mutual_tls_hostname_settings/resource.go index c7d7fb0405..75dfc9f5c2 100644 --- a/internal/framework/service/access_mutual_tls_hostname_settings/resource.go +++ b/internal/framework/service/access_mutual_tls_hostname_settings/resource.go @@ -193,7 +193,7 @@ func (r *AccessMutualTLSHostnameSettingsResource) Delete(ctx context.Context, re func (r *AccessMutualTLSHostnameSettingsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { attributes := strings.Split(req.ID, "/") - invalidIDMessage := "invalid ID (\"%s\") specified, should be in format \"account_id/\" or \"zone_id/\"" + invalidIDMessage := "invalid ID (\"%s\") specified, should be in format \"account/\" or \"zone/\"" if len(attributes) != 2 { resp.Diagnostics.AddError("error importing Access Mutual TLS Hostname Settings", fmt.Sprintf(invalidIDMessage, req.ID)) return @@ -201,14 +201,18 @@ func (r *AccessMutualTLSHostnameSettingsResource) ImportState(ctx context.Contex identifierType, identifierID := attributes[0], attributes[1] - if !(identifierType == "zone_id" || identifierType == "account_id") { + if !(identifierType == "zone" || identifierType == "account") { resp.Diagnostics.AddError("invalid id specified", fmt.Sprintf(invalidIDMessage, req.ID)) return } tflog.Debug(ctx, fmt.Sprintf("Importing Cloudflare Access Mutual TLS Hostname Settings: for %s %s", identifierType, identifierID)) - resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(identifierType), identifierID)...) + schemaIdentifierName := "account_id" + if identifierType == "zone" { + schemaIdentifierName = "zone_id" + } + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(schemaIdentifierName), identifierID)...) } func buildAccessMutualTLSHostnameSettingsModel(settings []cloudflare.AccessMutualTLSHostnameSettings, zoneID, accountID basetypes.StringValue) *AccessMutualTLSHostnameSettingsModel { diff --git a/internal/framework/service/access_mutual_tls_hostname_settings/schema.go b/internal/framework/service/access_mutual_tls_hostname_settings/schema.go index 191b626b77..6882f665de 100644 --- a/internal/framework/service/access_mutual_tls_hostname_settings/schema.go +++ b/internal/framework/service/access_mutual_tls_hostname_settings/schema.go @@ -14,7 +14,7 @@ import ( func (r *AccessMutualTLSHostnameSettingsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "", + Description: "Provides a Cloudflare Access Mutual TLS Certificate Settings resource.", Attributes: map[string]schema.Attribute{ consts.AccountIDSchemaKey: schema.StringAttribute{ Description: consts.AccountIDSchemaDescription, From 468971f590ea43a46cb2a6156f4f6b645ecd281c Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 13 Mar 2024 02:47:23 +0000 Subject: [PATCH 178/264] Update CHANGELOG.md for #3173 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e4c04378c..1681f09b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.27.0 (Unreleased) +FEATURES: + +* **New Resource:** `cloudflare_access_mutual_tls_hostname_settings` ([#3173](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3173)) + ENHANCEMENTS: * resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) From e15e4d28ccec9f6934c969563db931309343c628 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Thu, 29 Feb 2024 16:55:06 +0000 Subject: [PATCH 179/264] Allow uploading Workers to dispatch namespaces + tags --- .../resource_cloudflare_workers_script.go | 67 +++++++++++++------ ...resource_cloudflare_workers_script_test.go | 2 +- .../schema_cloudflare_workers_script.go | 12 ++++ 3 files changed, 59 insertions(+), 22 deletions(-) diff --git a/internal/sdkv2provider/resource_cloudflare_workers_script.go b/internal/sdkv2provider/resource_cloudflare_workers_script.go index cb987e5a34..7e0de8fa57 100644 --- a/internal/sdkv2provider/resource_cloudflare_workers_script.go +++ b/internal/sdkv2provider/resource_cloudflare_workers_script.go @@ -54,8 +54,12 @@ func getScriptData(d *schema.ResourceData, client *cloudflare.API) (ScriptData, type ScriptBindings map[string]cloudflare.WorkerBinding -func getWorkerScriptBindings(ctx context.Context, accountId, scriptName string, client *cloudflare.API) (ScriptBindings, error) { - resp, err := client.ListWorkerBindings(ctx, cloudflare.AccountIdentifier(accountId), cloudflare.ListWorkerBindingsParams{ScriptName: scriptName}) +func getWorkerScriptBindings(ctx context.Context, accountId, scriptName string, dispatchNamespace *string, client *cloudflare.API) (ScriptBindings, error) { + resp, err := client.ListWorkerBindings( + ctx, + cloudflare.AccountIdentifier(accountId), + cloudflare.ListWorkerBindingsParams{ScriptName: scriptName, DispatchNamespace: dispatchNamespace}, + ) if err != nil { return nil, fmt.Errorf("cannot list script bindings: %w", err) } @@ -158,6 +162,14 @@ func getCompatibilityFlags(d *schema.ResourceData) []string { return compatibilityFlags } +func getTags(d *schema.ResourceData) []string { + tags := make([]string, 0) + for _, item := range d.Get("tags").(*schema.Set).List() { + tags = append(tags, item.(string)) + } + return tags +} + func resourceCloudflareWorkerScriptCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*cloudflare.API) accountID := d.Get(consts.AccountIDSchemaKey).(string) @@ -167,8 +179,10 @@ func resourceCloudflareWorkerScriptCreate(ctx context.Context, d *schema.Resourc return diag.FromErr(err) } + dispatchNamespace := d.Get("dispatch_namespace").(string) + // make sure that the worker does not already exist - r, _ := client.GetWorker(ctx, cloudflare.AccountIdentifier(accountID), scriptData.Params.ScriptName) + r, _ := client.GetWorkerWithDispatchNamespace(ctx, cloudflare.AccountIdentifier(accountID), scriptData.Params.ScriptName, dispatchNamespace) if r.WorkerScript.Script != "" { return diag.FromErr(fmt.Errorf("script already exists")) } @@ -188,15 +202,19 @@ func resourceCloudflareWorkerScriptCreate(ctx context.Context, d *schema.Resourc placement := getPlacement(d) + tags := getTags(d) + _, err = client.UploadWorker(ctx, cloudflare.AccountIdentifier(accountID), cloudflare.CreateWorkerParams{ - ScriptName: scriptData.Params.ScriptName, - Script: scriptBody, - CompatibilityDate: d.Get("compatibility_date").(string), - CompatibilityFlags: getCompatibilityFlags(d), - Module: d.Get("module").(bool), - Bindings: bindings, - Logpush: &logpush, - Placement: &placement, + ScriptName: scriptData.Params.ScriptName, + Script: scriptBody, + CompatibilityDate: d.Get("compatibility_date").(string), + CompatibilityFlags: getCompatibilityFlags(d), + Module: d.Get("module").(bool), + Bindings: bindings, + Logpush: &logpush, + Placement: &placement, + DispatchNamespaceName: &dispatchNamespace, + Tags: tags, }) if err != nil { return diag.FromErr(errors.Wrap(err, "error creating worker script")) @@ -216,7 +234,9 @@ func resourceCloudflareWorkerScriptRead(ctx context.Context, d *schema.ResourceD return diag.FromErr(err) } - r, err := client.GetWorker(ctx, cloudflare.AccountIdentifier(accountID), scriptData.Params.ScriptName) + dispatchNamespace := d.Get("dispatch_namespace").(string) + + r, err := client.GetWorkerWithDispatchNamespace(ctx, cloudflare.AccountIdentifier(accountID), scriptData.Params.ScriptName, dispatchNamespace) if err != nil { // If the resource is deleted, we should set the ID to "" and not // return an error according to the terraform spec @@ -234,7 +254,7 @@ func resourceCloudflareWorkerScriptRead(ctx context.Context, d *schema.ResourceD parseWorkerBindings(d, existingBindings) - bindings, err := getWorkerScriptBindings(ctx, accountID, d.Get("name").(string), client) + bindings, err := getWorkerScriptBindings(ctx, accountID, d.Get("name").(string), &dispatchNamespace, client) if err != nil { return diag.FromErr(err) } @@ -380,15 +400,20 @@ func resourceCloudflareWorkerScriptUpdate(ctx context.Context, d *schema.Resourc placement := getPlacement(d) + dispatchNamespace := d.Get("dispatch_namespace").(string) + tags := getTags(d) + _, err = client.UploadWorker(ctx, cloudflare.AccountIdentifier(accountID), cloudflare.CreateWorkerParams{ - ScriptName: scriptData.Params.ScriptName, - Script: scriptBody, - CompatibilityDate: d.Get("compatibility_date").(string), - CompatibilityFlags: getCompatibilityFlags(d), - Module: d.Get("module").(bool), - Bindings: bindings, - Logpush: &logpush, - Placement: &placement, + ScriptName: scriptData.Params.ScriptName, + Script: scriptBody, + CompatibilityDate: d.Get("compatibility_date").(string), + CompatibilityFlags: getCompatibilityFlags(d), + Module: d.Get("module").(bool), + Bindings: bindings, + Logpush: &logpush, + Placement: &placement, + DispatchNamespaceName: &dispatchNamespace, + Tags: tags, }) if err != nil { return diag.FromErr(errors.Wrap(err, "error updating worker script")) diff --git a/internal/sdkv2provider/resource_cloudflare_workers_script_test.go b/internal/sdkv2provider/resource_cloudflare_workers_script_test.go index f1970eb0e9..3b822a5b88 100644 --- a/internal/sdkv2provider/resource_cloudflare_workers_script_test.go +++ b/internal/sdkv2provider/resource_cloudflare_workers_script_test.go @@ -308,7 +308,7 @@ func testAccCheckCloudflareWorkerScriptExists(n string, script *cloudflare.Worke } name := strings.Replace(n, "cloudflare_worker_script.", "", -1) - foundBindings, err := getWorkerScriptBindings(context.Background(), accountID, name, client) + foundBindings, err := getWorkerScriptBindings(context.Background(), accountID, name, nil, client) if err != nil { return fmt.Errorf("cannot list script bindings: %w", err) } diff --git a/internal/sdkv2provider/schema_cloudflare_workers_script.go b/internal/sdkv2provider/schema_cloudflare_workers_script.go index 60df53a408..29873e87b1 100644 --- a/internal/sdkv2provider/schema_cloudflare_workers_script.go +++ b/internal/sdkv2provider/schema_cloudflare_workers_script.go @@ -207,6 +207,18 @@ func resourceCloudflareWorkerScriptSchema() map[string]*schema.Schema { Optional: true, Elem: placementResource, }, + "dispatch_namespace": { + Type: schema.TypeString, + Optional: true, + Description: "Name of the Workers for Platforms dispatch namespace.", + }, + "tags": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + // TODO: dispatch_namespace binding "plain_text_binding": { Type: schema.TypeSet, Optional: true, From 03e8a97e42b5efd5d8f3a7e2043d13561125023e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 23:08:47 +0000 Subject: [PATCH 180/264] build(deps): bump google.golang.org/protobuf in /tools Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tools/go.mod | 2 +- tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index e8f66360ed..be0520fcb0 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -250,7 +250,7 @@ require ( golang.org/x/tools v0.14.0 // indirect golang.org/x/vuln v0.0.0-20230110180137-6ad3e3d07815 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index 01cc4bf5d2..852fd4d76e 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -1389,8 +1389,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 7b6ae235b899d9970e7dccbaecf764ddb81be687 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Mar 2024 23:09:01 +0000 Subject: [PATCH 181/264] add CHANGELOG for #3180 --- .changelog/3180.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3180.txt diff --git a/.changelog/3180.txt b/.changelog/3180.txt new file mode 100644 index 0000000000..14cdb94a61 --- /dev/null +++ b/.changelog/3180.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools +``` From ebf58fdaa5fedc17436895bffed269a1a04d0132 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 13 Mar 2024 23:15:24 +0000 Subject: [PATCH 182/264] Update CHANGELOG.md for #3180 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1681f09b7a..22ab1e808e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) +* provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools ([#3180](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3180)) ## 4.26.0 (March 6th, 2024) From 6cef56928dc7493188d480b06a2564d8e08bdf01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 23:15:39 +0000 Subject: [PATCH 183/264] build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 75fed56b16..5c8ff63f5e 100644 --- a/go.mod +++ b/go.mod @@ -92,6 +92,6 @@ require ( google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 5c20911086..c302d6200e 100644 --- a/go.sum +++ b/go.sum @@ -270,8 +270,8 @@ google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 78bde7e9e4e9f40f2808eeaa3af96ce6be91aa04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Mar 2024 23:16:03 +0000 Subject: [PATCH 184/264] add CHANGELOG for #3181 --- .changelog/3181.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3181.txt diff --git a/.changelog/3181.txt b/.changelog/3181.txt new file mode 100644 index 0000000000..73f1d0263f --- /dev/null +++ b/.changelog/3181.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump google.golang.org/protobuf from 1.32.0 to 1.33.0 +``` From 4bee994747d6897b67f7d121636495446830de5e Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 13 Mar 2024 23:17:48 +0000 Subject: [PATCH 185/264] Update CHANGELOG.md for #3181 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ab1e808e..5acbbddd37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) * provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools ([#3180](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3180)) +* provider: bump google.golang.org/protobuf from 1.32.0 to 1.33.0 ([#3181](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3181)) ## 4.26.0 (March 6th, 2024) From 1cdd0884d11c9d9991c825db82e0d2851bb70a6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 23:25:56 +0000 Subject: [PATCH 186/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.4 to 1.52.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.51.4...service/s3/v1.52.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5c8ff63f5e..d64cf96e3b 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.25.3 github.com/aws/aws-sdk-go-v2/config v1.27.7 github.com/aws/aws-sdk-go-v2/credentials v1.17.7 - github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 diff --git a/go.sum b/go.sum index c302d6200e..d486195878 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftO github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 h1:4t+QEX7BsXz98W8W1lNvMAG+NX8qHz2CjLBxQKku40g= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4 h1:lW5xUzOPGAMY7HPuNF4FdyBwRc3UJ/e8KsapbesVeNU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0 h1:k7gL76sSR0e2pLphjfmjD/+pDDtoOHvWp8ezpTsdyes= +github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= From aec103bf502bd4262d5a33333bd5afd2152db5ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Mar 2024 23:26:12 +0000 Subject: [PATCH 187/264] add CHANGELOG for #3182 --- .changelog/3182.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3182.txt diff --git a/.changelog/3182.txt b/.changelog/3182.txt new file mode 100644 index 0000000000..1c49c7ba06 --- /dev/null +++ b/.changelog/3182.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.4 to 1.52.0 +``` From f1e82b581fdd7104151f3429d1e9ccf8fbe519b1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 13 Mar 2024 23:30:12 +0000 Subject: [PATCH 188/264] Update CHANGELOG.md for #3182 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5acbbddd37..e575c07bbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.4 to 1.52.0 ([#3182](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3182)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) * provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools ([#3180](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3180)) From d6a3804298ca588a01633bcfde79ebd49db6bd70 Mon Sep 17 00:00:00 2001 From: Nikolai Mishin Date: Thu, 14 Mar 2024 00:30:46 +0100 Subject: [PATCH 189/264] Implement the 'airport_code' filter --- .changelog/3183.txt | 3 +++ docs/resources/notification_policy.md | 1 + .../sdkv2provider/schema_cloudflare_notification_policy.go | 6 ++++++ 3 files changed, 10 insertions(+) create mode 100644 .changelog/3183.txt diff --git a/.changelog/3183.txt b/.changelog/3183.txt new file mode 100644 index 0000000000..772890424d --- /dev/null +++ b/.changelog/3183.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_notification_policy: Implement the `airport_code` filter +``` diff --git a/docs/resources/notification_policy.md b/docs/resources/notification_policy.md index 12bd19dd19..7328cf6016 100644 --- a/docs/resources/notification_policy.md +++ b/docs/resources/notification_policy.md @@ -105,6 +105,7 @@ Optional: - `actions` (Set of String) Targeted actions for alert. - `affected_components` (Set of String) Affected components for alert. Available values: `API`, `API Shield`, `Access`, `Always Online`, `Analytics`, `Apps Marketplace`, `Argo Smart Routing`, `Audit Logs`, `Authoritative DNS`, `Billing`, `Bot Management`, `Bring Your Own IP (BYOIP)`, `Browser Isolation`, `CDN Cache Purge`, `CDN/Cache`, `Cache Reserve`, `Challenge Platform`, `Cloud Access Security Broker (CASB)`, `Community Site`, `DNS Root Servers`, `DNS Updates`, `Dashboard`, `Data Loss Prevention (DLP)`, `Developer's Site`, `Digital Experience Monitoring (DEX)`, `Distributed Web Gateway`, `Durable Objects`, `Email Routing`, `Ethereum Gateway`, `Firewall`, `Gateway`, `Geo-Key Manager`, `Image Resizing`, `Images`, `Infrastructure`, `Lists`, `Load Balancing and Monitoring`, `Logs`, `Magic Firewall`, `Magic Transit`, `Magic WAN`, `Magic WAN Connector`, `Marketing Site`, `Mirage`, `Network`, `Notifications`, `Observatory`, `Page Shield`, `Pages`, `R2`, `Radar`, `Randomness Beacon`, `Recursive DNS`, `Registrar`, `Registration Data Access Protocol (RDAP)`, `SSL Certificate Provisioning`, `SSL for SaaS Provisioning`, `Security Center`, `Snippets`, `Spectrum`, `Speed Optimizations`, `Stream`, `Support Site`, `Time Services`, `Trace`, `Tunnel`, `Turnstile`, `WARP`, `Waiting Room`, `Web Analytics`, `Workers`, `Workers KV`, `Workers Preview`, `Zaraz`, `Zero Trust`, `Zero Trust Dashboard`, `Zone Versioning`. +- `airport_code` (Set of String) Filter on Points of Presence. - `alert_trigger_preferences` (Set of String) Alert trigger preferences. Example: `slo`. - `enabled` (Set of String) State of the pool to alert on. - `environment` (Set of String) Environment of pages. Available values: `ENVIRONMENT_PREVIEW`, `ENVIRONMENT_PRODUCTION`. diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index 6dc6e66853..51f5a178a2 100644 --- a/internal/sdkv2provider/schema_cloudflare_notification_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_notification_policy.go @@ -258,6 +258,12 @@ func notificationPolicyFilterSchema() *schema.Schema { Optional: true, Description: "Targeted actions for alert.", }, + "airport_code": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Description: "Filter on Points of Presence.", + }, "affected_components": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, From bde0b7000bd06197e71eacef54e560e42919df09 Mon Sep 17 00:00:00 2001 From: Nikolai Mishin Date: Thu, 14 Mar 2024 00:48:30 +0100 Subject: [PATCH 190/264] Fix lint for schema_cloudflare_notification_policy --- .../schema_cloudflare_notification_policy.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index 51f5a178a2..6227124bde 100644 --- a/internal/sdkv2provider/schema_cloudflare_notification_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_notification_policy.go @@ -259,11 +259,11 @@ func notificationPolicyFilterSchema() *schema.Schema { Description: "Targeted actions for alert.", }, "airport_code": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Description: "Filter on Points of Presence.", - }, + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Description: "Filter on Points of Presence.", + }, "affected_components": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, From de0bf1c608c796db691118db03ecaa991542353d Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 14 Mar 2024 12:34:35 +1100 Subject: [PATCH 191/264] `make docs` --- .../cloudflare_hyperdrive_config/resource.tf | 22 +------------------ .../hyperdrive_config/resource_test.go | 6 ++++- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/examples/resources/cloudflare_hyperdrive_config/resource.tf b/examples/resources/cloudflare_hyperdrive_config/resource.tf index 9ed93c4027..7e66281e82 100644 --- a/examples/resources/cloudflare_hyperdrive_config/resource.tf +++ b/examples/resources/cloudflare_hyperdrive_config/resource.tf @@ -1,8 +1,7 @@ -# Config using all default values resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - origin = { + origin = { database = "postgres" password = "my-password" host = "my-database.example.com" @@ -11,22 +10,3 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { user = "my-user" } } - -# Config not using any default values -resource "cloudflare_hyperdrive_config" "no_defaults" { - account_id = "f037e56e89293a057740de681ac9abbe" - name = "my-hyperdrive-config" - origin = { - database = "postgres" - password = "my-password" - host = "my-database.example.com" - port = 5432 - scheme = "postgres" - user = "my-user" - } - caching = { - disabled = false - } -} - - diff --git a/internal/framework/service/hyperdrive_config/resource_test.go b/internal/framework/service/hyperdrive_config/resource_test.go index 87bb453f21..bddb1a9edb 100644 --- a/internal/framework/service/hyperdrive_config/resource_test.go +++ b/internal/framework/service/hyperdrive_config/resource_test.go @@ -48,6 +48,8 @@ func init() { } func TestAccCloudflareHyperdriveConfig_Basic(t *testing.T) { + acctest.TestAccSkipForDefaultAccount(t, "Requires real Postgres instance to be available.") + rnd := utils.GenerateRandomResourceName() accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") resourceName := "cloudflare_hyperdrive_config." + rnd @@ -103,6 +105,8 @@ func TestAccCloudflareHyperdriveConfig_Basic(t *testing.T) { } func TestAccCloudflareHyperdriveConfig_Minimum(t *testing.T) { + acctest.TestAccSkipForDefaultAccount(t, "Requires real Postgres instance to be available.") + rnd := utils.GenerateRandomResourceName() accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") resourceName := "cloudflare_hyperdrive_config." + rnd @@ -167,7 +171,7 @@ func testHyperdriveConfigConfig( } caching = { disabled = %[10]s - } + } }`, rnd, accountId, name, password, origin.Database, origin.Host, fmt.Sprintf("%d", origin.Port), origin.Scheme, origin.User, fmt.Sprintf("%t", *caching.Disabled), ) From c2ad54694db4d7e59e59ff0310995afa481bc424 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 14 Mar 2024 12:37:29 +1100 Subject: [PATCH 192/264] handle when API errors are recieved as diag.Diags --- internal/framework/service/hyperdrive_config/resource.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/framework/service/hyperdrive_config/resource.go b/internal/framework/service/hyperdrive_config/resource.go index f63cf2147d..d11b563ec7 100644 --- a/internal/framework/service/hyperdrive_config/resource.go +++ b/internal/framework/service/hyperdrive_config/resource.go @@ -81,6 +81,7 @@ func (r *HyperdriveConfigResource) Create(ctx context.Context, req resource.Crea }) if err != nil { resp.Diagnostics.AddError("Error creating hyperdrive config", err.Error()) + return } var diags diag.Diagnostics @@ -103,6 +104,7 @@ func (r *HyperdriveConfigResource) Read(ctx context.Context, req resource.ReadRe if err != nil { resp.Diagnostics.AddError("Error reading hyperdrive config", err.Error()) + return } var diags diag.Diagnostics @@ -142,6 +144,7 @@ func (r *HyperdriveConfigResource) Update(ctx context.Context, req resource.Upda if err != nil { resp.Diagnostics.AddError("Error updating hyperdrive config", err.Error()) + return } var diags diag.Diagnostics From e451cb52da81cd068f3e0f4e2f09ab34c7420344 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 14 Mar 2024 01:48:14 +0000 Subject: [PATCH 193/264] Update CHANGELOG.md for #3111 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e575c07bbb..9ad2c2fac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Resource:** `cloudflare_access_mutual_tls_hostname_settings` ([#3173](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3173)) +* **New Resource:** `cloudflare_hyperdrive_config` ([#3111](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3111)) ENHANCEMENTS: From 6f548d24160cf695c9264e92d72a77b08b7f6d27 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Thu, 14 Mar 2024 13:03:36 +0000 Subject: [PATCH 194/264] Generate docs --- docs/resources/worker_script.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/resources/worker_script.md b/docs/resources/worker_script.md index d0a2c038bd..aca11b84fd 100644 --- a/docs/resources/worker_script.md +++ b/docs/resources/worker_script.md @@ -75,6 +75,7 @@ resource "cloudflare_worker_script" "my_script" { - `compatibility_date` (String) The date to use for the compatibility flag. - `compatibility_flags` (Set of String) Compatibility flags used for Worker Scripts. - `d1_database_binding` (Block Set) (see [below for nested schema](#nestedblock--d1_database_binding)) +- `dispatch_namespace` (String) Name of the Workers for Platforms dispatch namespace. - `kv_namespace_binding` (Block Set) (see [below for nested schema](#nestedblock--kv_namespace_binding)) - `logpush` (Boolean) Enabling allows Worker events to be sent to a defined Logpush destination. - `module` (Boolean) Whether to upload Worker as a module. @@ -84,6 +85,7 @@ resource "cloudflare_worker_script" "my_script" { - `r2_bucket_binding` (Block Set) (see [below for nested schema](#nestedblock--r2_bucket_binding)) - `secret_text_binding` (Block Set) (see [below for nested schema](#nestedblock--secret_text_binding)) - `service_binding` (Block Set) (see [below for nested schema](#nestedblock--service_binding)) +- `tags` (Set of String) - `webassembly_binding` (Block Set) (see [below for nested schema](#nestedblock--webassembly_binding)) ### Read-Only From be3786fa6c1896dd2cb15897b3bb48775113f4e5 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Thu, 14 Mar 2024 13:07:17 +0000 Subject: [PATCH 195/264] Write changelog --- .changelog/3154.txt | 7 +++++++ examples/resources/cloudflare_worker_script/resource.tf | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 .changelog/3154.txt diff --git a/.changelog/3154.txt b/.changelog/3154.txt new file mode 100644 index 0000000000..897870bca6 --- /dev/null +++ b/.changelog/3154.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +resource/cloudflare_worker_script: Add `dispatch_namespace` to support uploading to a Workers for Platforms namespace +``` + +```release-note:enhancement +resource/cloudflare_worker_script: Add `tags` to support tagging Workers for Platforms Workers +``` diff --git a/examples/resources/cloudflare_worker_script/resource.tf b/examples/resources/cloudflare_worker_script/resource.tf index 492e2b871a..12a39f56c9 100644 --- a/examples/resources/cloudflare_worker_script/resource.tf +++ b/examples/resources/cloudflare_worker_script/resource.tf @@ -45,3 +45,11 @@ resource "cloudflare_worker_script" "my_script" { dataset = "dataset1" } } + +resource "cloudflare_worker_script" "wfp_user_worker" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "customer-worker-1" + content = file("script.js") + dispatch_namespace = "my-namespace" + tags = ["free"] +} From e35a6219860ede904286a7aff60c2ce2da35a89d Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Thu, 14 Mar 2024 13:14:19 +0000 Subject: [PATCH 196/264] DLP-1714: added ContextAwareness support for DLP Profiles OpenAPI Spec: https://developers.cloudflare.com/api/operations/dlp-profiles-update-predefined-profile?schema_url=https%3A%2F%2Fraw.githubusercontent.com%2Fcloudflare%2Fapi-schemas%2Fmain%2Fopenapi.yaml#request-body Signed-off-by: Matt Davis --- .changelog/3158.txt | 3 + docs/resources/dlp_profile.md | 18 +++++ .../resource_cloudflare_dlp_profile.go | 44 +++++++++++++ .../resource_cloudflare_dlp_profile_test.go | 66 +++++++++++++++++++ .../schema_cloudflare_dlp_profile.go | 35 ++++++++++ 5 files changed, 166 insertions(+) create mode 100644 .changelog/3158.txt diff --git a/.changelog/3158.txt b/.changelog/3158.txt new file mode 100644 index 0000000000..a1e4e3aa57 --- /dev/null +++ b/.changelog/3158.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_dlp_profile: Added support for `context_awareness` field to profiles +``` \ No newline at end of file diff --git a/docs/resources/dlp_profile.md b/docs/resources/dlp_profile.md index 9bff13a52c..8cf7f117eb 100644 --- a/docs/resources/dlp_profile.md +++ b/docs/resources/dlp_profile.md @@ -90,6 +90,7 @@ resource "cloudflare_dlp_profile" "example_custom" { ### Optional +- `context_awareness` (Block List, Max: 1) Scan the context of predefined entries to only return matches surrounded by keywords. (see [below for nested schema](#nestedblock--context_awareness)) - `description` (String) Brief summary of the profile and its intended use. ### Read-Only @@ -120,6 +121,23 @@ Optional: - `validation` (String) The validation algorithm to apply with this pattern. + + + +### Nested Schema for `context_awareness` + +Required: + +- `enabled` (Boolean) Scan the context of predefined entries to only return matches surrounded by keywords. +- `skip` (Block List, Min: 1, Max: 1) Content types to exclude from context analysis and return all matches. (see [below for nested schema](#nestedblock--context_awareness--skip)) + + +### Nested Schema for `context_awareness.skip` + +Required: + +- `files` (Boolean) Return all matches, regardless of context analysis result, if the data is a file. + ## Import Import is supported using the following syntax: diff --git a/internal/sdkv2provider/resource_cloudflare_dlp_profile.go b/internal/sdkv2provider/resource_cloudflare_dlp_profile.go index f79c330848..0a201f1357 100644 --- a/internal/sdkv2provider/resource_cloudflare_dlp_profile.go +++ b/internal/sdkv2provider/resource_cloudflare_dlp_profile.go @@ -71,6 +71,38 @@ func dlpEntryToSchema(entry cloudflare.DLPEntry) map[string]interface{} { return entrySchema } +func dlpContextAwarenessSkipToAPI(skipSchema map[string]interface{}) cloudflare.DLPContextAwarenessSkip { + files := skipSchema["files"].(bool) + skip := cloudflare.DLPContextAwarenessSkip{ + Files: &files, + } + return skip +} + +func dlpContextAwarenessToAPI(contextSchema map[string]interface{}) cloudflare.DLPContextAwareness { + enabled := contextSchema["enabled"].(bool) + skip_items := contextSchema["skip"].([]interface{}) + skip_item := skip_items[0].(map[string]interface{}) + context := cloudflare.DLPContextAwareness{ + Enabled: &enabled, + Skip: dlpContextAwarenessSkipToAPI(skip_item), + } + return context +} + +func dlpContextAwarenessSkipToSchema(skip cloudflare.DLPContextAwarenessSkip) map[string]interface{} { + skipSchema := make(map[string]interface{}) + skipSchema["files"] = skip.Files + return skipSchema +} + +func dlpContextAwarenessToSchema(context cloudflare.DLPContextAwareness) map[string]interface{} { + contextSchema := make(map[string]interface{}) + contextSchema["enabled"] = *context.Enabled + contextSchema["skip"] = []interface{}{dlpContextAwarenessSkipToSchema(context.Skip)} + return contextSchema +} + func dlpEntryToAPI(entryType string, entryMap map[string]interface{}) cloudflare.DLPEntry { apiEntry := cloudflare.DLPEntry{ Name: entryMap["name"].(string), @@ -109,6 +141,9 @@ func resourceCloudflareDLPProfileRead(ctx context.Context, d *schema.ResourceDat d.Set("description", dlpProfile.Description) } d.Set("allowed_match_count", dlpProfile.AllowedMatchCount) + if dlpProfile.ContextAwareness != nil { + d.Set("context_awareness", []interface{}{dlpContextAwarenessToSchema(*dlpProfile.ContextAwareness)}) + } entries := make([]interface{}, 0, len(dlpProfile.Entries)) for _, entry := range dlpProfile.Entries { entries = append(entries, dlpEntryToSchema(entry)) @@ -129,6 +164,11 @@ func resourceCloudflareDLPProfileCreate(ctx context.Context, d *schema.ResourceD AllowedMatchCount: d.Get("allowed_match_count").(int), } + if contextAwarenessSchema, ok := d.GetOk("context_awareness.0"); ok { + contextAwareness := dlpContextAwarenessToAPI(contextAwarenessSchema.(map[string]interface{})) + newDLPProfile.ContextAwareness = &contextAwareness + } + if newDLPProfile.Type == DLPProfileTypePredefined { return diag.FromErr(fmt.Errorf("predefined DLP profiles cannot be created and must be imported")) } @@ -164,6 +204,10 @@ func resourceCloudflareDLPProfileUpdate(ctx context.Context, d *schema.ResourceD AllowedMatchCount: d.Get("allowed_match_count").(int), } updatedDLPProfile.Description, _ = d.Get("description").(string) + if contextAwarenessSchema, ok := d.GetOk("context_awareness.0"); ok { + contextAwareness := dlpContextAwarenessToAPI(contextAwarenessSchema.(map[string]interface{})) + updatedDLPProfile.ContextAwareness = &contextAwareness + } if entries, ok := d.GetOk("entry"); ok { for _, entry := range entries.(*schema.Set).List() { updatedDLPProfile.Entries = append(updatedDLPProfile.Entries, dlpEntryToAPI(updatedDLPProfile.Type, entry.(map[string]interface{}))) diff --git a/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go b/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go index 5abd1425ee..4ed657fbda 100644 --- a/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go +++ b/internal/sdkv2provider/resource_cloudflare_dlp_profile_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + "github.com/cloudflare/cloudflare-go" + "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/plancheck" @@ -105,6 +107,44 @@ func TestAccCloudflareDLPProfile_CustomWithAllowedMatchCount(t *testing.T) { }) } +func TestAccCloudflareDLPProfile_ContextAwareness(t *testing.T) { + rnd := generateRandomResourceName() + name := fmt.Sprintf("cloudflare_dlp_profile.%s", rnd) + + enabled := true + files := true + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckAccount(t) + }, + ProviderFactories: providerFactories, + Steps: []resource.TestStep{ + { + Config: testAccCloudflareDLPProfileConfigWithContextAwareness(accountID, rnd, "custom profile", cloudflare.DLPContextAwareness{ + Enabled: &enabled, + Skip: cloudflare.DLPContextAwarenessSkip{ + Files: &files, + }, + }), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(name, consts.AccountIDSchemaKey, accountID), + resource.TestCheckResourceAttr(name, "name", rnd), + resource.TestCheckResourceAttr(name, "description", "custom profile"), + resource.TestCheckResourceAttr(name, "type", "custom"), + resource.TestCheckResourceAttr(name, "allowed_match_count", "0"), + resource.TestCheckResourceAttr(name, "entry.0.name", fmt.Sprintf("%s_entry1", rnd)), + resource.TestCheckResourceAttr(name, "entry.0.enabled", "true"), + resource.TestCheckResourceAttr(name, "entry.0.pattern.0.regex", "^4[0-9]"), + resource.TestCheckResourceAttr(name, "entry.0.pattern.0.validation", "luhn"), + resource.TestCheckResourceAttr(name, "context_awareness.0.enabled", "true"), + resource.TestCheckResourceAttr(name, "context_awareness.0.skip.0.files", "true"), + ), + }, + }, + }) +} + func testAccCloudflareDLPProfileConfigCustom(accountID, rnd, description string) string { return fmt.Sprintf(` resource "cloudflare_dlp_profile" "%[1]s" { @@ -172,3 +212,29 @@ resource "cloudflare_dlp_profile" "%[1]s" { } `, rnd, description, accountID, allowedMatchCount) } + +func testAccCloudflareDLPProfileConfigWithContextAwareness(accountID, rnd, description string, contextAwareness cloudflare.DLPContextAwareness) string { + return fmt.Sprintf(` +resource "cloudflare_dlp_profile" "%[2]s" { + account_id = "%[1]s" + name = "%[2]s" + description = "%[3]s" + allowed_match_count = 0 + type = "custom" + entry { + name = "%[2]s_entry1" + enabled = true + pattern { + regex = "^4[0-9]" + validation = "luhn" + } + } + context_awareness { + enabled = %[4]t + skip { + files = %[5]t + } + } +} +`, accountID, rnd, description, *contextAwareness.Enabled, *contextAwareness.Skip.Files) +} diff --git a/internal/sdkv2provider/schema_cloudflare_dlp_profile.go b/internal/sdkv2provider/schema_cloudflare_dlp_profile.go index 5638aaab8b..cf2f0f77d5 100644 --- a/internal/sdkv2provider/schema_cloudflare_dlp_profile.go +++ b/internal/sdkv2provider/schema_cloudflare_dlp_profile.go @@ -66,6 +66,31 @@ func hashResourceCloudflareDLPEntry(i interface{}) int { return schema.HashString(v["name"]) } +func resourceCloudflareDLPContextAwarenessSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + Description: "Scan the context of predefined entries to only return matches surrounded by keywords.", + }, + "skip": { + Type: schema.TypeList, + Description: "Content types to exclude from context analysis and return all matches.", + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "files": { + Type: schema.TypeBool, + Required: true, + Description: "Return all matches, regardless of context analysis result, if the data is a file.", + }, + }, + }, + }, + } +} + func resourceCloudflareDLPProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ consts.AccountIDSchemaKey: { @@ -107,5 +132,15 @@ func resourceCloudflareDLPProfileSchema() map[string]*schema.Schema { Required: true, ValidateFunc: validation.IntBetween(0, 1000), }, + "context_awareness": { + Type: schema.TypeList, + Description: "Scan the context of predefined entries to only return matches surrounded by keywords.", + Computed: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: resourceCloudflareDLPContextAwarenessSchema(), + }, + }, } } From 1d5e30228b2c017edea42f5cbcea7de23b0af0e2 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 15 Mar 2024 00:21:45 +0000 Subject: [PATCH 197/264] Update CHANGELOG.md for #3158 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ad2c2fac3..5f92eac1eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: ENHANCEMENTS: +* resource/cloudflare_dlp_profile: Added support for `context_awareness` field to profiles ([#3158](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3158)) * resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) BUG FIXES: From 37e68c76f13ad5f2f02ea5bf56182995b06909c1 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 15 Mar 2024 15:23:41 +1100 Subject: [PATCH 198/264] resource/cloudflare_logpush_job: only set the value in state when it is defined Updates the state management to only set the `output_options` when it is defined and avoid a permadiff showing it always being removed --- .changelog/3188.txt | 3 ++ .../resource_cloudflare_logpush_job.go | 50 +++++++++++-------- 2 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 .changelog/3188.txt diff --git a/.changelog/3188.txt b/.changelog/3188.txt new file mode 100644 index 0000000000..3eeacf816b --- /dev/null +++ b/.changelog/3188.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_logpush_job: only set the value in state when it is defined +``` diff --git a/internal/sdkv2provider/resource_cloudflare_logpush_job.go b/internal/sdkv2provider/resource_cloudflare_logpush_job.go index 5004eccb9b..9830ec5fc7 100644 --- a/internal/sdkv2provider/resource_cloudflare_logpush_job.go +++ b/internal/sdkv2provider/resource_cloudflare_logpush_job.go @@ -91,33 +91,39 @@ func resourceCloudflareLogpushJobRead(ctx context.Context, d *schema.ResourceDat filter = string(b) } - outputOptions := make(map[string]interface{}) - if job.OutputOptions != nil { - data, err := json.Marshal(&job.OutputOptions) - if err != nil { - return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) - } - err = json.Unmarshal(data, &outputOptions) - if err != nil { - return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) - } - // mapping from the API to the Schema: - // "cve20214428" -> "CVE-2021-44228" - // terraform does not allow the key to be upper case or contain dashes - if job.OutputOptions.CVE202144228 != nil { - delete(outputOptions, "CVE-2021-44228") - outputOptions["cve20214428"] = job.OutputOptions.CVE202144228 - } - } - d.Set("name", job.Name) d.Set("kind", job.Kind) d.Set("enabled", job.Enabled) d.Set("logpull_options", job.LogpullOptions) - err = d.Set("output_options", []map[string]interface{}{outputOptions}) - if err != nil { - return diag.FromErr(fmt.Errorf("failed to set output_options: %w", err)) + + // Only set the `output_options` should it be defined by the user or the API. + _, outputOptionsOK := d.GetOk("output_options") + if outputOptionsOK || job.OutputOptions != nil { + outputOptions := make(map[string]interface{}) + + if job.OutputOptions != nil { + data, err := json.Marshal(&job.OutputOptions) + if err != nil { + return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) + } + err = json.Unmarshal(data, &outputOptions) + if err != nil { + return diag.FromErr(fmt.Errorf("failed to extract output options: %w", err)) + } + // mapping from the API to the Schema: + // "cve20214428" -> "CVE-2021-44228" + // terraform does not allow the key to be upper case or contain dashes + if job.OutputOptions.CVE202144228 != nil { + delete(outputOptions, "CVE-2021-44228") + outputOptions["cve20214428"] = job.OutputOptions.CVE202144228 + } + } + + if err := d.Set("output_options", []map[string]interface{}{outputOptions}); err != nil { + return diag.FromErr(fmt.Errorf("failed to set output_options: %w", err)) + } } + d.Set("dataset", job.Dataset) d.Set("destination_conf", job.DestinationConf) d.Set("ownership_challenge", d.Get("ownership_challenge")) From 241df4b1d563cd2834cd322ba015704811fe6025 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 15 Mar 2024 04:28:07 +0000 Subject: [PATCH 199/264] Update CHANGELOG.md for #3154 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f92eac1eb..51fdfe9a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ENHANCEMENTS: * resource/cloudflare_dlp_profile: Added support for `context_awareness` field to profiles ([#3158](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3158)) * resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) +* resource/cloudflare_worker_script: Add `dispatch_namespace` to support uploading to a Workers for Platforms namespace ([#3154](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3154)) +* resource/cloudflare_worker_script: Add `tags` to support tagging Workers for Platforms Workers ([#3154](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3154)) BUG FIXES: From a5931e778243e0b09aba5aa434faa48a26e1d010 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Fri, 15 Mar 2024 19:32:18 +0000 Subject: [PATCH 200/264] Update CHANGELOG.md for #3188 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51fdfe9a9d..86880d4190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ENHANCEMENTS: BUG FIXES: * resource/cloudflare_access_application: Add Sensitive to oidc client_secret and preserve client_secret across apply ([#3168](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3168)) +* resource/cloudflare_logpush_job: only set the value in state when it is defined ([#3188](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3188)) DEPENDENCIES: From 7e74c9d67deab4c3738bbbaad238073b01d67f6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 23:30:06 +0000 Subject: [PATCH 201/264] build(deps): bump the aws group with 1 update Bumps the aws group with 1 update: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.0 to 1.52.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.52.0...service/s3/v1.52.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d64cf96e3b..3ebcaaf449 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.25.3 github.com/aws/aws-sdk-go-v2/config v1.27.7 github.com/aws/aws-sdk-go-v2/credentials v1.17.7 - github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 diff --git a/go.sum b/go.sum index d486195878..606dd2ccd1 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftO github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 h1:4t+QEX7BsXz98W8W1lNvMAG+NX8qHz2CjLBxQKku40g= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A= -github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0 h1:k7gL76sSR0e2pLphjfmjD/+pDDtoOHvWp8ezpTsdyes= -github.com/aws/aws-sdk-go-v2/service/s3 v1.52.0/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 h1:Y/TTvxMdYwNvhzolvneV1wEEN/ncQUSd1AnzFGTMPqM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= From 902a0762e312bad3ff7d58d634988de838bdb587 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 Mar 2024 23:30:30 +0000 Subject: [PATCH 202/264] add CHANGELOG for #3190 --- .changelog/3190.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3190.txt diff --git a/.changelog/3190.txt b/.changelog/3190.txt new file mode 100644 index 0000000000..e17442c16a --- /dev/null +++ b/.changelog/3190.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.0 to 1.52.1 +``` From d36ec7a59d7f6f4ac1faeadfd83fd116a9feece9 Mon Sep 17 00:00:00 2001 From: Michael Barrientos Date: Sat, 16 Mar 2024 10:39:17 -0700 Subject: [PATCH 203/264] Fix import for cloudflare_list_item --- .changelog/3191.txt | 3 +++ internal/framework/service/list_item/resource.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/3191.txt diff --git a/.changelog/3191.txt b/.changelog/3191.txt new file mode 100644 index 0000000000..a292e455bf --- /dev/null +++ b/.changelog/3191.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_list_item: fix id parsing for imports +``` diff --git a/internal/framework/service/list_item/resource.go b/internal/framework/service/list_item/resource.go index c51e01ab9c..0e9f374a21 100644 --- a/internal/framework/service/list_item/resource.go +++ b/internal/framework/service/list_item/resource.go @@ -135,7 +135,7 @@ func (r *ListItemResource) Delete(ctx context.Context, req resource.DeleteReques func (r *ListItemResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { idparts := strings.Split(req.ID, "/") - if len(idparts) != 2 { + if len(idparts) != 3 { resp.Diagnostics.AddError("error importing list item ", "invalid ID specified. Please specify the ID as \"accountID/listID/itemID\"") return } From cc9e348cf3f62401928efd377948a927bf26ae42 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Sun, 17 Mar 2024 01:01:25 +0000 Subject: [PATCH 204/264] Add WfP namespace resource --- .../cloudflare_worker_script/resource.tf | 8 - .../import.sh | 1 + .../resource.tf | 12 ++ internal/framework/provider/provider.go | 2 + .../service/workers_for_platforms/model.go | 9 ++ .../service/workers_for_platforms/resource.go | 134 ++++++++++++++++ .../workers_for_platforms/resource_test.go | 144 ++++++++++++++++++ .../service/workers_for_platforms/schema.go | 42 +++++ 8 files changed, 344 insertions(+), 8 deletions(-) create mode 100644 examples/resources/cloudflare_workers_for_platforms_namespace/import.sh create mode 100644 examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf create mode 100644 internal/framework/service/workers_for_platforms/model.go create mode 100644 internal/framework/service/workers_for_platforms/resource.go create mode 100644 internal/framework/service/workers_for_platforms/resource_test.go create mode 100644 internal/framework/service/workers_for_platforms/schema.go diff --git a/examples/resources/cloudflare_worker_script/resource.tf b/examples/resources/cloudflare_worker_script/resource.tf index 12a39f56c9..492e2b871a 100644 --- a/examples/resources/cloudflare_worker_script/resource.tf +++ b/examples/resources/cloudflare_worker_script/resource.tf @@ -45,11 +45,3 @@ resource "cloudflare_worker_script" "my_script" { dataset = "dataset1" } } - -resource "cloudflare_worker_script" "wfp_user_worker" { - account_id = "f037e56e89293a057740de681ac9abbe" - name = "customer-worker-1" - content = file("script.js") - dispatch_namespace = "my-namespace" - tags = ["free"] -} diff --git a/examples/resources/cloudflare_workers_for_platforms_namespace/import.sh b/examples/resources/cloudflare_workers_for_platforms_namespace/import.sh new file mode 100644 index 0000000000..923ca2329c --- /dev/null +++ b/examples/resources/cloudflare_workers_for_platforms_namespace/import.sh @@ -0,0 +1 @@ +$ terraform import cloudflare_workers_for_platforms_namespace.example / diff --git a/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf b/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf new file mode 100644 index 0000000000..bec5172052 --- /dev/null +++ b/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf @@ -0,0 +1,12 @@ +resource "cloudflare_workers_for_platforms_namespace" "my_namespace" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "example-namespace" +} + +resource "cloudflare_worker_script" "customer_worker_1" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "customer-worker-1" + content = file("script.js") + dispatch_namespace = "example-namespace" + tags = ["free"] +} diff --git a/internal/framework/provider/provider.go b/internal/framework/provider/provider.go index 5095fdc13b..3594ac7bcc 100644 --- a/internal/framework/provider/provider.go +++ b/internal/framework/provider/provider.go @@ -24,6 +24,7 @@ import ( "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/turnstile" "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/user" + "github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/workers_for_platforms" "github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider" "github.com/cloudflare/terraform-provider-cloudflare/internal/utils" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" @@ -342,6 +343,7 @@ func (p *CloudflareProvider) Resources(ctx context.Context) []func() resource.Re rulesets.NewResource, turnstile.NewResource, access_mutual_tls_hostname_settings.NewResource, + workers_for_platforms.NewResource, } } diff --git a/internal/framework/service/workers_for_platforms/model.go b/internal/framework/service/workers_for_platforms/model.go new file mode 100644 index 0000000000..27175eac24 --- /dev/null +++ b/internal/framework/service/workers_for_platforms/model.go @@ -0,0 +1,9 @@ +package workers_for_platforms + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type WorkersForPlatformsNamespaceModel struct { + AccountID types.String `tfsdk:"account_id"` + Name types.String `tfsdk:"name"` + ID types.String `tfsdk:"id"` +} diff --git a/internal/framework/service/workers_for_platforms/resource.go b/internal/framework/service/workers_for_platforms/resource.go new file mode 100644 index 0000000000..f540487584 --- /dev/null +++ b/internal/framework/service/workers_for_platforms/resource.go @@ -0,0 +1,134 @@ +package workers_for_platforms + +import ( + "context" + "fmt" + "strings" + + "github.com/cloudflare/cloudflare-go" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +// Ensure provider defined types fully satisfy framework interfaces. +var _ resource.Resource = &WorkersForPlatformsResource{} +var _ resource.ResourceWithImportState = &WorkersForPlatformsResource{} + +func NewResource() resource.Resource { + return &WorkersForPlatformsResource{} +} + +// WorkersForPlatformsResource defines the resource implementation. +type WorkersForPlatformsResource struct { + client *cloudflare.API +} + +func (r *WorkersForPlatformsResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_workers_for_platforms_namespace" +} + +func (r *WorkersForPlatformsResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*cloudflare.API) + + if !ok { + resp.Diagnostics.AddError( + "unexpected resource configure type", + fmt.Sprintf("Expected *cloudflare.API, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + + return + } + + r.client = client +} + +func (r *WorkersForPlatformsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *WorkersForPlatformsNamespaceModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + namespace, err := r.client.CreateWorkersForPlatformsDispatchNamespace(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), + cloudflare.CreateWorkersForPlatformsDispatchNamespaceParams{ + Name: data.Name.ValueString(), + }, + ) + if err != nil { + resp.Diagnostics.AddError("failed to create Workers for Platforms namespace", err.Error()) + return + } + data.ID = types.StringValue(namespace.Result.NamespaceName) + data.Name = types.StringValue(namespace.Result.NamespaceName) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *WorkersForPlatformsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *WorkersForPlatformsNamespaceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + namespace, err := r.client.GetWorkersForPlatformsDispatchNamespace(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), data.ID.ValueString()) + if err != nil { + resp.Diagnostics.AddError("failed reading Workers for Platforms namespace", err.Error()) + return + } + data.ID = types.StringValue(namespace.Result.NamespaceName) + data.Name = types.StringValue(namespace.Result.NamespaceName) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *WorkersForPlatformsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *WorkersForPlatformsNamespaceModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.AddError("failed to update Workers for Platforms namespace", "Not implemented") +} + +func (r *WorkersForPlatformsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *WorkersForPlatformsNamespaceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + err := r.client.DeleteWorkersForPlatformsDispatchNamespace(ctx, cloudflare.AccountIdentifier(data.AccountID.ValueString()), data.Name.ValueString()) + + if err != nil { + resp.Diagnostics.AddError("failed to delete Workers for Platforms namespace", err.Error()) + return + } +} + +func (r *WorkersForPlatformsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + idparts := strings.Split(req.ID, "/") + if len(idparts) != 2 { + resp.Diagnostics.AddError("error importing Workers for Platforms namespace", "invalid ID specified. Please specify the ID as \"account_id/name\"") + return + } + resp.Diagnostics.Append(resp.State.SetAttribute( + ctx, path.Root("account_id"), idparts[0], + )...) + // TODO: Figure out if I can set name here, ID is a UUID and isn't one we really display/use user-facing wise + resp.Diagnostics.Append(resp.State.SetAttribute( + ctx, path.Root("id"), idparts[1], + )...) +} diff --git a/internal/framework/service/workers_for_platforms/resource_test.go b/internal/framework/service/workers_for_platforms/resource_test.go new file mode 100644 index 0000000000..e088787c54 --- /dev/null +++ b/internal/framework/service/workers_for_platforms/resource_test.go @@ -0,0 +1,144 @@ +package workers_for_platforms_test + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go" + "github.com/cloudflare/terraform-provider-cloudflare/internal/acctest" + "github.com/cloudflare/terraform-provider-cloudflare/internal/utils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func TestMain(m *testing.M) { + resource.TestMain(m) +} + +func init() { + resource.AddTestSweepers("cloudflare_workers_for_platforms_namespace", &resource.Sweeper{ + Name: "cloudflare_workers_for_platforms_namespace", + F: func(region string) error { + client, err := acctest.SharedClient() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + + if err != nil { + return fmt.Errorf("error establishing client: %w", err) + } + + ctx := context.Background() + resp, err := client.ListWorkersForPlatformsDispatchNamespaces(ctx, cloudflare.AccountIdentifier(accountID)) + if err != nil { + return err + } + + for _, namespace := range resp.Result { + err := client.DeleteWorkersForPlatformsDispatchNamespace(ctx, cloudflare.AccountIdentifier(accountID), namespace.NamespaceName) + if err != nil { + return err + } + } + + return nil + }, + }) +} + +func TestAccCloudflareWorkersForPlatforms_NamespaceManagement(t *testing.T) { + rnd := utils.GenerateRandomResourceName() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + resourceName := "cloudflare_workers_for_platforms_namespace." + rnd + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.TestAccPreCheck(t) }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccCheckCloudflareWorkersForPlatformsNamespaceManagement(rnd, accountID), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", rnd), + resource.TestCheckResourceAttrSet(resourceName, "id"), + ), + }, + { + ResourceName: resourceName, + ImportStateIdPrefix: fmt.Sprintf("%s/", accountID), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckCloudflareWorkersForPlatformsNamespaceManagement(rnd, accountID string) string { + return fmt.Sprintf(` + resource "cloudflare_workers_for_platforms_namespace" "%[1]s" { + account_id = "%[2]s" + name = "%[1]s" + }`, rnd, accountID) +} + +func TestAccCloudflareWorkersForPlatforms_UploadUserWorker(t *testing.T) { + rnd := utils.GenerateRandomResourceName() + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + resourceName := "cloudflare_workers_for_platforms_namespace." + rnd + workerResource := "cloudflare_worker_script.script_" + rnd + + scriptContent := `< Date: Sun, 17 Mar 2024 01:05:04 +0000 Subject: [PATCH 205/264] Docs and release note for wfp resource --- .changelog/3193.txt | 3 ++ .../workers_for_platforms_namespace.md | 48 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .changelog/3193.txt create mode 100644 docs/resources/workers_for_platforms_namespace.md diff --git a/.changelog/3193.txt b/.changelog/3193.txt new file mode 100644 index 0000000000..39fbec1581 --- /dev/null +++ b/.changelog/3193.txt @@ -0,0 +1,3 @@ +```release:new-resource +cloudflare_workers_for_platforms_namespace +``` \ No newline at end of file diff --git a/docs/resources/workers_for_platforms_namespace.md b/docs/resources/workers_for_platforms_namespace.md new file mode 100644 index 0000000000..a28a2600c7 --- /dev/null +++ b/docs/resources/workers_for_platforms_namespace.md @@ -0,0 +1,48 @@ +--- +page_title: "cloudflare_workers_for_platforms_namespace Resource - Cloudflare" +subcategory: "" +description: |- + The Workers for Platforms https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/ resource allows you + to manage Cloudflare Workers for Platforms namespaces. +--- + +# cloudflare_workers_for_platforms_namespace (Resource) + +The [Workers for Platforms](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/) resource allows you +to manage Cloudflare Workers for Platforms namespaces. + +## Example Usage + +```terraform +resource "cloudflare_workers_for_platforms_namespace" "my_namespace" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "example-namespace" +} + +resource "cloudflare_worker_script" "customer_worker_1" { + account_id = "f037e56e89293a057740de681ac9abbe" + name = "customer-worker-1" + content = file("script.js") + dispatch_namespace = "example-namespace" + tags = ["free"] +} +``` + +## Schema + +### Required + +- `account_id` (String) The account identifier to target for the resource. +- `name` (String) The name of the Workers for Platforms namespace. + +### Read-Only + +- `id` (String) The identifier of this resource. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import cloudflare_workers_for_platforms_namespace.example / +``` From 162a75997366ae90ab56c4a32b3171a4e0043bc1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 18 Mar 2024 00:49:47 +0000 Subject: [PATCH 206/264] Update CHANGELOG.md for #3190 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86880d4190..8ef5aa31d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.4 to 1.52.0 ([#3182](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3182)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.0 to 1.52.1 ([#3190](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3190)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) * provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools ([#3180](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3180)) From 3f3063020576140537f1b038de96622a7f6fe8fe Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 18 Mar 2024 01:51:49 +0000 Subject: [PATCH 207/264] Update CHANGELOG.md for #3183 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ef5aa31d8..98646ae0da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * resource/cloudflare_dlp_profile: Added support for `context_awareness` field to profiles ([#3158](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3158)) * resource/cloudflare_logpush_job: Add `output_options` parameter ([#3171](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3171)) +* resource/cloudflare_notification_policy: Implement the `airport_code` filter ([#3183](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3183)) * resource/cloudflare_worker_script: Add `dispatch_namespace` to support uploading to a Workers for Platforms namespace ([#3154](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3154)) * resource/cloudflare_worker_script: Add `tags` to support tagging Workers for Platforms Workers ([#3154](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3154)) From d9f23502e6428cafb26f6d81e4399c27d8bb5d31 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 18 Mar 2024 01:52:47 +0000 Subject: [PATCH 208/264] Update CHANGELOG.md for #3191 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98646ae0da..e17046e29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: BUG FIXES: * resource/cloudflare_access_application: Add Sensitive to oidc client_secret and preserve client_secret across apply ([#3168](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3168)) +* resource/cloudflare_list_item: fix id parsing for imports ([#3191](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3191)) * resource/cloudflare_logpush_job: only set the value in state when it is defined ([#3188](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3188)) DEPENDENCIES: From d7d65bd6d6142718f667bff3734359a1d0ddf7a7 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 18 Mar 2024 15:36:43 +1100 Subject: [PATCH 209/264] `make docs` --- docs/resources/workers_for_platforms_namespace.md | 12 ++++++------ .../resource.tf | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/resources/workers_for_platforms_namespace.md b/docs/resources/workers_for_platforms_namespace.md index a28a2600c7..976d2e9fdf 100644 --- a/docs/resources/workers_for_platforms_namespace.md +++ b/docs/resources/workers_for_platforms_namespace.md @@ -14,17 +14,17 @@ to manage Cloudflare Workers for Platforms namespaces. ## Example Usage ```terraform -resource "cloudflare_workers_for_platforms_namespace" "my_namespace" { +resource "cloudflare_workers_for_platforms_namespace" "example" { account_id = "f037e56e89293a057740de681ac9abbe" name = "example-namespace" } resource "cloudflare_worker_script" "customer_worker_1" { - account_id = "f037e56e89293a057740de681ac9abbe" - name = "customer-worker-1" - content = file("script.js") - dispatch_namespace = "example-namespace" - tags = ["free"] + account_id = "f037e56e89293a057740de681ac9abbe" + name = "customer-worker-1" + content = file("script.js") + dispatch_namespace = cloudflare_workers_for_platforms_namespace.example.name + tags = ["free"] } ``` diff --git a/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf b/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf index bec5172052..8317c22eac 100644 --- a/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf +++ b/examples/resources/cloudflare_workers_for_platforms_namespace/resource.tf @@ -1,12 +1,12 @@ -resource "cloudflare_workers_for_platforms_namespace" "my_namespace" { +resource "cloudflare_workers_for_platforms_namespace" "example" { account_id = "f037e56e89293a057740de681ac9abbe" name = "example-namespace" } resource "cloudflare_worker_script" "customer_worker_1" { - account_id = "f037e56e89293a057740de681ac9abbe" - name = "customer-worker-1" - content = file("script.js") - dispatch_namespace = "example-namespace" - tags = ["free"] + account_id = "f037e56e89293a057740de681ac9abbe" + name = "customer-worker-1" + content = file("script.js") + dispatch_namespace = cloudflare_workers_for_platforms_namespace.example.name + tags = ["free"] } From 310f22a1281d7bc55f0f67da9a345d35e6328830 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Mon, 18 Mar 2024 04:41:04 +0000 Subject: [PATCH 210/264] Remove old comment --- internal/framework/service/workers_for_platforms/resource.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/framework/service/workers_for_platforms/resource.go b/internal/framework/service/workers_for_platforms/resource.go index f540487584..cbfdf962bc 100644 --- a/internal/framework/service/workers_for_platforms/resource.go +++ b/internal/framework/service/workers_for_platforms/resource.go @@ -127,7 +127,6 @@ func (r *WorkersForPlatformsResource) ImportState(ctx context.Context, req resou resp.Diagnostics.Append(resp.State.SetAttribute( ctx, path.Root("account_id"), idparts[0], )...) - // TODO: Figure out if I can set name here, ID is a UUID and isn't one we really display/use user-facing wise resp.Diagnostics.Append(resp.State.SetAttribute( ctx, path.Root("id"), idparts[1], )...) From 944cc022bf3f24c9f15405e2c38e006f9c112a07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:15:54 +0000 Subject: [PATCH 211/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.25.3 to 1.26.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.25.3...v1.26.0) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.7 to 1.27.8 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.7...config/v1.27.8) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.7 to 1.17.8 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.8/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.7...v1.17.8) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.1 to 1.53.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.52.1...service/s3/v1.53.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 28 ++++++++++++++-------------- go.sum | 56 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 3ebcaaf449..2304174799 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.25.3 - github.com/aws/aws-sdk-go-v2/config v1.27.7 - github.com/aws/aws-sdk-go-v2/credentials v1.17.7 - github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 + github.com/aws/aws-sdk-go-v2 v1.26.0 + github.com/aws/aws-sdk-go-v2/config v1.27.8 + github.com/aws/aws-sdk-go-v2/credentials v1.17.8 + github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -51,18 +51,18 @@ require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 606dd2ccd1..e8756f955d 100644 --- a/go.sum +++ b/go.sum @@ -11,40 +11,40 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.25.3 h1:xYiLpZTQs1mzvz5PaI6uR0Wh57ippuEthxS4iK5v0n0= -github.com/aws/aws-sdk-go-v2 v1.25.3/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= +github.com/aws/aws-sdk-go-v2 v1.26.0 h1:/Ce4OCiM3EkpW7Y+xUnfAFpchU78K7/Ug01sZni9PgA= +github.com/aws/aws-sdk-go-v2 v1.26.0/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.7 h1:JSfb5nOQF01iOgxFI5OIKWwDiEXWTyTgg1Mm1mHi0A4= -github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I= -github.com/aws/aws-sdk-go-v2/credentials v1.17.7 h1:WJd+ubWKoBeRh7A5iNMnxEOs982SyVKOJD+K8HIezu4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 h1:p+y7FvkK2dxS+FEwRIDHDe//ZX+jDhP8HHE50ppj4iI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 h1:ifbIbHZyGl1alsAhPIYsHOg5MuApgqOvVeI8wIugXfs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 h1:Qvodo9gHG9F3E8SfYOspPeBt0bjSbsevK8WhRAUHcoY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw= +github.com/aws/aws-sdk-go-v2/config v1.27.8 h1:0r8epOsiJ7YJz65MGcb8i91ehFp4kvvFe2qkq5oYeRI= +github.com/aws/aws-sdk-go-v2/config v1.27.8/go.mod h1:XsmYKxYNuIhLsFddpNds+j9H5XKzjWDdg/SZngiwFio= +github.com/aws/aws-sdk-go-v2/credentials v1.17.8 h1:WUdNLXbyNbU07V/WFrSOBXqZTDgmmMNMgUFzpYOKJhw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.8/go.mod h1:iPZzLpaBIfhyvVS/XGD3JvR1GP3YdHTqpySKDlqkfs8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4 h1:S+L2QSKhUuShih3aq9P/mkzDBiOO5tTyVg+vXREfsfg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4/go.mod h1:nQ3how7DMnFMWiU1SpECohgC82fpn4cKZ875NDMmwtA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 h1:0ScVK/4qZ8CIW0k8jOeFVsyS/sAiXpYxRBLolMkuLQM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4/go.mod h1:84KyjNZdHC6QZW08nfHI6yZgPd+qRgaWcYsyLUo3QY8= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 h1:sHmMWWX5E7guWEFQ9SVo6A3S4xpPrWnd77a6y4WM6PU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4/go.mod h1:WjpDrhWisWOIoS9n3nk67A3Ll1vfULJ9Kq6h29HTD48= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 h1:mDnFOE2sVkyphMWtTH+stv0eW3k0OTx94K63xpxHty4= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3/go.mod h1:V8MuRVcCRt5h1S+Fwu8KbC7l/gBGo3yBAyUbJM2IJOk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4 h1:SIkD6T4zGQ+1YIit22wi37CGNkrE7mXV1vNA5VpI3TI= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4/go.mod h1:XfeqbsG0HNedNs0GT+ju4Bs+pFAwsrlzcRdMvdNVf5s= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 h1:mbWNpfRUTT6bnacmvOTKXZjR/HycibdWzNpfbrbLDIs= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5/go.mod h1:FCOPWGjsshkkICJIn9hq9xr6dLKtyaWpuUojiN3W1/8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftOlX+oGgWGIa3jDyYLDNsdVhsjHmsBH2GLAQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 h1:4t+QEX7BsXz98W8W1lNvMAG+NX8qHz2CjLBxQKku40g= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A= -github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1 h1:Y/TTvxMdYwNvhzolvneV1wEEN/ncQUSd1AnzFGTMPqM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.52.1/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 h1:Ppup1nVNAOWbBOrcoOxaxPeEnSFB2RnnQdguhXpmeQk= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6 h1:NkHCgg0Ck86c5PTOzBZ0JRccI51suJDg5lgFtxBu1ek= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6/go.mod h1:mjTpxjC8v4SeINTngrnKFgm2QUi+Jm+etTbCxh8W4uU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 h1:b+E7zIUHMmcB4Dckjpkapoy47W6C9QBv/zoUP+Hn8Kc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6/go.mod h1:S2fNV0rxrP78NhPbCZeQgY8H9jdDMeGtwcfZIRxzBqU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4 h1:uDj2K47EM1reAYU9jVlQ1M5YENI1u6a/TxJpf6AeOLA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4/go.mod h1:XKCODf4RKHppc96c2EZBGV/oCUC7OClxAo2MEyg4pIk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 h1:r3o2YsgW9zRcIP3Q0WCmttFVhTuugeKIvT5z9xDspc0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0/go.mod h1:w2E4f8PUfNtyjfL6Iu+mWI96FGttE03z3UdNcUEC4tA= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 h1:mnbuWHOcM70/OFUlZZ5rcdfA8PflGXXiefU/O+1S3+8= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.3/go.mod h1:5HFu51Elk+4oRBZVxmHrSds5jFXmFj8C3w7DVF2gnrs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 h1:uLq0BKatTmDzWa/Nu4WO0M1AaQDaPpwTKAeByEc6WFM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3/go.mod h1:b+qdhjnxj8GSR6t5YfphOffeoQSQ1KmpoVVuBn+PWxs= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 h1:J/PpTf/hllOjx8Xu9DMflff3FajfLxqM5+tepvVXmxg= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.5/go.mod h1:0ih0Z83YDH/QeQ6Ori2yGE2XvWYv/Xm+cZc01LC6oK0= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= From 3f6ac7f0f2378ff8e9bd93e06047aa201c2483ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 18 Mar 2024 23:16:11 +0000 Subject: [PATCH 212/264] add CHANGELOG for #3197 --- .changelog/3197.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .changelog/3197.txt diff --git a/.changelog/3197.txt b/.changelog/3197.txt new file mode 100644 index 0000000000..8bffdb18c4 --- /dev/null +++ b/.changelog/3197.txt @@ -0,0 +1,15 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.3 to 1.26.0 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.7 to 1.27.8 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.7 to 1.17.8 +``` +```release-note:dependency +provider:
  • Documentation: bump description for property
  • +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.1 to 1.53.0 +``` From c4e90423d4e53b8708510e831ba9783682f1cfaa Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 19 Mar 2024 11:11:28 +1100 Subject: [PATCH 213/264] Update 3197.txt --- .changelog/3197.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/.changelog/3197.txt b/.changelog/3197.txt index 8bffdb18c4..9b7f455f54 100644 --- a/.changelog/3197.txt +++ b/.changelog/3197.txt @@ -8,8 +8,5 @@ provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.7 to 1.27.8 provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.7 to 1.17.8 ``` ```release-note:dependency -provider:
  • Documentation: bump description for property
  • -``` -```release-note:dependency provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.1 to 1.53.0 ``` From 9c52c21c63893465aeaf7cd9d72944b41995d560 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 19 Mar 2024 00:12:13 +0000 Subject: [PATCH 214/264] Update CHANGELOG.md for #3197 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e17046e29e..bd9b6ceb9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,11 +22,15 @@ BUG FIXES: DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.6 to 1.27.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.7 to 1.27.8 ([#3197](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3197)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.6 to 1.17.7 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.7 to 1.17.8 ([#3197](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3197)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.3 to 1.51.4 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.51.4 to 1.52.0 ([#3182](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3182)) * provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.0 to 1.52.1 ([#3190](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3190)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.52.1 to 1.53.0 ([#3197](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3197)) * provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.2 to 1.25.3 ([#3172](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3172)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.25.3 to 1.26.0 ([#3197](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3197)) * provider: bump github.com/cloudflare/cloudflare-go from 0.89.0 to 0.90.0 ([#3178](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3178)) * provider: bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /tools ([#3180](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3180)) * provider: bump google.golang.org/protobuf from 1.32.0 to 1.33.0 ([#3181](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3181)) From 776d8d776397080ff17a48b4dcb6bd8d366afaaa Mon Sep 17 00:00:00 2001 From: Russell Kerns Date: Thu, 14 Mar 2024 12:45:01 -0500 Subject: [PATCH 215/264] AUTH-5974 added saml_attribute_transform_jsonata --- .changelog/3187.txt | 3 +++ ...urce_cloudflare_access_application_test.go | 4 +++ .../schema_cloudflare_access_application.go | 25 +++++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .changelog/3187.txt diff --git a/.changelog/3187.txt b/.changelog/3187.txt new file mode 100644 index 0000000000..bf931c21a8 --- /dev/null +++ b/.changelog/3187.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_access_application: adds saml_attribute_transform_jsonata` to SaaS applications +``` \ No newline at end of file diff --git a/internal/sdkv2provider/resource_cloudflare_access_application_test.go b/internal/sdkv2provider/resource_cloudflare_access_application_test.go index 4789ee2ff5..e95985e3b5 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_application_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_application_test.go @@ -189,6 +189,7 @@ func TestAccCloudflareAccessApplication_WithSAMLSaas(t *testing.T) { resource.TestCheckResourceAttr(name, "saas_app.0.name_id_format", "email"), resource.TestCheckResourceAttr(name, "saas_app.0.default_relay_state", "https://saas-app.example"), resource.TestCheckResourceAttr(name, "saas_app.0.name_id_transform_jsonata", "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"), + resource.TestCheckResourceAttr(name, "saas_app.0.saml_attribute_transform_jsonata", "$ ~>| groups | {'group_name': name} |"), resource.TestCheckResourceAttrSet(name, "saas_app.0.idp_entity_id"), resource.TestCheckResourceAttrSet(name, "saas_app.0.public_key"), @@ -225,6 +226,7 @@ func TestAccCloudflareAccessApplication_WithSAMLSaas_Import(t *testing.T) { resource.TestCheckResourceAttr(name, "saas_app.0.name_id_format", "email"), resource.TestCheckResourceAttr(name, "saas_app.0.default_relay_state", "https://saas-app.example"), resource.TestCheckResourceAttr(name, "saas_app.0.name_id_transform_jsonata", "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"), + resource.TestCheckResourceAttr(name, "saas_app.0.saml_attribute_transform_jsonata", "$ ~>| groups | {'group_name': name} |"), resource.TestCheckResourceAttr(name, "saas_app.0.custom_attribute.#", "2"), resource.TestCheckResourceAttr(name, "saas_app.0.custom_attribute.0.name", "email"), @@ -771,6 +773,8 @@ resource "cloudflare_access_application" "%[1]s" { name_id_format = "email" default_relay_state = "https://saas-app.example" name_id_transform_jsonata = "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')" + saml_attribute_transform_jsonata = "$ ~>| groups | {'group_name': name} |" + custom_attribute { name = "email" name_format = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 7c53630759..72ca6031c0 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -4,8 +4,6 @@ import ( "fmt" "time" - "github.com/cloudflare/cloudflare-go" - "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -292,6 +290,11 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { Optional: true, Description: "A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting.", }, + "saml_attribute_transform_jsonata": { + Type: schema.TypeString, + Optional: true, + Description: "A [JSONata] (https://jsonata.org/) expression that transforms an application's user identities into attribute assertions in the SAML response. The expression can transform id, email, name, and groups values. It can also transform fields listed in the saml_attributes or oidc_fields of the identity provider used to authenticate. The output of this expression must be a JSON object.", + }, }, }, }, @@ -572,6 +575,7 @@ func convertSaasSchemaToStruct(d *schema.ResourceData) *cloudflare.SaasApplicati SaasConfig.NameIDFormat = d.Get("saas_app.0.name_id_format").(string) SaasConfig.DefaultRelayState = d.Get("saas_app.0.default_relay_state").(string) SaasConfig.NameIDTransformJsonata = d.Get("saas_app.0.name_id_transform_jsonata").(string) + SaasConfig.SamlAttributeTransformJsonata = d.Get("saas_app.0.saml_attribute_transform_jsonata").(string) customAttributes, _ := d.Get("saas_app.0.custom_attribute").([]interface{}) for _, customAttributes := range customAttributes { @@ -692,14 +696,15 @@ func convertSaasStructToSchema(d *schema.ResourceData, app *cloudflare.SaasAppli return []interface{}{m} } else { m := map[string]interface{}{ - "sp_entity_id": app.SPEntityID, - "consumer_service_url": app.ConsumerServiceUrl, - "name_id_format": app.NameIDFormat, - "idp_entity_id": app.IDPEntityID, - "public_key": app.PublicKey, - "sso_endpoint": app.SSOEndpoint, - "default_relay_state": app.DefaultRelayState, - "name_id_transform_jsonata": app.NameIDTransformJsonata, + "sp_entity_id": app.SPEntityID, + "consumer_service_url": app.ConsumerServiceUrl, + "name_id_format": app.NameIDFormat, + "idp_entity_id": app.IDPEntityID, + "public_key": app.PublicKey, + "sso_endpoint": app.SSOEndpoint, + "default_relay_state": app.DefaultRelayState, + "name_id_transform_jsonata": app.NameIDTransformJsonata, + "saml_attribute_transform_jsonata": app.SamlAttributeTransformJsonata, } var customAttributes []interface{} From 8eff945118c6593daf3eb2a336c5d455672de4dc Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 20 Mar 2024 14:32:22 +1100 Subject: [PATCH 216/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9b6ceb9f..fbab415b75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.27.0 (Unreleased) +## 4.28.0 (Unreleased) + +## 4.27.0 (March 20th, 2024) FEATURES: From 308dc8c5224d20b77d3310bda0e7e4a449fbed63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 23:36:18 +0000 Subject: [PATCH 217/264] build(deps): bump the aws group with 2 updates Bumps the aws group with 2 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.8 to 1.27.9 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.8...config/v1.27.9) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.8 to 1.17.9 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.8...config/v1.17.9) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2304174799..b6de8fb067 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.26.0 - github.com/aws/aws-sdk-go-v2/config v1.27.8 - github.com/aws/aws-sdk-go-v2/credentials v1.17.8 + github.com/aws/aws-sdk-go-v2/config v1.27.9 + github.com/aws/aws-sdk-go-v2/credentials v1.17.9 github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 @@ -51,7 +51,7 @@ require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect diff --git a/go.sum b/go.sum index e8756f955d..4a16c62493 100644 --- a/go.sum +++ b/go.sum @@ -15,12 +15,12 @@ github.com/aws/aws-sdk-go-v2 v1.26.0 h1:/Ce4OCiM3EkpW7Y+xUnfAFpchU78K7/Ug01sZni9 github.com/aws/aws-sdk-go-v2 v1.26.0/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.8 h1:0r8epOsiJ7YJz65MGcb8i91ehFp4kvvFe2qkq5oYeRI= -github.com/aws/aws-sdk-go-v2/config v1.27.8/go.mod h1:XsmYKxYNuIhLsFddpNds+j9H5XKzjWDdg/SZngiwFio= -github.com/aws/aws-sdk-go-v2/credentials v1.17.8 h1:WUdNLXbyNbU07V/WFrSOBXqZTDgmmMNMgUFzpYOKJhw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.8/go.mod h1:iPZzLpaBIfhyvVS/XGD3JvR1GP3YdHTqpySKDlqkfs8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4 h1:S+L2QSKhUuShih3aq9P/mkzDBiOO5tTyVg+vXREfsfg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.4/go.mod h1:nQ3how7DMnFMWiU1SpECohgC82fpn4cKZ875NDMmwtA= +github.com/aws/aws-sdk-go-v2/config v1.27.9 h1:gRx/NwpNEFSk+yQlgmk1bmxxvQ5TyJ76CWXs9XScTqg= +github.com/aws/aws-sdk-go-v2/config v1.27.9/go.mod h1:dK1FQfpwpql83kbD873E9vz4FyAxuJtR22wzoXn3qq0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.9 h1:N8s0/7yW+h8qR8WaRlPQeJ6czVMNQVNtNdUqf6cItao= +github.com/aws/aws-sdk-go-v2/credentials v1.17.9/go.mod h1:446YhIdmSV0Jf/SLafGZalQo+xr2iw7/fzXGDPTU1yQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 h1:af5YzcLf80tv4Em4jWVD75lpnOHSBkPUZxZfGkrI3HI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0/go.mod h1:nQ3how7DMnFMWiU1SpECohgC82fpn4cKZ875NDMmwtA= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 h1:0ScVK/4qZ8CIW0k8jOeFVsyS/sAiXpYxRBLolMkuLQM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4/go.mod h1:84KyjNZdHC6QZW08nfHI6yZgPd+qRgaWcYsyLUo3QY8= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 h1:sHmMWWX5E7guWEFQ9SVo6A3S4xpPrWnd77a6y4WM6PU= From ae76bd5e252b724e3c8281e2d9e4e3435054a71e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 23:36:24 +0000 Subject: [PATCH 218/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.90.0 to 0.91.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.90.0...v0.91.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2304174799..b67d724def 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.90.0 + github.com/cloudflare/cloudflare-go v0.91.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index e8756f955d..d32975e529 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.90.0 h1:hFfZNPEd9FFh6AJCxSiYwNXwHIkoSWCB5Iuc8J0o7s8= -github.com/cloudflare/cloudflare-go v0.90.0/go.mod h1:nUqvBUUDRxNzsDSQjbqUNWHEIYAoUlgRmcAzMKlFdKs= +github.com/cloudflare/cloudflare-go v0.91.0 h1:L7IR+86qrZuEMSjGFg4cwRwtHqC8uCPmMUkP7BD4CPw= +github.com/cloudflare/cloudflare-go v0.91.0/go.mod h1:nUqvBUUDRxNzsDSQjbqUNWHEIYAoUlgRmcAzMKlFdKs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= From 287e6ae99de10e3f54dc3621b2b081c79a420ed0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Mar 2024 23:36:30 +0000 Subject: [PATCH 219/264] add CHANGELOG for #3207 --- .changelog/3207.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changelog/3207.txt diff --git a/.changelog/3207.txt b/.changelog/3207.txt new file mode 100644 index 0000000000..59df55111b --- /dev/null +++ b/.changelog/3207.txt @@ -0,0 +1,6 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.8 to 1.27.9 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.8 to 1.17.9 +``` From 601711857d249ff5ab92015e27a2fa5c34cec4ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Mar 2024 23:36:36 +0000 Subject: [PATCH 220/264] add CHANGELOG for #3208 --- .changelog/3208.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3208.txt diff --git a/.changelog/3208.txt b/.changelog/3208.txt new file mode 100644 index 0000000000..28b2112491 --- /dev/null +++ b/.changelog/3208.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.90.0 to 0.91.0 +``` From 815609ac0066cad5c45600d5e5ed6699e8c08396 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 21 Mar 2024 23:42:37 +0000 Subject: [PATCH 221/264] Update CHANGELOG.md for #3207 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbab415b75..049a9c177a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## 4.28.0 (Unreleased) +DEPENDENCIES: + +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.8 to 1.27.9 ([#3207](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3207)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.8 to 1.17.9 ([#3207](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3207)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.90.0 to 0.91.0 ([#3208](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3208)) + ## 4.27.0 (March 20th, 2024) FEATURES: From 60e4c0f1a28ee231a5cefe7bd6ec1cd73b3f53a2 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 22 Mar 2024 10:49:23 +1100 Subject: [PATCH 222/264] keep cloudflare import --- internal/sdkv2provider/schema_cloudflare_access_application.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 72ca6031c0..01ab66c0f3 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" From 9ef79be1773e511f60efc35ad7d5d472daace54f Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 22 Mar 2024 11:02:18 +1100 Subject: [PATCH 223/264] `make docs` --- docs/resources/access_application.md | 1 + internal/sdkv2provider/schema_cloudflare_access_application.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/resources/access_application.md b/docs/resources/access_application.md index 0f07292e88..8133fb3f06 100644 --- a/docs/resources/access_application.md +++ b/docs/resources/access_application.md @@ -137,6 +137,7 @@ Optional: - `name_id_format` (String) The format of the name identifier sent to the SaaS application. - `name_id_transform_jsonata` (String) A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting. - `redirect_uris` (Set of String) The permitted URL's for Cloudflare to return Authorization codes and Access/ID tokens. +- `saml_attribute_transform_jsonata` (String) A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into attribute assertions in the SAML response. The expression can transform id, email, name, and groups values. It can also transform fields listed in the saml_attributes or oidc_fields of the identity provider used to authenticate. The output of this expression must be a JSON object. - `scopes` (Set of String) Define the user information shared with access. - `sp_entity_id` (String) A globally unique name for an identity or service provider. diff --git a/internal/sdkv2provider/schema_cloudflare_access_application.go b/internal/sdkv2provider/schema_cloudflare_access_application.go index 01ab66c0f3..f3e713ff3a 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_application.go +++ b/internal/sdkv2provider/schema_cloudflare_access_application.go @@ -294,7 +294,7 @@ func resourceCloudflareAccessApplicationSchema() map[string]*schema.Schema { "saml_attribute_transform_jsonata": { Type: schema.TypeString, Optional: true, - Description: "A [JSONata] (https://jsonata.org/) expression that transforms an application's user identities into attribute assertions in the SAML response. The expression can transform id, email, name, and groups values. It can also transform fields listed in the saml_attributes or oidc_fields of the identity provider used to authenticate. The output of this expression must be a JSON object.", + Description: "A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into attribute assertions in the SAML response. The expression can transform id, email, name, and groups values. It can also transform fields listed in the saml_attributes or oidc_fields of the identity provider used to authenticate. The output of this expression must be a JSON object.", }, }, }, From e5077273dd9d63bb2c8532accaddebc0e1ccddee Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 25 Mar 2024 11:14:00 +1100 Subject: [PATCH 224/264] remove feature request issue type need to use support or account team for submitting these now --- .github/ISSUE_TEMPLATE/feature_request.yml | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 38e96420e5..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: "\U0001F680 Feature request" -description: "Suggest a new feature or other enhancement" -labels: ["kind/enhancement", "needs-triage"] -body: -- type: markdown - attributes: - value: | - Thank you for opening an issue. Please note that we try to keep the - Terraform issue tracker reserved for bug reports and feature requests. - For general usage questions, please see: https://www.terraform.io/community.html. -- type: textarea - attributes: - label: Current Terraform and Cloudflare provider version - description: | - Run `terraform -v` to show the version, and include the output below. - This will record which version was current at the time of your feature request, - to help manage the request backlog. - - If you're not using the latest version, please check to see if something related - to your request has already been implemented in a later version. - validations: - required: true -- type: textarea - attributes: - label: Description - description: Provide a quick (or expanded!) overview of the proposed change. - validations: - required: true -- type: textarea - attributes: - label: Use cases - description: | - In order to properly evaluate a feature request, it is necessary to understand - the use-cases for it. Please describe below the _end goal_ you are trying - to achieve that has led you to request this feature. - - Please keep this section focused on the problem and not on the suggested - solution. We'll get to that in a moment, below! - validations: - required: true -- type: textarea - attributes: - label: Potential Terraform configuration - description: Show how you think this should work and interact. - value: | - ```hcl - ... - ``` - validations: - required: true -- type: textarea - attributes: - label: References - description: | - Are there any other GitHub issues, whether open or closed, that are related to - the problem you've described above or to the suggested solution? If so, please - create a list below that mentions each of them. - validations: - required: false From f7c33925f04bfafe1f3e836f7e5bb339a0769e74 Mon Sep 17 00:00:00 2001 From: docsbot Date: Mon, 25 Mar 2024 15:25:21 +0000 Subject: [PATCH 225/264] build registry documentation --- docs/resources/hyperdrive_config.md | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/docs/resources/hyperdrive_config.md b/docs/resources/hyperdrive_config.md index 3f451a4dfe..fd50dd894e 100644 --- a/docs/resources/hyperdrive_config.md +++ b/docs/resources/hyperdrive_config.md @@ -12,11 +12,10 @@ The [Hyperdrive Config](https://developers.cloudflare.com/hyperdrive/) resource ## Example Usage ```terraform -# Config using all default values resource "cloudflare_hyperdrive_config" "no_defaults" { account_id = "f037e56e89293a057740de681ac9abbe" name = "my-hyperdrive-config" - origin = { + origin = { database = "postgres" password = "my-password" host = "my-database.example.com" @@ -25,23 +24,6 @@ resource "cloudflare_hyperdrive_config" "no_defaults" { user = "my-user" } } - -# Config not using any default values -resource "cloudflare_hyperdrive_config" "no_defaults" { - account_id = "f037e56e89293a057740de681ac9abbe" - name = "my-hyperdrive-config" - origin = { - database = "postgres" - password = "my-password" - host = "my-database.example.com" - port = 5432 - scheme = "postgres" - user = "my-user" - } - caching = { - disabled = false - } -} ``` ## Schema From 6f0ba6d91a2aa61d1b4332289e5940a728edb591 Mon Sep 17 00:00:00 2001 From: Justin Lu Date: Mon, 25 Mar 2024 08:35:16 -0700 Subject: [PATCH 226/264] Update support for crowdstrike_s2s posture rule --- .changelog/3216.txt | 3 +++ docs/resources/device_posture_rule.md | 2 ++ .../resource_cloudflare_device_posture_rule.go | 6 ++++++ .../schema_cloudflare_device_posture_rule.go | 11 +++++++++++ 4 files changed, 22 insertions(+) create mode 100644 .changelog/3216.txt diff --git a/.changelog/3216.txt b/.changelog/3216.txt new file mode 100644 index 0000000000..52bc4156e9 --- /dev/null +++ b/.changelog/3216.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_device_posture_rule: update support for new fields for crowdstrike_s2s posture rule. +``` \ No newline at end of file diff --git a/docs/resources/device_posture_rule.md b/docs/resources/device_posture_rule.md index a015d8d8ae..0e24c83a39 100644 --- a/docs/resources/device_posture_rule.md +++ b/docs/resources/device_posture_rule.md @@ -74,6 +74,7 @@ Optional: - `infected` (Boolean) True if SentinelOne device is infected. - `is_active` (Boolean) True if SentinelOne device is active. - `issue_count` (String) The number of issues for kolide. +- `last_seen` (String) The duration of time that the host was last seen from Crowdstrike. Must be in the format `1h` or `30m`. Valid units are `d`, `h` and `m`. - `network_status` (String) The network status from SentinelOne. Available values: `connected`, `disconnected`, `disconnecting`, `connecting`. - `operator` (String) The version comparison operator. Available values: `>`, `>=`, `<`, `<=`, `==`. - `os` (String) OS signal score from Crowdstrike. Value must be between 1 and 100. @@ -86,6 +87,7 @@ Optional: - `running` (Boolean) Checks if the application should be running. - `sensor_config` (String) Sensor signal score from Crowdstrike. Value must be between 1 and 100. - `sha256` (String) The sha256 hash of the file. +- `state` (String) The host’s current online status from Crowdstrike. Available values: `online`, `offline`, `unknown`. - `thumbprint` (String) The thumbprint of the file certificate. - `total_score` (Number) The total score from Tanium. - `version` (String) The operating system semantic version. diff --git a/internal/sdkv2provider/resource_cloudflare_device_posture_rule.go b/internal/sdkv2provider/resource_cloudflare_device_posture_rule.go index f31b997936..46910f4af4 100644 --- a/internal/sdkv2provider/resource_cloudflare_device_posture_rule.go +++ b/internal/sdkv2provider/resource_cloudflare_device_posture_rule.go @@ -222,6 +222,12 @@ func setDevicePostureRuleInput(rule *cloudflare.DevicePostureRule, d *schema.Res if versionOperator, ok := d.GetOk("input.0.version_operator"); ok { input.VersionOperator = versionOperator.(string) } + if state, ok := d.GetOk("input.0.state"); ok { + input.State = state.(string) + } + if last_seen, ok := d.GetOk("input.0.last_seen"); ok { + input.LastSeen = last_seen.(string) + } if countOperator, ok := d.GetOk("input.0.count_operator"); ok { input.CountOperator = countOperator.(string) } diff --git a/internal/sdkv2provider/schema_cloudflare_device_posture_rule.go b/internal/sdkv2provider/schema_cloudflare_device_posture_rule.go index 5cb52b2a8e..2d014f1b9a 100644 --- a/internal/sdkv2provider/schema_cloudflare_device_posture_rule.go +++ b/internal/sdkv2provider/schema_cloudflare_device_posture_rule.go @@ -175,6 +175,17 @@ func resourceCloudflareDevicePostureRuleSchema() map[string]*schema.Schema { ValidateFunc: validation.StringInSlice([]string{">", ">=", "<", "<=", "=="}, true), Description: fmt.Sprintf("The version comparison operator for crowdstrike. %s", renderAvailableDocumentationValuesStringSlice([]string{">", ">=", "<", "<=", "=="})), }, + "last_seen": { + Type: schema.TypeString, + Optional: true, + Description: "The duration of time that the host was last seen from Crowdstrike. Must be in the format `1h` or `30m`. Valid units are `d`, `h` and `m`.", + }, + "state": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"online", "offline", "unknown"}, true), + Description: fmt.Sprintf("The host’s current online status from Crowdstrike. %s", renderAvailableDocumentationValuesStringSlice([]string{"online", "offline", "unknown"})), + }, "count_operator": { Type: schema.TypeString, Optional: true, From 9de18b0776e6805b11334d2b621f545c2a5dbfee Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 26 Mar 2024 10:41:12 +1100 Subject: [PATCH 227/264] `make docs` --- docs/resources/ipsec_tunnel.md | 4 ++-- internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/resources/ipsec_tunnel.md b/docs/resources/ipsec_tunnel.md index 9ef60ddfd2..26c2477d1a 100644 --- a/docs/resources/ipsec_tunnel.md +++ b/docs/resources/ipsec_tunnel.md @@ -42,11 +42,11 @@ resource "cloudflare_ipsec_tunnel" "example" { - `allow_null_cipher` (Boolean) Specifies if this tunnel may use a null cipher (ENCR_NULL) in Phase 2. Defaults to `false`. - `description` (String) An optional description of the IPsec tunnel. - `fqdn_id` (String) `remote_id` in the form of a fqdn. This value is generated by cloudflare. +- `health_check_direction` (String) Specifies the direction for the health check. Available values: `unidirectional`, `bidirectional` Default: `unidirectional`. - `health_check_enabled` (Boolean) Specifies if ICMP tunnel health checks are enabled. Default: `true`. +- `health_check_rate` (String) Specifies the ICMP rate for the health check. Available values: `low`, `mid`, `high` Default: `mid`. - `health_check_target` (String) The IP address of the customer endpoint that will receive tunnel health checks. Default: ``. - `health_check_type` (String) Specifies the ICMP echo type for the health check (`request` or `reply`). Available values: `request`, `reply` Default: `reply`. -- `health_check_direction` (String) Specifies the direction for the health check (`unidirectional` or `bidirectional`). Available values: `unidirectional`, `bidirectional` Default: `unidirectional`. -- `health_check_rate` (String) Specifies the ICMP rate for the health check (`low`, `mid` or `high`). Available values: `low`, `mid`, `high` Default: `mid`. - `hex_id` (String) `remote_id` as a hex string. This value is generated by cloudflare. - `psk` (String, Sensitive) Pre shared key to be used with the IPsec tunnel. If left unset, it will be autogenerated. - `remote_id` (String) ID to be used while setting up the IPsec tunnel. This value is generated by cloudflare. diff --git a/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go b/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go index f1e71c011f..2600591a27 100644 --- a/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go +++ b/internal/sdkv2provider/schema_cloudflare_ipsec_tunnel.go @@ -65,14 +65,14 @@ func resourceCloudflareIPsecTunnelSchema() map[string]*schema.Schema { Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{"unidirectional", "bidirectional"}, false), - Description: fmt.Sprintf("Specifies the direction for the health check (`unidirectional` or `bidirectional`). %s Default: `unidirectional`.", renderAvailableDocumentationValuesStringSlice([]string{"unidirectional", "bidirectional"})), + Description: fmt.Sprintf("Specifies the direction for the health check. %s Default: `unidirectional`.", renderAvailableDocumentationValuesStringSlice([]string{"unidirectional", "bidirectional"})), }, "health_check_rate": { Type: schema.TypeString, Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{"low", "mid", "high"}, false), - Description: fmt.Sprintf("Specifies the ICMP rate for the health check (`low`, `mid` or `high`). %s Default: `mid`.", renderAvailableDocumentationValuesStringSlice([]string{"low", "mid", "high"})), + Description: fmt.Sprintf("Specifies the ICMP rate for the health check. %s Default: `mid`.", renderAvailableDocumentationValuesStringSlice([]string{"low", "mid", "high"})), }, "psk": { Type: schema.TypeString, From 7b60c8701ea82a3edbbc3793fee4d6748b99f90b Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 26 Mar 2024 10:44:39 +1100 Subject: [PATCH 228/264] Update .changelog/3112.txt --- .changelog/3112.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/3112.txt b/.changelog/3112.txt index c81b388b3b..c976511427 100644 --- a/.changelog/3112.txt +++ b/.changelog/3112.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters +resource/cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters ``` From fe8862ee04ea1c3eb9257bcfd26d9ef3be636527 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 25 Mar 2024 23:45:21 +0000 Subject: [PATCH 229/264] Update CHANGELOG.md for #3112 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 049a9c177a..528b5e04d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.28.0 (Unreleased) +ENHANCEMENTS: + +* resource/cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters ([#3112](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3112)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.8 to 1.27.9 ([#3207](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3207)) From 9a18d24ffc8e8cfb82eb5290c4827c18d5f7edd3 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 26 Mar 2024 09:17:20 +0000 Subject: [PATCH 230/264] Update CHANGELOG.md for #3216 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528b5e04d5..fa2141a683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/cloudflare_device_posture_rule: update support for new fields for crowdstrike_s2s posture rule. ([#3216](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3216)) * resource/cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters ([#3112](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3112)) DEPENDENCIES: From 267db25e007d6b43b64a94e077cf86fea4403baf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 03:24:47 +0000 Subject: [PATCH 231/264] build(deps): bump github.com/cloudflare/cloudflare-go Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.91.0 to 0.92.0. - [Release notes](https://github.com/cloudflare/cloudflare-go/releases) - [Changelog](https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/cloudflare/cloudflare-go/compare/v0.91.0...v0.92.0) --- updated-dependencies: - dependency-name: github.com/cloudflare/cloudflare-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7be2a58a37..fe131bcd57 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/cloudflare/cloudflare-go v0.91.0 + github.com/cloudflare/cloudflare-go v0.92.0 github.com/fatih/color v1.16.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 58514a0c05..3b20202e0c 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cloudflare/cloudflare-go v0.91.0 h1:L7IR+86qrZuEMSjGFg4cwRwtHqC8uCPmMUkP7BD4CPw= -github.com/cloudflare/cloudflare-go v0.91.0/go.mod h1:nUqvBUUDRxNzsDSQjbqUNWHEIYAoUlgRmcAzMKlFdKs= +github.com/cloudflare/cloudflare-go v0.92.0 h1:ltJvGvqZ4G6Fm2hHOYZ5RWpJQcrM0oDrsjjZydZhFJQ= +github.com/cloudflare/cloudflare-go v0.92.0/go.mod h1:nUqvBUUDRxNzsDSQjbqUNWHEIYAoUlgRmcAzMKlFdKs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= From 3af4a304459b09f88df1ff1e9bf158acc1985dc5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Mar 2024 03:24:59 +0000 Subject: [PATCH 232/264] add CHANGELOG for #3218 --- .changelog/3218.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3218.txt diff --git a/.changelog/3218.txt b/.changelog/3218.txt new file mode 100644 index 0000000000..f669503399 --- /dev/null +++ b/.changelog/3218.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump github.com/cloudflare/cloudflare-go from 0.91.0 to 0.92.0 +``` From 7e88f3084bb60a8188c0bfa9e6e81d2f44caf6aa Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 27 Mar 2024 03:31:47 +0000 Subject: [PATCH 233/264] Update CHANGELOG.md for #3218 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2141a683..dd8b7e3168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.8 to 1.27.9 ([#3207](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3207)) * provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.8 to 1.17.9 ([#3207](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3207)) * provider: bump github.com/cloudflare/cloudflare-go from 0.90.0 to 0.91.0 ([#3208](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3208)) +* provider: bump github.com/cloudflare/cloudflare-go from 0.91.0 to 0.92.0 ([#3218](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3218)) ## 4.27.0 (March 20th, 2024) From 538c28d40dfed742fda52f449a50701019e4e493 Mon Sep 17 00:00:00 2001 From: Janik Rabe Date: Wed, 27 Mar 2024 13:16:23 +0000 Subject: [PATCH 234/264] Remove "locked" flag of DNS records This flag hasn't been used in quite a while and we're preparing to remove it from the API. --- .changelog/3220.txt | 3 +++ docs/data-sources/record.md | 1 - internal/sdkv2provider/data_source_record.go | 6 ------ internal/sdkv2provider/data_source_record_test.go | 3 --- 4 files changed, 3 insertions(+), 10 deletions(-) create mode 100644 .changelog/3220.txt diff --git a/.changelog/3220.txt b/.changelog/3220.txt new file mode 100644 index 0000000000..73a375bafb --- /dev/null +++ b/.changelog/3220.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +data_source/record: Remove `locked` flag which is always false +``` diff --git a/docs/data-sources/record.md b/docs/data-sources/record.md index 15b1ee5cc3..51de86ab43 100644 --- a/docs/data-sources/record.md +++ b/docs/data-sources/record.md @@ -34,7 +34,6 @@ data "cloudflare_record" "example" { ### Read-Only - `id` (String) The ID of this resource. -- `locked` (Boolean) Locked status of the found DNS record. - `proxiable` (Boolean) Proxiable status of the found DNS record. - `proxied` (Boolean) Proxied status of the found DNS record. - `ttl` (Number) TTL of the found DNS record. diff --git a/internal/sdkv2provider/data_source_record.go b/internal/sdkv2provider/data_source_record.go index 4852dc1952..9564dfa757 100644 --- a/internal/sdkv2provider/data_source_record.go +++ b/internal/sdkv2provider/data_source_record.go @@ -67,11 +67,6 @@ func dataSourceCloudflareRecord() *schema.Resource { Computed: true, Description: "Proxiable status of the found DNS record.", }, - "locked": { - Type: schema.TypeBool, - Computed: true, - Description: "Locked status of the found DNS record.", - }, "zone_name": { Type: schema.TypeString, Computed: true, @@ -125,7 +120,6 @@ func dataSourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData, d.Set("proxied", record.Proxied) d.Set("ttl", record.TTL) d.Set("proxiable", record.Proxiable) - d.Set("locked", record.Locked) d.Set("zone_name", record.ZoneName) if record.Priority != nil { diff --git a/internal/sdkv2provider/data_source_record_test.go b/internal/sdkv2provider/data_source_record_test.go index efe770f36a..bb83ee92b6 100644 --- a/internal/sdkv2provider/data_source_record_test.go +++ b/internal/sdkv2provider/data_source_record_test.go @@ -27,7 +27,6 @@ func TestAccCloudflareRecordDataSource(t *testing.T) { resource.TestCheckResourceAttr(name, "proxied", "false"), resource.TestCheckResourceAttr(name, "ttl", "1"), resource.TestCheckResourceAttr(name, "proxiable", "true"), - resource.TestCheckResourceAttr(name, "locked", "false"), resource.TestCheckResourceAttr(name, "zone_name", domain), ), }, @@ -54,7 +53,6 @@ func TestAccCloudflareRecordDataSourceTXT(t *testing.T) { resource.TestCheckResourceAttr(name, "proxied", "false"), resource.TestCheckResourceAttr(name, "ttl", "1"), resource.TestCheckResourceAttr(name, "proxiable", "false"), - resource.TestCheckResourceAttr(name, "locked", "false"), resource.TestCheckResourceAttr(name, "zone_name", domain), ), }, @@ -81,7 +79,6 @@ func TestAccCloudflareRecordDataSourceMX(t *testing.T) { resource.TestCheckResourceAttr(name, "proxied", "false"), resource.TestCheckResourceAttr(name, "ttl", "1"), resource.TestCheckResourceAttr(name, "proxiable", "false"), - resource.TestCheckResourceAttr(name, "locked", "false"), resource.TestCheckResourceAttr(name, "zone_name", domain), resource.TestCheckResourceAttr(name, "priority", "10"), ), From 0d4e24074642c01e29f6cfcc244ad24808079262 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 28 Mar 2024 02:33:37 +0000 Subject: [PATCH 235/264] Update CHANGELOG.md for #3187 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8b7e3168..dec08dcdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/cloudflare_access_application: adds saml_attribute_transform_jsonata` to SaaS applications ([#3187](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3187)) * resource/cloudflare_device_posture_rule: update support for new fields for crowdstrike_s2s posture rule. ([#3216](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3216)) * resource/cloudflare_ipsec_tunnel: Adds IPsec tunnel health_check_direction & health_check_rate parameters ([#3112](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3112)) From bf146186813ead27c49e61df587d32a383d72360 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 28 Mar 2024 13:35:36 +1100 Subject: [PATCH 236/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dec08dcdb7..6ad4336220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.28.0 (Unreleased) +## 4.29.0 (Unreleased) + +## 4.28.0 (March 28th, 2024) ENHANCEMENTS: From c1d02398942f98ee252db46b3198cd9b1aa5f944 Mon Sep 17 00:00:00 2001 From: Joey Buiteweg Date: Tue, 7 Nov 2023 09:03:32 -0600 Subject: [PATCH 237/264] GATE-4979: Add support for resolver policies --- .changelog/3198.txt | 3 + docs/resources/teams_rule.md | 21 ++++ .../resource_cloudflare_teams_rules.go | 102 +++++++++++++++++- .../schema_cloudflare_teams_rules.go | 57 ++++++++++ 4 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 .changelog/3198.txt diff --git a/.changelog/3198.txt b/.changelog/3198.txt new file mode 100644 index 0000000000..8c43379e27 --- /dev/null +++ b/.changelog/3198.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_teams_rule: Add support for resolver policies +``` diff --git a/docs/resources/teams_rule.md b/docs/resources/teams_rule.md index c9ca2c10aa..17200f3524 100644 --- a/docs/resources/teams_rule.md +++ b/docs/resources/teams_rule.md @@ -73,6 +73,11 @@ Optional: - `override_ips` (List of String) The IPs to override matching DNS queries with. - `payload_log` (Block List, Max: 1) Configure DLP Payload Logging settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--payload_log)) - `untrusted_cert` (Block List, Max: 1) Configure untrusted certificate settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--untrusted_cert)) + + +- `resolve_dns_through_cloudflare` (Boolean) Enable sending queries that match the resolver policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot be set when `dns_resolvers` are specified. +- `dns_resolvers` (Block List, Max: 1) Add your own custom resolvers to route queries that match the resolver policy. Cannot be used when `resolve_dns_through_cloudflare` is set. DNS queries will route to the address closest to their origin. (see [below for nested schema](#nestedblock--rule_settings--dns_resolvers)) + ### Nested Schema for `rule_settings.audit_ssh` @@ -150,6 +155,22 @@ Optional: - `action` (String) Action to be taken when the SSL certificate of upstream is invalid. Available values: `pass_through`, `block`, `error`. + +### Nested Schema for `rule_settings.dns_resolvers` + +Optional: + +- `ipv4` (List of Object) IPv4 Resolver Addresses (see [below for nested schema](#nestedobjatt--rule_settings--dns_resolvers--dns_resolver_settings)) + +- `ipv6` (List of Object) IPv6 Resolver Addresses (see [below for nested schema](#nestedobjatt--rule_settings--dns_resolvers--dns_resolver_settings)) + + +### Nested Schema for `rule_settings.dns_resolvers.dns_resolver_settings` +- `ip` (String) The IPv4 or IPv6 address of the upstream resolver +- `port` (Number) A port number to use for the upstream resolver. Defaults to 53 if omitted. +- `vnet_id` (String) Optionally specify a virtual network for this resolver. Uses default virtual network id if omitted. +- `route_through_private_network` (Boolean) Whether to connect to this resolver over a private network. Must be set when vnet_id is set. + ## Import Import is supported using the following syntax: diff --git a/internal/sdkv2provider/resource_cloudflare_teams_rules.go b/internal/sdkv2provider/resource_cloudflare_teams_rules.go index 96838939e3..8856dbc05d 100644 --- a/internal/sdkv2provider/resource_cloudflare_teams_rules.go +++ b/internal/sdkv2provider/resource_cloudflare_teams_rules.go @@ -214,7 +214,9 @@ func flattenTeamsRuleSettings(d *schema.ResourceData, settings *cloudflare.Teams settings.AllowChildBypass == nil && settings.BypassParentRule == nil && settings.AuditSSH == nil && - settings.NotificationSettings == nil { + settings.NotificationSettings == nil && + settings.ResolveDnsThroughCloudflare == nil && + settings.DnsResolverSettings == nil { return nil } @@ -232,6 +234,8 @@ func flattenTeamsRuleSettings(d *schema.ResourceData, settings *cloudflare.Teams "untrusted_cert": flattenTeamsUntrustedCertSettings(settings.UntrustedCertSettings), "payload_log": flattenTeamsDlpPayloadLogSettings(settings.PayloadLog), "notification_settings": flattenTeamsNotificationSettings(settings.NotificationSettings), + "resolve_dns_through_cloudflare": settings.ResolveDnsThroughCloudflare, + "dns_resolvers": flattenTeamsDnsResolverSettings(settings.DnsResolverSettings), } if settings.IPCategories { @@ -278,7 +282,9 @@ func inflateTeamsRuleSettings(settings interface{}) *cloudflare.TeamsRuleSetting egressSettings := inflateTeamsEgressSettings(settingsMap["egress"].([]interface{})) payloadLog := inflateTeamsDlpPayloadLogSettings(settingsMap["payload_log"].([]interface{})) untrustedCertSettings := inflateTeamsUntrustedCertSettings(settingsMap["untrusted_cert"].([]interface{})) - notificationSettings := inflateTeamsNotificationSettings(settingsMap["notification_settings"].([]interface{})) + notificationSettings := inflateTeamsNotificationSettings(settingsMap["notification_settings"]) + resolveDnsThroughCloudflare := settingsMap["resolve_dns_through_cloudflare"].(bool) + dnsResolverSettings := inflateTeamsDnsResolverSettings(settingsMap["dns_resolvers"].([]interface{})) return &cloudflare.TeamsRuleSettings{ BlockPageEnabled: enabled, @@ -294,6 +300,8 @@ func inflateTeamsRuleSettings(settings interface{}) *cloudflare.TeamsRuleSetting PayloadLog: payloadLog, UntrustedCertSettings: untrustedCertSettings, NotificationSettings: notificationSettings, + ResolveDnsThroughCloudflare: &resolveDnsThroughCloudflare, + DnsResolverSettings: dnsResolverSettings, } } @@ -486,6 +494,96 @@ func flattenTeamsUntrustedCertSettings(settings *cloudflare.UntrustedCertSetting }} } +func flattenTeamsDnsResolverSettings(settings *cloudflare.TeamsDnsResolverSettings) []interface{} { + if settings == nil { + return nil + } + ret := map[string]interface{}{} + if len(settings.V4Resolvers) != 0 { + ret["ipv4"] = flattenTeamsDnsResolverAddressesV4(settings.V4Resolvers) + } + if len(settings.V6Resolvers) != 0 { + ret["ipv6"] = flattenTeamsDnsResolverAddressesV6(settings.V6Resolvers) + } + return []interface{}{ret} +} + +func inflateTeamsDnsResolverSettings(settings interface{}) *cloudflare.TeamsDnsResolverSettings { + settingsList := settings.([]interface{}) + if len(settingsList) != 1 { + return nil + } + settingsMap := settingsList[0].(map[string]interface{}) + ipv4 := inflateTeamsDnsResolverAddressesV4(settingsMap["ipv4"].([]interface{})) + ipv6 := inflateTeamsDnsResolverAddressesV6(settingsMap["ipv6"].([]interface{})) + return &cloudflare.TeamsDnsResolverSettings{ + V4Resolvers: ipv4, + V6Resolvers: ipv6, + } +} + +func flattenTeamsDnsResolverAddressesV4(settings []cloudflare.TeamsDnsResolverAddressV4) []interface{} { + ret := []interface{}{} + for _, addr := range settings { + part := map[string]interface{}{ + "ip": addr.IP, + "port": addr.Port, + "route_through_private_network": addr.RouteThroughPrivateNetwork, + "vnet_id": addr.VnetID, + } + ret = append(ret, part) + } + return ret +} + +func inflateTeamsDnsResolverAddressesV4(settings []interface{}) []cloudflare.TeamsDnsResolverAddressV4 { + ret := []cloudflare.TeamsDnsResolverAddressV4{} + for _, raw := range settings { + part := raw.(map[string]interface{}) + newAddr := cloudflare.TeamsDnsResolverAddressV4{ + TeamsDnsResolverAddress: cloudflare.TeamsDnsResolverAddress{ + IP: part["ip"].(string), + Port: cloudflare.IntPtr(part["port"].(int)), + VnetID: part["vnet_id"].(string), + RouteThroughPrivateNetwork: cloudflare.BoolPtr(part["route_through_private_network"].(bool)), + }, + } + ret = append(ret, newAddr) + } + return ret +} + +func flattenTeamsDnsResolverAddressesV6(settings []cloudflare.TeamsDnsResolverAddressV6) []interface{} { + ret := []interface{}{} + for _, addr := range settings { + part := map[string]interface{}{ + "ip": addr.IP, + "port": addr.Port, + "route_through_private_network": addr.RouteThroughPrivateNetwork, + "vnet_id": addr.VnetID, + } + ret = append(ret, part) + } + return ret +} + +func inflateTeamsDnsResolverAddressesV6(settings []interface{}) []cloudflare.TeamsDnsResolverAddressV6 { + ret := []cloudflare.TeamsDnsResolverAddressV6{} + for _, raw := range settings { + part := raw.(map[string]interface{}) + newAddr := cloudflare.TeamsDnsResolverAddressV6{ + TeamsDnsResolverAddress: cloudflare.TeamsDnsResolverAddress{ + IP: part["ip"].(string), + Port: cloudflare.IntPtr(part["port"].(int)), + VnetID: part["vnet_id"].(string), + RouteThroughPrivateNetwork: cloudflare.BoolPtr(part["route_through_private_network"].(bool)), + }, + } + ret = append(ret, newAddr) + } + return ret +} + func inflateTeamsDlpPayloadLogSettings(settings interface{}) *cloudflare.TeamsDlpPayloadLogSettings { settingsList := settings.([]interface{}) if len(settingsList) != 1 { diff --git a/internal/sdkv2provider/schema_cloudflare_teams_rules.go b/internal/sdkv2provider/schema_cloudflare_teams_rules.go index 970f621a51..5cb797426a 100644 --- a/internal/sdkv2provider/schema_cloudflare_teams_rules.go +++ b/internal/sdkv2provider/schema_cloudflare_teams_rules.go @@ -201,6 +201,20 @@ var teamsRuleSettings = map[string]*schema.Schema{ }, Description: "Notification settings on a block rule", }, + "resolve_dns_through_cloudflare": { + Type: schema.TypeBool, + Optional: true, + Description: "Configure whether resolver policy targets Cloudflare DNS.", + }, + "dns_resolvers": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: teamsDnsResolverSettings, + }, + Description: "Add your own custom resolvers to route queries that match the resolver policy. Cannot be used when resolve_dns_through_cloudflare is set. DNS queries will route to the address closest to their origin.", + }, } var payloadLogSettings = map[string]*schema.Schema{ @@ -317,3 +331,46 @@ var teamsCheckSessionSettings = map[string]*schema.Schema{ Description: "Configure how fresh the session needs to be to be considered valid.", }, } + +var teamsDnsResolverSettings = map[string]*schema.Schema{ + "ipv4": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: teamsDnsResolverAddress, + }, + Description: "IPv4 resolvers", + }, + "ipv6": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: teamsDnsResolverAddress, + }, + Description: "IPv6 resolvers", + }, +} + +var teamsDnsResolverAddress = map[string]*schema.Schema{ + "ip": { + Type: schema.TypeString, + Required: true, + Description: "Resolver IP address.", + }, + "port": { + Type: schema.TypeInt, + Optional: true, + Default: 53, + Description: "Resolver port.", + }, + "vnet_id": { + Type: schema.TypeString, + Optional: true, + Description: "Virtual Network ID.", + }, + "route_through_private_network": { + Type: schema.TypeBool, + Optional: true, + Description: "Whether to use a private network.", + }, +} From b2b4bb59bbccc326d94ad11e06431a053129ad17 Mon Sep 17 00:00:00 2001 From: Daniel Malon Date: Wed, 20 Mar 2024 21:32:03 +0000 Subject: [PATCH 238/264] Add is_deleted filter option to tunnel data source --- internal/sdkv2provider/data_source_tunnel.go | 15 ++- .../sdkv2provider/data_source_tunnel_test.go | 92 +++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/internal/sdkv2provider/data_source_tunnel.go b/internal/sdkv2provider/data_source_tunnel.go index 19541d31a0..3db87e632f 100644 --- a/internal/sdkv2provider/data_source_tunnel.go +++ b/internal/sdkv2provider/data_source_tunnel.go @@ -28,6 +28,12 @@ func dataSourceCloudflareTunnel() *schema.Resource { Description: "Name of the tunnel.", ForceNew: true, }, + "is_deleted": { + Type: schema.TypeBool, + Optional: true, + Description: "If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included.", + ForceNew: true, + }, "id": { Type: schema.TypeString, Computed: true, @@ -59,7 +65,13 @@ func dataSourceCloudflareTunnelRead(ctx context.Context, d *schema.ResourceData, accID := d.Get(consts.AccountIDSchemaKey).(string) name := d.Get("name").(string) - tunnels, _, err := client.ListTunnels(ctx, cloudflare.AccountIdentifier(accID), cloudflare.TunnelListParams{Name: name}) + params := cloudflare.TunnelListParams{Name: name} + + if v, ok := d.GetOkExists("is_deleted"); ok { + params.IsDeleted = cloudflare.BoolPtr(v.(bool)) + } + + tunnels, _, err := client.ListTunnels(ctx, cloudflare.AccountIdentifier(accID), params) if err != nil { return diag.FromErr(fmt.Errorf("failed to fetch Tunnel: %w", err)) } @@ -71,6 +83,7 @@ func dataSourceCloudflareTunnelRead(ctx context.Context, d *schema.ResourceData, d.SetId(tunnel.ID) d.Set("status", tunnel.Status) + d.Set("is_deleted", tunnel.DeletedAt != nil) d.Set("id", tunnel.ID) d.Set("tunnel_type", tunnel.TunnelType) d.Set("remote_config", tunnel.RemoteConfig) diff --git a/internal/sdkv2provider/data_source_tunnel_test.go b/internal/sdkv2provider/data_source_tunnel_test.go index abed79c218..d8f5da08f2 100644 --- a/internal/sdkv2provider/data_source_tunnel_test.go +++ b/internal/sdkv2provider/data_source_tunnel_test.go @@ -3,6 +3,7 @@ package sdkv2provider import ( "fmt" "os" + "regexp" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -41,3 +42,94 @@ data "cloudflare_tunnel" "%[2]s" { } `, accountID, name) } + +func TestAccCloudflareTunnel_MatchIsDeleted(t *testing.T) { + rnd := generateRandomResourceName() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: providerFactories, + Steps: []resource.TestStep{ + { + Config: testCloudflareTunnelMatchIsDeletedStep1(rnd), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "is_deleted", "false"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "is_deleted", "false"), + ), + }, + { + Config: testCloudflareTunnelMatchIsDeletedStep1(rnd), + Destroy: true, + }, + { + Config: testCloudflareTunnelMatchIsDeletedStep2(rnd), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "is_deleted", "true"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_deleted", "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_deleted", "is_deleted", "true"), + ), + }, + { + Config: testCloudflareTunnelMatchIsDeletedStep3(rnd), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "status", "inactive"), + ), + ExpectError: regexp.MustCompile(`Error: No tunnels with name: ` + rnd), + }, + }, + }) +} + +func testCloudflareTunnelMatchIsDeletedStep1(name string) string { + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + return fmt.Sprintf(` +resource "cloudflare_tunnel" "%[2]s" { + account_id = "%[1]s" + name = "%[2]s" + secret = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=" +} + +data "cloudflare_tunnel" "%[2]s_default" { + account_id = cloudflare_tunnel.%[2]s.account_id + name = cloudflare_tunnel.%[2]s.name + depends_on = [cloudflare_tunnel.%[2]s] +} + +data "cloudflare_tunnel" "%[2]s_not_deleted" { + account_id = "%[1]s" + name = "%[2]s" + is_deleted = false + depends_on = [cloudflare_tunnel.%[2]s] +} +`, accountID, name) +} + +func testCloudflareTunnelMatchIsDeletedStep2(name string) string { + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + return fmt.Sprintf(` +data "cloudflare_tunnel" "%[2]s_default" { + account_id = "%[1]s" + name = "%[2]s" +} + +data "cloudflare_tunnel" "%[2]s_deleted" { + account_id = "%[1]s" + name = "%[2]s" + is_deleted = true +} +`, accountID, name) +} + +func testCloudflareTunnelMatchIsDeletedStep3(name string) string { + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + return fmt.Sprintf(` +data "cloudflare_tunnel" "%[2]s_not_deleted" { + account_id = "%[1]s" + name = "%[2]s" + is_deleted = false +} +`, accountID, name) +} From bcbfd5933f8ed5a7a1424ff6238592be831c3717 Mon Sep 17 00:00:00 2001 From: Daniel Malon Date: Wed, 20 Mar 2024 21:43:25 +0000 Subject: [PATCH 239/264] chore: make docs --- docs/data-sources/tunnel.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/data-sources/tunnel.md b/docs/data-sources/tunnel.md index c3b654fddc..a34c10b71c 100644 --- a/docs/data-sources/tunnel.md +++ b/docs/data-sources/tunnel.md @@ -25,6 +25,10 @@ data "cloudflare_tunnel" "example" { - `account_id` (String) The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.** - `name` (String) Name of the tunnel. **Modifying this attribute will force creation of a new resource.** +### Optional + +- `is_deleted` (Boolean) If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. **Modifying this attribute will force creation of a new resource.** + ### Read-Only - `id` (String) ID of the tunnel. From c3705d2b77ea31c5a0baa0d0d9d1c4dcd2391c9a Mon Sep 17 00:00:00 2001 From: Daniel Malon Date: Wed, 20 Mar 2024 21:47:03 +0000 Subject: [PATCH 240/264] chore: add changelog entry --- .changelog/3201.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3201.txt diff --git a/.changelog/3201.txt b/.changelog/3201.txt new file mode 100644 index 0000000000..365554f7a5 --- /dev/null +++ b/.changelog/3201.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datasource/cloudflare_tunnel: Add the option to filter deleted tunnels +``` From 20cf2d98f8f89440a5a4fc0b88c77706ac7673d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 23:51:56 +0000 Subject: [PATCH 241/264] build(deps): bump the aws group with 4 updates Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.26.0 to 1.26.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.26.0...v1.26.1) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.9 to 1.27.10 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.9...config/v1.27.10) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.9 to 1.17.10 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.17.9...config/v1.17.10) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.53.0 to 1.53.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.53.0...service/s3/v1.53.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 34 ++++++++++++++--------------- go.sum | 68 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/go.mod b/go.mod index fe131bcd57..b67e81858f 100644 --- a/go.mod +++ b/go.mod @@ -33,10 +33,10 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/aws/aws-sdk-go-v2 v1.26.0 - github.com/aws/aws-sdk-go-v2/config v1.27.9 - github.com/aws/aws-sdk-go-v2/credentials v1.17.9 - github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 + github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/config v1.27.10 + github.com/aws/aws-sdk-go-v2/credentials v1.17.10 + github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.5.0 @@ -50,20 +50,20 @@ require ( require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 // indirect - github.com/aws/smithy-go v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/goccy/go-json v0.10.2 // indirect diff --git a/go.sum b/go.sum index 3b20202e0c..1b022f133d 100644 --- a/go.sum +++ b/go.sum @@ -11,42 +11,42 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/aws/aws-sdk-go-v2 v1.26.0 h1:/Ce4OCiM3EkpW7Y+xUnfAFpchU78K7/Ug01sZni9PgA= -github.com/aws/aws-sdk-go-v2 v1.26.0/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo= -github.com/aws/aws-sdk-go-v2/config v1.27.9 h1:gRx/NwpNEFSk+yQlgmk1bmxxvQ5TyJ76CWXs9XScTqg= -github.com/aws/aws-sdk-go-v2/config v1.27.9/go.mod h1:dK1FQfpwpql83kbD873E9vz4FyAxuJtR22wzoXn3qq0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.9 h1:N8s0/7yW+h8qR8WaRlPQeJ6czVMNQVNtNdUqf6cItao= -github.com/aws/aws-sdk-go-v2/credentials v1.17.9/go.mod h1:446YhIdmSV0Jf/SLafGZalQo+xr2iw7/fzXGDPTU1yQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 h1:af5YzcLf80tv4Em4jWVD75lpnOHSBkPUZxZfGkrI3HI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0/go.mod h1:nQ3how7DMnFMWiU1SpECohgC82fpn4cKZ875NDMmwtA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 h1:0ScVK/4qZ8CIW0k8jOeFVsyS/sAiXpYxRBLolMkuLQM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4/go.mod h1:84KyjNZdHC6QZW08nfHI6yZgPd+qRgaWcYsyLUo3QY8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 h1:sHmMWWX5E7guWEFQ9SVo6A3S4xpPrWnd77a6y4WM6PU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4/go.mod h1:WjpDrhWisWOIoS9n3nk67A3Ll1vfULJ9Kq6h29HTD48= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= +github.com/aws/aws-sdk-go-v2/config v1.27.10 h1:PS+65jThT0T/snC5WjyfHHyUgG+eBoupSDV+f838cro= +github.com/aws/aws-sdk-go-v2/config v1.27.10/go.mod h1:BePM7Vo4OBpHreKRUMuDXX+/+JWP38FLkzl5m27/Jjs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.10 h1:qDZ3EA2lv1KangvQB6y258OssCHD0xvaGiEDkG4X/10= +github.com/aws/aws-sdk-go-v2/credentials v1.17.10/go.mod h1:6t3sucOaYDwDssHQa0ojH1RpmVmF5/jArkye1b2FKMI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4 h1:SIkD6T4zGQ+1YIit22wi37CGNkrE7mXV1vNA5VpI3TI= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.4/go.mod h1:XfeqbsG0HNedNs0GT+ju4Bs+pFAwsrlzcRdMvdNVf5s= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6 h1:NkHCgg0Ck86c5PTOzBZ0JRccI51suJDg5lgFtxBu1ek= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6/go.mod h1:mjTpxjC8v4SeINTngrnKFgm2QUi+Jm+etTbCxh8W4uU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 h1:b+E7zIUHMmcB4Dckjpkapoy47W6C9QBv/zoUP+Hn8Kc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6/go.mod h1:S2fNV0rxrP78NhPbCZeQgY8H9jdDMeGtwcfZIRxzBqU= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4 h1:uDj2K47EM1reAYU9jVlQ1M5YENI1u6a/TxJpf6AeOLA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.4/go.mod h1:XKCODf4RKHppc96c2EZBGV/oCUC7OClxAo2MEyg4pIk= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 h1:r3o2YsgW9zRcIP3Q0WCmttFVhTuugeKIvT5z9xDspc0= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0/go.mod h1:w2E4f8PUfNtyjfL6Iu+mWI96FGttE03z3UdNcUEC4tA= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 h1:mnbuWHOcM70/OFUlZZ5rcdfA8PflGXXiefU/O+1S3+8= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.3/go.mod h1:5HFu51Elk+4oRBZVxmHrSds5jFXmFj8C3w7DVF2gnrs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 h1:uLq0BKatTmDzWa/Nu4WO0M1AaQDaPpwTKAeByEc6WFM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3/go.mod h1:b+qdhjnxj8GSR6t5YfphOffeoQSQ1KmpoVVuBn+PWxs= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 h1:J/PpTf/hllOjx8Xu9DMflff3FajfLxqM5+tepvVXmxg= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.5/go.mod h1:0ih0Z83YDH/QeQ6Ori2yGE2XvWYv/Xm+cZc01LC6oK0= -github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= -github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 h1:ZMeFZ5yk+Ek+jNr1+uwCd2tG89t6oTS5yVWpa6yy2es= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7/go.mod h1:mxV05U+4JiHqIpGqqYXOHLPKUC6bDXC44bsUhNjOEwY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.4 h1:WzFol5Cd+yDxPAdnzTA5LmpHYSWinhmSj4rQChV0ee8= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.4/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= From 81b298ad75c9807de6bbf774ba2a57d1d9450535 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 Mar 2024 23:52:09 +0000 Subject: [PATCH 242/264] add CHANGELOG for #3222 --- .changelog/3222.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changelog/3222.txt diff --git a/.changelog/3222.txt b/.changelog/3222.txt new file mode 100644 index 0000000000..b39c035b03 --- /dev/null +++ b/.changelog/3222.txt @@ -0,0 +1,12 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2` from 1.26.0 to 1.26.1 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.9 to 1.27.10 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.9 to 1.17.10 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.53.0 to 1.53.1 +``` From 92481fe67c6d1df69af29cccad0781b89fa24d7d Mon Sep 17 00:00:00 2001 From: docsbot Date: Sat, 30 Mar 2024 09:41:30 +0000 Subject: [PATCH 243/264] build registry documentation --- docs/resources/teams_rule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/teams_rule.md b/docs/resources/teams_rule.md index c9ca2c10aa..4c2e35ed36 100644 --- a/docs/resources/teams_rule.md +++ b/docs/resources/teams_rule.md @@ -32,7 +32,7 @@ resource "cloudflare_teams_rule" "example" { ### Required - `account_id` (String) The account identifier to target for the resource. -- `action` (String) The action executed by matched teams rule. Available values: `allow`, `block`, `safesearch`, `ytrestricted`, `on`, `off`, `scan`, `noscan`, `isolate`, `noisolate`, `override`, `l4_override`, `egress`, `audit_ssh`. +- `action` (String) The action executed by matched teams rule. Available values: `allow`, `block`, `safesearch`, `ytrestricted`, `on`, `off`, `scan`, `noscan`, `isolate`, `noisolate`, `override`, `l4_override`, `egress`, `audit_ssh`, `resolve`. - `description` (String) The description of the teams rule. - `name` (String) The name of the teams rule. - `precedence` (Number) The evaluation precedence of the teams rule. From 145ad96b573dc42cbe1ef5a8573dbd9a62169887 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 2 Apr 2024 03:48:28 +0000 Subject: [PATCH 244/264] Update CHANGELOG.md for #3222 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ad4336220..013b976290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## 4.29.0 (Unreleased) +DEPENDENCIES: + +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.9 to 1.27.10 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.9 to 1.17.10 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) +* provider: bump `github.com/aws/aws-sdk-go-v2/service/s3` from 1.53.0 to 1.53.1 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) +* provider: bump `github.com/aws/aws-sdk-go-v2` from 1.26.0 to 1.26.1 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) + ## 4.28.0 (March 28th, 2024) ENHANCEMENTS: From c21b01079a74e9398970eb974369bd9327291cdd Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 2 Apr 2024 03:50:50 +0000 Subject: [PATCH 245/264] Update CHANGELOG.md for #3220 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 013b976290..79d99dc4b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.29.0 (Unreleased) +BREAKING CHANGES: + +* data_source/record: Remove `locked` flag which is always false ([#3220](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3220)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.9 to 1.27.10 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) From d979755c81fa8cb262dc8a49a7cc21cbd557cbe6 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 2 Apr 2024 16:04:44 +1100 Subject: [PATCH 246/264] clean up test assertions --- .../sdkv2provider/data_source_tunnel_test.go | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/internal/sdkv2provider/data_source_tunnel_test.go b/internal/sdkv2provider/data_source_tunnel_test.go index d8f5da08f2..6e5b8cdf07 100644 --- a/internal/sdkv2provider/data_source_tunnel_test.go +++ b/internal/sdkv2provider/data_source_tunnel_test.go @@ -51,31 +51,32 @@ func TestAccCloudflareTunnel_MatchIsDeleted(t *testing.T) { ProviderFactories: providerFactories, Steps: []resource.TestStep{ { - Config: testCloudflareTunnelMatchIsDeletedStep1(rnd), + Config: testCloudflareTunnelMatchIsDeleted_Default(rnd), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "status", "inactive"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "is_deleted", "false"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "status", "inactive"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "is_deleted", "false"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "is_deleted", "false"), ), }, { - Config: testCloudflareTunnelMatchIsDeletedStep1(rnd), + Config: testCloudflareTunnelMatchIsDeleted_Default(rnd), Destroy: true, }, { - Config: testCloudflareTunnelMatchIsDeletedStep2(rnd), + Config: testCloudflareTunnelMatchIsDeleted_DeletedTunnels(rnd), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "status", "inactive"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_default", "is_deleted", "true"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_deleted", "status", "inactive"), - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_deleted", "is_deleted", "true"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "is_deleted", "true"), ), }, { - Config: testCloudflareTunnelMatchIsDeletedStep3(rnd), + Config: testCloudflareTunnelMatchIsDeleted_DeletedTunnels(rnd), + Destroy: true, + }, + { + Config: testCloudflareTunnelMatchIsDeleted_ActiveTunnels(rnd), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd+"_not_deleted", "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "status", "inactive"), + resource.TestCheckResourceAttr("data.cloudflare_tunnel."+rnd, "is_deleted", "true"), ), ExpectError: regexp.MustCompile(`Error: No tunnels with name: ` + rnd), }, @@ -83,7 +84,7 @@ func TestAccCloudflareTunnel_MatchIsDeleted(t *testing.T) { }) } -func testCloudflareTunnelMatchIsDeletedStep1(name string) string { +func testCloudflareTunnelMatchIsDeleted_Default(name string) string { accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") return fmt.Sprintf(` resource "cloudflare_tunnel" "%[2]s" { @@ -92,13 +93,7 @@ resource "cloudflare_tunnel" "%[2]s" { secret = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=" } -data "cloudflare_tunnel" "%[2]s_default" { - account_id = cloudflare_tunnel.%[2]s.account_id - name = cloudflare_tunnel.%[2]s.name - depends_on = [cloudflare_tunnel.%[2]s] -} - -data "cloudflare_tunnel" "%[2]s_not_deleted" { +data "cloudflare_tunnel" "%[2]s" { account_id = "%[1]s" name = "%[2]s" is_deleted = false @@ -107,15 +102,10 @@ data "cloudflare_tunnel" "%[2]s_not_deleted" { `, accountID, name) } -func testCloudflareTunnelMatchIsDeletedStep2(name string) string { +func testCloudflareTunnelMatchIsDeleted_DeletedTunnels(name string) string { accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") return fmt.Sprintf(` -data "cloudflare_tunnel" "%[2]s_default" { - account_id = "%[1]s" - name = "%[2]s" -} - -data "cloudflare_tunnel" "%[2]s_deleted" { +data "cloudflare_tunnel" "%[2]s" { account_id = "%[1]s" name = "%[2]s" is_deleted = true @@ -123,10 +113,10 @@ data "cloudflare_tunnel" "%[2]s_deleted" { `, accountID, name) } -func testCloudflareTunnelMatchIsDeletedStep3(name string) string { +func testCloudflareTunnelMatchIsDeleted_ActiveTunnels(name string) string { accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") return fmt.Sprintf(` -data "cloudflare_tunnel" "%[2]s_not_deleted" { +data "cloudflare_tunnel" "%[2]s" { account_id = "%[1]s" name = "%[2]s" is_deleted = false From 2a4e1862a4cd07ece3f7ff2205892e02edd9a261 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 2 Apr 2024 05:09:15 +0000 Subject: [PATCH 247/264] Update CHANGELOG.md for #3201 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79d99dc4b8..1722e33dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ BREAKING CHANGES: * data_source/record: Remove `locked` flag which is always false ([#3220](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3220)) +ENHANCEMENTS: + +* datasource/cloudflare_tunnel: Add the option to filter deleted tunnels ([#3201](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3201)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.9 to 1.27.10 ([#3222](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3222)) From 7f81531df33de4d47f5a1f5a636cd2a3292f191b Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 3 Apr 2024 11:13:35 +1100 Subject: [PATCH 248/264] `make docs` --- docs/resources/teams_rule.md | 62 +++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/docs/resources/teams_rule.md b/docs/resources/teams_rule.md index 17200f3524..6f4366effb 100644 --- a/docs/resources/teams_rule.md +++ b/docs/resources/teams_rule.md @@ -32,7 +32,7 @@ resource "cloudflare_teams_rule" "example" { ### Required - `account_id` (String) The account identifier to target for the resource. -- `action` (String) The action executed by matched teams rule. Available values: `allow`, `block`, `safesearch`, `ytrestricted`, `on`, `off`, `scan`, `noscan`, `isolate`, `noisolate`, `override`, `l4_override`, `egress`, `audit_ssh`. +- `action` (String) The action executed by matched teams rule. Available values: `allow`, `block`, `safesearch`, `ytrestricted`, `on`, `off`, `scan`, `noscan`, `isolate`, `noisolate`, `override`, `l4_override`, `egress`, `audit_ssh`, `resolve`. - `description` (String) The description of the teams rule. - `name` (String) The name of the teams rule. - `precedence` (Number) The evaluation precedence of the teams rule. @@ -64,6 +64,7 @@ Optional: - `block_page_reason` (String) The displayed reason for a user being blocked. - `bypass_parent_rule` (Boolean) Allow child MSP accounts to bypass their parent's rule. - `check_session` (Block List, Max: 1) Configure how session check behaves. (see [below for nested schema](#nestedblock--rule_settings--check_session)) +- `dns_resolvers` (Block List, Max: 1) Add your own custom resolvers to route queries that match the resolver policy. Cannot be used when resolve_dns_through_cloudflare is set. DNS queries will route to the address closest to their origin. (see [below for nested schema](#nestedblock--rule_settings--dns_resolvers)) - `egress` (Block List, Max: 1) Configure how Proxy traffic egresses. Can be set for rules with Egress action and Egress filter. Can be omitted to indicate local egress via Warp IPs. (see [below for nested schema](#nestedblock--rule_settings--egress)) - `insecure_disable_dnssec_validation` (Boolean) Disable DNSSEC validation (must be Allow rule). - `ip_categories` (Boolean) Turns on IP category based filter on dns if the rule contains dns category checks. @@ -72,12 +73,8 @@ Optional: - `override_host` (String) The host to override matching DNS queries with. - `override_ips` (List of String) The IPs to override matching DNS queries with. - `payload_log` (Block List, Max: 1) Configure DLP Payload Logging settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--payload_log)) +- `resolve_dns_through_cloudflare` (Boolean) Configure whether resolver policy targets Cloudflare DNS. - `untrusted_cert` (Block List, Max: 1) Configure untrusted certificate settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--untrusted_cert)) - - -- `resolve_dns_through_cloudflare` (Boolean) Enable sending queries that match the resolver policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot be set when `dns_resolvers` are specified. -- `dns_resolvers` (Block List, Max: 1) Add your own custom resolvers to route queries that match the resolver policy. Cannot be used when `resolve_dns_through_cloudflare` is set. DNS queries will route to the address closest to their origin. (see [below for nested schema](#nestedblock--rule_settings--dns_resolvers)) - ### Nested Schema for `rule_settings.audit_ssh` @@ -108,6 +105,43 @@ Required: - `enforce` (Boolean) Enable session enforcement for this rule. + +### Nested Schema for `rule_settings.dns_resolvers` + +Optional: + +- `ipv4` (Block List) IPv4 resolvers. (see [below for nested schema](#nestedblock--rule_settings--dns_resolvers--ipv4)) +- `ipv6` (Block List) IPv6 resolvers. (see [below for nested schema](#nestedblock--rule_settings--dns_resolvers--ipv6)) + + +### Nested Schema for `rule_settings.dns_resolvers.ipv4` + +Required: + +- `ip` (String) Resolver IP address. + +Optional: + +- `port` (Number) Resolver port. Defaults to `53`. +- `route_through_private_network` (Boolean) Whether to use a private network. +- `vnet_id` (String) Virtual Network ID. + + + +### Nested Schema for `rule_settings.dns_resolvers.ipv6` + +Required: + +- `ip` (String) Resolver IP address. + +Optional: + +- `port` (Number) Resolver port. Defaults to `53`. +- `route_through_private_network` (Boolean) Whether to use a private network. +- `vnet_id` (String) Virtual Network ID. + + + ### Nested Schema for `rule_settings.egress` @@ -155,22 +189,6 @@ Optional: - `action` (String) Action to be taken when the SSL certificate of upstream is invalid. Available values: `pass_through`, `block`, `error`. - -### Nested Schema for `rule_settings.dns_resolvers` - -Optional: - -- `ipv4` (List of Object) IPv4 Resolver Addresses (see [below for nested schema](#nestedobjatt--rule_settings--dns_resolvers--dns_resolver_settings)) - -- `ipv6` (List of Object) IPv6 Resolver Addresses (see [below for nested schema](#nestedobjatt--rule_settings--dns_resolvers--dns_resolver_settings)) - - -### Nested Schema for `rule_settings.dns_resolvers.dns_resolver_settings` -- `ip` (String) The IPv4 or IPv6 address of the upstream resolver -- `port` (Number) A port number to use for the upstream resolver. Defaults to 53 if omitted. -- `vnet_id` (String) Optionally specify a virtual network for this resolver. Uses default virtual network id if omitted. -- `route_through_private_network` (Boolean) Whether to connect to this resolver over a private network. Must be set when vnet_id is set. - ## Import Import is supported using the following syntax: From 51b84887ad02a1a401baf548a1742b2ddf66b548 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 3 Apr 2024 11:19:05 +1100 Subject: [PATCH 249/264] `make docs` --- docs/resources/teams_rule.md | 18 +++++++++--------- .../schema_cloudflare_teams_rules.go | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/resources/teams_rule.md b/docs/resources/teams_rule.md index 6f4366effb..1c37b881bb 100644 --- a/docs/resources/teams_rule.md +++ b/docs/resources/teams_rule.md @@ -73,7 +73,7 @@ Optional: - `override_host` (String) The host to override matching DNS queries with. - `override_ips` (List of String) The IPs to override matching DNS queries with. - `payload_log` (Block List, Max: 1) Configure DLP Payload Logging settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--payload_log)) -- `resolve_dns_through_cloudflare` (Boolean) Configure whether resolver policy targets Cloudflare DNS. +- `resolve_dns_through_cloudflare` (Boolean) Enable sending queries that match the resolver policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot be set when `dns_resolvers` are specified. - `untrusted_cert` (Block List, Max: 1) Configure untrusted certificate settings for this rule. (see [below for nested schema](#nestedblock--rule_settings--untrusted_cert)) @@ -118,13 +118,13 @@ Optional: Required: -- `ip` (String) Resolver IP address. +- `ip` (String) The IPv4 or IPv6 address of the upstream resolver. Optional: -- `port` (Number) Resolver port. Defaults to `53`. -- `route_through_private_network` (Boolean) Whether to use a private network. -- `vnet_id` (String) Virtual Network ID. +- `port` (Number) A port number to use for the upstream resolver. Defaults to `53`. +- `route_through_private_network` (Boolean) Whether to connect to this resolver over a private network. Must be set when `vnet_id` is set. +- `vnet_id` (String) specify a virtual network for this resolver. Uses default virtual network id if omitted. @@ -132,13 +132,13 @@ Optional: Required: -- `ip` (String) Resolver IP address. +- `ip` (String) The IPv4 or IPv6 address of the upstream resolver. Optional: -- `port` (Number) Resolver port. Defaults to `53`. -- `route_through_private_network` (Boolean) Whether to use a private network. -- `vnet_id` (String) Virtual Network ID. +- `port` (Number) A port number to use for the upstream resolver. Defaults to `53`. +- `route_through_private_network` (Boolean) Whether to connect to this resolver over a private network. Must be set when `vnet_id` is set. +- `vnet_id` (String) specify a virtual network for this resolver. Uses default virtual network id if omitted. diff --git a/internal/sdkv2provider/schema_cloudflare_teams_rules.go b/internal/sdkv2provider/schema_cloudflare_teams_rules.go index 5cb797426a..14ac3820a5 100644 --- a/internal/sdkv2provider/schema_cloudflare_teams_rules.go +++ b/internal/sdkv2provider/schema_cloudflare_teams_rules.go @@ -204,7 +204,7 @@ var teamsRuleSettings = map[string]*schema.Schema{ "resolve_dns_through_cloudflare": { Type: schema.TypeBool, Optional: true, - Description: "Configure whether resolver policy targets Cloudflare DNS.", + Description: "Enable sending queries that match the resolver policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot be set when `dns_resolvers` are specified.", }, "dns_resolvers": { Type: schema.TypeList, @@ -339,7 +339,7 @@ var teamsDnsResolverSettings = map[string]*schema.Schema{ Elem: &schema.Resource{ Schema: teamsDnsResolverAddress, }, - Description: "IPv4 resolvers", + Description: "IPv4 resolvers.", }, "ipv6": { Type: schema.TypeList, @@ -347,7 +347,7 @@ var teamsDnsResolverSettings = map[string]*schema.Schema{ Elem: &schema.Resource{ Schema: teamsDnsResolverAddress, }, - Description: "IPv6 resolvers", + Description: "IPv6 resolvers.", }, } @@ -355,22 +355,22 @@ var teamsDnsResolverAddress = map[string]*schema.Schema{ "ip": { Type: schema.TypeString, Required: true, - Description: "Resolver IP address.", + Description: "The IPv4 or IPv6 address of the upstream resolver.", }, "port": { Type: schema.TypeInt, Optional: true, Default: 53, - Description: "Resolver port.", + Description: "A port number to use for the upstream resolver.", }, "vnet_id": { Type: schema.TypeString, Optional: true, - Description: "Virtual Network ID.", + Description: "specify a virtual network for this resolver. Uses default virtual network id if omitted.", }, "route_through_private_network": { Type: schema.TypeBool, Optional: true, - Description: "Whether to use a private network.", + Description: "Whether to connect to this resolver over a private network. Must be set when `vnet_id` is set.", }, } From 0a5487077b2a193653d588344bab0e64c975ade0 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 3 Apr 2024 00:22:38 +0000 Subject: [PATCH 250/264] Update CHANGELOG.md for #3198 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1722e33dfc..2d9697c3c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ BREAKING CHANGES: ENHANCEMENTS: * datasource/cloudflare_tunnel: Add the option to filter deleted tunnels ([#3201](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3201)) +* resource/cloudflare_teams_rule: Add support for resolver policies ([#3198](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3198)) DEPENDENCIES: From 006552803fdd83eb5fd5dd0c2352ebe2467831e5 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 3 Apr 2024 11:24:28 +1100 Subject: [PATCH 251/264] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d9697c3c1..4b3c5dd034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.29.0 (Unreleased) +## 4.30.0 (Unreleased) + +## 4.29.0 (April 3rd, 2024) BREAKING CHANGES: From e43aa0040b1d846189a822ab673eff14c6c63400 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:01:41 +0000 Subject: [PATCH 252/264] build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b67e81858f..4dcfa49177 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/zclconf/go-cty v1.14.2 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.22.0 + golang.org/x/net v0.23.0 golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect diff --git a/go.sum b/go.sum index 1b022f133d..bdc8d29fcd 100644 --- a/go.sum +++ b/go.sum @@ -222,8 +222,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From d8d854b9fb18e814efdc0e80a3a214cea50aa578 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Apr 2024 23:01:57 +0000 Subject: [PATCH 253/264] add CHANGELOG for #3225 --- .changelog/3225.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3225.txt diff --git a/.changelog/3225.txt b/.changelog/3225.txt new file mode 100644 index 0000000000..26e41a47a1 --- /dev/null +++ b/.changelog/3225.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump golang.org/x/net from 0.22.0 to 0.23.0 +``` From 3d7ce61c5a0bacbf47ed43242b3ec3494baae514 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 3 Apr 2024 23:14:14 +0000 Subject: [PATCH 254/264] Update CHANGELOG.md for #3225 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b3c5dd034..819ce546a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 4.30.0 (Unreleased) +DEPENDENCIES: + +* provider: bump golang.org/x/net from 0.22.0 to 0.23.0 ([#3225](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3225)) + ## 4.29.0 (April 3rd, 2024) BREAKING CHANGES: From 776fea7ce8ca2fedcb435e1cb7a8284b21ff7428 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:03:02 +0000 Subject: [PATCH 255/264] build(deps): bump golang.org/x/net from 0.23.0 to 0.24.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.24.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.24.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 4dcfa49177..b10baedf68 100644 --- a/go.mod +++ b/go.mod @@ -24,9 +24,9 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/pkg/errors v0.9.1 github.com/zclconf/go-cty v1.14.2 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 - golang.org/x/sys v0.18.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/net v0.24.0 + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index bdc8d29fcd..fc3408c7a0 100644 --- a/go.sum +++ b/go.sum @@ -211,8 +211,8 @@ github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -222,8 +222,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -239,12 +239,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From 26c897f14e024db2bd42cd9f6df5d5a00ebccd25 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Apr 2024 23:03:18 +0000 Subject: [PATCH 256/264] add CHANGELOG for #3230 --- .changelog/3230.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3230.txt diff --git a/.changelog/3230.txt b/.changelog/3230.txt new file mode 100644 index 0000000000..623c65e219 --- /dev/null +++ b/.changelog/3230.txt @@ -0,0 +1,3 @@ +```release-note:dependency +provider: bump golang.org/x/net from 0.23.0 to 0.24.0 +``` From ad6815ea9e6da313721f1e1b85832a36f09028a1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 4 Apr 2024 23:39:39 +0000 Subject: [PATCH 257/264] Update CHANGELOG.md for #3230 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 819ce546a5..794ac8c447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ DEPENDENCIES: * provider: bump golang.org/x/net from 0.22.0 to 0.23.0 ([#3225](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3225)) +* provider: bump golang.org/x/net from 0.23.0 to 0.24.0 ([#3230](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3230)) ## 4.29.0 (April 3rd, 2024) From 4935fcc8b32fbe9e860e54f9da720e800ccccbc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:43:46 +0000 Subject: [PATCH 258/264] build(deps): bump the aws group with 2 updates Bumps the aws group with 2 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.10 to 1.27.11 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.10...config/v1.27.11) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.10 to 1.17.11 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/config/v1.17.11/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.17.10...config/v1.17.11) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index b10baedf68..dc23acd449 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/aws/aws-sdk-go-v2 v1.26.1 - github.com/aws/aws-sdk-go-v2/config v1.27.10 - github.com/aws/aws-sdk-go-v2/credentials v1.17.10 + github.com/aws/aws-sdk-go-v2/config v1.27.11 + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 @@ -60,7 +60,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect github.com/aws/smithy-go v1.20.2 // indirect diff --git a/go.sum b/go.sum index fc3408c7a0..e480fce362 100644 --- a/go.sum +++ b/go.sum @@ -15,10 +15,10 @@ github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+ github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/config v1.27.10 h1:PS+65jThT0T/snC5WjyfHHyUgG+eBoupSDV+f838cro= -github.com/aws/aws-sdk-go-v2/config v1.27.10/go.mod h1:BePM7Vo4OBpHreKRUMuDXX+/+JWP38FLkzl5m27/Jjs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.10 h1:qDZ3EA2lv1KangvQB6y258OssCHD0xvaGiEDkG4X/10= -github.com/aws/aws-sdk-go-v2/credentials v1.17.10/go.mod h1:6t3sucOaYDwDssHQa0ojH1RpmVmF5/jArkye1b2FKMI= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= @@ -39,8 +39,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.4 h1:WzFol5Cd+yDxPAdnzTA5LmpHYSWinhmSj4rQChV0ee8= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.4/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= From 8572c8a0913ab8887c47c1b1e8d2cf238d051116 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Apr 2024 23:43:59 +0000 Subject: [PATCH 259/264] add CHANGELOG for #3232 --- .changelog/3232.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changelog/3232.txt diff --git a/.changelog/3232.txt b/.changelog/3232.txt new file mode 100644 index 0000000000..fac4040505 --- /dev/null +++ b/.changelog/3232.txt @@ -0,0 +1,6 @@ +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.10 to 1.27.11 +``` +```release-note:dependency +provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.10 to 1.17.11 +``` From 9d4729157b32434e13c49c156c64fd68604009b1 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Mon, 8 Apr 2024 01:53:21 +0000 Subject: [PATCH 260/264] Update CHANGELOG.md for #3232 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 794ac8c447..b4b9b140a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ DEPENDENCIES: +* provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.10 to 1.27.11 ([#3232](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3232)) +* provider: bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.10 to 1.17.11 ([#3232](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3232)) * provider: bump golang.org/x/net from 0.22.0 to 0.23.0 ([#3225](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3225)) * provider: bump golang.org/x/net from 0.23.0 to 0.24.0 ([#3230](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3230)) From dd07e8cb04490321e2ad21a036725913beb36dc1 Mon Sep 17 00:00:00 2001 From: Russell Kerns Date: Thu, 4 Apr 2024 14:00:02 -0500 Subject: [PATCH 261/264] AUTH-5670 added common_names to access groups to support multiple common_name policies within the same policy --- .changelog/3229.txt | 6 + .../resource_cloudflare_access_group.go | 23 +++- .../resource_cloudflare_access_group_test.go | 110 ++++++++++-------- .../schema_cloudflare_access_group.go | 8 ++ 4 files changed, 96 insertions(+), 51 deletions(-) create mode 100644 .changelog/3229.txt diff --git a/.changelog/3229.txt b/.changelog/3229.txt new file mode 100644 index 0000000000..db72368361 --- /dev/null +++ b/.changelog/3229.txt @@ -0,0 +1,6 @@ +```release-note:enhancement +resource/cloudflare_access_policy: added support for common_names rule list type to allow for more than one common_name rule in a policy block +``` +```release-note:enhancement +resource/cloudflare_access_group: added support for common_names rule list type to allow for more than one common_name rule in a policy block +``` \ No newline at end of file diff --git a/internal/sdkv2provider/resource_cloudflare_access_group.go b/internal/sdkv2provider/resource_cloudflare_access_group.go index 01ddaacc86..be75e74612 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_group.go +++ b/internal/sdkv2provider/resource_cloudflare_access_group.go @@ -372,6 +372,11 @@ func BuildAccessGroupCondition(options map[string]interface{}) []interface{} { group = append(group, cloudflare.AccessGroupDevicePosture{DevicePosture: struct { ID string `json:"integration_uid"` }{ID: value.(string)}}) + + case "common_names": + group = append(group, cloudflare.AccessGroupCertificateCommonName{CommonName: struct { + CommonName string `json:"common_name"` + }{CommonName: value.(string)}}) } } } @@ -417,6 +422,7 @@ func TransformAccessGroupForSchema(ctx context.Context, accessGroup []interface{ authCtxID := "" authCtxIDPID := "" authCtxACID := "" + commonNames := []string{} for _, group := range accessGroup { for groupKey, groupValue := range group.(map[string]interface{}) { @@ -448,8 +454,17 @@ func TransformAccessGroupForSchema(ctx context.Context, accessGroup []interface{ serviceTokens = append(serviceTokens, serviceToken.(string)) } case "common_name": - for _, name := range groupValue.(map[string]interface{}) { - commonName = name.(string) + // if this isn't empty then we know we have multiple common name rules and need to move them to common_names + if commonName != "" { + commonNames = []string{commonName} + commonName = "" + for _, name := range groupValue.(map[string]interface{}) { + commonNames = append(commonNames, name.(string)) + } + } else { + for _, name := range groupValue.(map[string]interface{}) { + commonName = name.(string) + } } case "auth_method": for _, method := range groupValue.(map[string]interface{}) { @@ -641,6 +656,10 @@ func TransformAccessGroupForSchema(ctx context.Context, accessGroup []interface{ groupMap["device_posture"] = devicePostureRuleIDs } + if len(commonNames) > 0 { + groupMap["common_names"] = commonNames + } + data = append(data, groupMap) return data diff --git a/internal/sdkv2provider/resource_cloudflare_access_group_test.go b/internal/sdkv2provider/resource_cloudflare_access_group_test.go index 1e22c5922e..655257deb3 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_group_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_group_test.go @@ -3,13 +3,11 @@ package sdkv2provider import ( "context" "fmt" - "log" "os" "testing" cloudflare "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" - "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" ) @@ -21,53 +19,6 @@ func init() { }) } -func testSweepCloudflareAccessGroups(r string) error { - ctx := context.Background() - - client, clientErr := sharedClient() - if clientErr != nil { - tflog.Error(ctx, fmt.Sprintf("Failed to create Cloudflare client: %s", clientErr)) - } - - // Zone level Access Groups - zoneID := os.Getenv("CLOUDFLARE_ZONE_ID") - zoneAccessGroups, _, err := client.ListAccessGroups(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListAccessGroupsParams{}) - if err != nil { - tflog.Error(ctx, fmt.Sprintf("Failed to fetch zone level Access Groups: %s", err)) - } - - if len(zoneAccessGroups) == 0 { - log.Print("[DEBUG] No Cloudflare zone level Access Groups to sweep") - return nil - } - - for _, accessGroup := range zoneAccessGroups { - if err := client.DeleteAccessGroup(context.Background(), cloudflare.ZoneIdentifier(zoneID), accessGroup.ID); err != nil { - tflog.Error(ctx, fmt.Sprintf("Failed to delete zone level Access Group %s", accessGroup.ID)) - } - } - - // Account level Access Groups - accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") - accountAccessGroups, _, err := client.ListAccessGroups(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.ListAccessGroupsParams{}) - if err != nil { - tflog.Error(ctx, fmt.Sprintf("Failed to fetch account level Access Groups: %s", err)) - } - - if len(accountAccessGroups) == 0 { - log.Print("[DEBUG] No Cloudflare account level Access Groups to sweep") - return nil - } - - for _, accessGroup := range accountAccessGroups { - if err := client.DeleteAccessGroup(context.Background(), cloudflare.AccountIdentifier(accountID), accessGroup.ID); err != nil { - tflog.Error(ctx, fmt.Sprintf("Failed to delete account level Access Group %s", accessGroup.ID)) - } - } - - return nil -} - var ( accountID = os.Getenv("CLOUDFLARE_ACCOUNT_ID") email = "test@example.com" @@ -257,6 +208,9 @@ func TestAccCloudflareAccessGroup_FullConfig(t *testing.T) { resource.TestCheckResourceAttr(name, "include.0.email_domain.0", "example.com"), resource.TestCheckResourceAttr(name, "exclude.0.email.0", email), resource.TestCheckResourceAttr(name, "require.0.email.0", email), + resource.TestCheckResourceAttr(name, "include.0.common_names.0", "common"), + resource.TestCheckResourceAttr(name, "include.0.common_names.1", "name"), + resource.TestCheckNoResourceAttr(name, "include.0.common_name.0"), ), }, }, @@ -389,6 +343,39 @@ func TestAccCloudflareAccessGroup_CreateAfterManualDestroy(t *testing.T) { }) } +func TestAccCloudflareAccessGroup_UpdatedFromCommonNameToCommonNames(t *testing.T) { + var before, after cloudflare.AccessGroup + rnd := generateRandomResourceName() + name := fmt.Sprintf("cloudflare_access_group.%s", rnd) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAccount(t) + }, + ProviderFactories: providerFactories, + CheckDestroy: testAccCheckCloudflareAccessGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCloudflareAccessGroupConfigBasicWithCommonName(rnd, cloudflare.AccountIdentifier(accountID)), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudflareAccessGroupExists(name, cloudflare.AccountIdentifier(accountID), &before), + ), + }, + { + Config: testAccCloudflareAccessGroupConfigBasicWithCommonNames(rnd, cloudflare.AccountIdentifier(accountID)), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudflareAccessGroupExists(name, cloudflare.AccountIdentifier(accountID), &after), + testAccCheckCloudflareAccessGroupIDUnchanged(&before, &after), + resource.TestCheckResourceAttr(name, "include.0.common_names.0", "common"), + resource.TestCheckResourceAttr(name, "include.0.common_names.1", "name"), + resource.TestCheckNoResourceAttr(name, "include.0.common_name.0"), + ), + }, + }, + }) +} + func testAccCloudflareAccessGroupConfigBasic(resourceName string, email string, identifier *cloudflare.ResourceContainer) string { return fmt.Sprintf(` resource "cloudflare_access_group" "%[1]s" { @@ -483,6 +470,7 @@ resource "cloudflare_access_group" "%[1]s" { include { email = ["%[3]s"] email_domain = ["example.com"] + common_names = ["common", "name"] } require { @@ -552,6 +540,30 @@ resource "cloudflare_access_group" "%[2]s" { }`, accountID, rnd, authCtxID, authCtxACID) } +func testAccCloudflareAccessGroupConfigBasicWithCommonName(resourceName string, identifier *cloudflare.ResourceContainer) string { + return fmt.Sprintf(` +resource "cloudflare_access_group" "%[1]s" { + %[2]s_id = "%[3]s" + name = "%[1]s" + + include { + common_name = "common" + } +}`, resourceName, identifier.Type, identifier.Identifier) +} + +func testAccCloudflareAccessGroupConfigBasicWithCommonNames(resourceName string, identifier *cloudflare.ResourceContainer) string { + return fmt.Sprintf(` +resource "cloudflare_access_group" "%[1]s" { + %[2]s_id = "%[3]s" + name = "%[1]s" + + include { + common_names = ["common", "name"] + } +}`, resourceName, identifier.Type, identifier.Identifier) +} + func testAccCheckCloudflareAccessGroupExists(n string, accessIdentifier *cloudflare.ResourceContainer, accessGroup *cloudflare.AccessGroup) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/internal/sdkv2provider/schema_cloudflare_access_group.go b/internal/sdkv2provider/schema_cloudflare_access_group.go index da1ba8f123..49c747a5ba 100644 --- a/internal/sdkv2provider/schema_cloudflare_access_group.go +++ b/internal/sdkv2provider/schema_cloudflare_access_group.go @@ -277,5 +277,13 @@ var AccessGroupOptionSchemaElement = &schema.Resource{ }, }, }, + "common_names": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field.", + }, }, } From e629a5b51dbdebcb13f0f67423da484704f22e64 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 9 Apr 2024 14:24:20 +1000 Subject: [PATCH 262/264] `make docs` --- docs/resources/access_group.md | 3 +++ docs/resources/access_policy.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/resources/access_group.md b/docs/resources/access_group.md index ebd823196f..8c4dc24140 100644 --- a/docs/resources/access_group.md +++ b/docs/resources/access_group.md @@ -90,6 +90,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--include--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) @@ -184,6 +185,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--exclude--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) @@ -278,6 +280,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--require--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) diff --git a/docs/resources/access_policy.md b/docs/resources/access_policy.md index 146c2dd89a..f6360162ae 100644 --- a/docs/resources/access_policy.md +++ b/docs/resources/access_policy.md @@ -96,6 +96,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--include--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) @@ -203,6 +204,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--exclude--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) @@ -297,6 +299,7 @@ Optional: - `azure` (Block List) (see [below for nested schema](#nestedblock--require--azure)) - `certificate` (Boolean) - `common_name` (String) +- `common_names` (List of String) Overflow field if you need to have multiple common_name rules in a single policy. Use in place of the singular common_name field. - `device_posture` (List of String) - `email` (List of String) - `email_domain` (List of String) From 52712d23b7d69649c52b76c08bda923c5d0e874a Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Tue, 9 Apr 2024 14:31:54 +1000 Subject: [PATCH 263/264] fix test sweeper --- .../resource_cloudflare_access_group_test.go | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/internal/sdkv2provider/resource_cloudflare_access_group_test.go b/internal/sdkv2provider/resource_cloudflare_access_group_test.go index 655257deb3..3118819b15 100644 --- a/internal/sdkv2provider/resource_cloudflare_access_group_test.go +++ b/internal/sdkv2provider/resource_cloudflare_access_group_test.go @@ -3,11 +3,13 @@ package sdkv2provider import ( "context" "fmt" + "log" "os" "testing" cloudflare "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/terraform-provider-cloudflare/internal/consts" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" ) @@ -15,10 +17,57 @@ import ( func init() { resource.AddTestSweepers("cloudflare_access_group", &resource.Sweeper{ Name: "cloudflare_access_group", - F: testSweepCloudflareAccessApplications, + F: testSweepCloudflareAccessGroups, }) } +func testSweepCloudflareAccessGroups(r string) error { + ctx := context.Background() + + client, clientErr := sharedClient() + if clientErr != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to create Cloudflare client: %s", clientErr)) + } + + // Zone level Access Groups + zoneID := os.Getenv("CLOUDFLARE_ZONE_ID") + zoneAccessGroups, _, err := client.ListAccessGroups(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListAccessGroupsParams{}) + if err != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to fetch zone level Access Groups: %s", err)) + } + + if len(zoneAccessGroups) == 0 { + log.Print("[DEBUG] No Cloudflare zone level Access Groups to sweep") + return nil + } + + for _, accessGroup := range zoneAccessGroups { + if err := client.DeleteAccessGroup(context.Background(), cloudflare.ZoneIdentifier(zoneID), accessGroup.ID); err != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to delete zone level Access Group %s", accessGroup.ID)) + } + } + + // Account level Access Groups + accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID") + accountAccessGroups, _, err := client.ListAccessGroups(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.ListAccessGroupsParams{}) + if err != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to fetch account level Access Groups: %s", err)) + } + + if len(accountAccessGroups) == 0 { + log.Print("[DEBUG] No Cloudflare account level Access Groups to sweep") + return nil + } + + for _, accessGroup := range accountAccessGroups { + if err := client.DeleteAccessGroup(context.Background(), cloudflare.AccountIdentifier(accountID), accessGroup.ID); err != nil { + tflog.Error(ctx, fmt.Sprintf("Failed to delete account level Access Group %s", accessGroup.ID)) + } + } + + return nil +} + var ( accountID = os.Getenv("CLOUDFLARE_ACCOUNT_ID") email = "test@example.com" From 587e70b4d1f9167fe3509cfeceeb9c7e290227fa Mon Sep 17 00:00:00 2001 From: changelogbot Date: Tue, 9 Apr 2024 05:21:06 +0000 Subject: [PATCH 264/264] Update CHANGELOG.md for #3229 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4b9b140a0..3876b6704e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## 4.30.0 (Unreleased) +ENHANCEMENTS: + +* resource/cloudflare_access_group: added support for common_names rule list type to allow for more than one common_name rule in a policy block ([#3229](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3229)) +* resource/cloudflare_access_policy: added support for common_names rule list type to allow for more than one common_name rule in a policy block ([#3229](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3229)) + DEPENDENCIES: * provider: bump `github.com/aws/aws-sdk-go-v2/config` from 1.27.10 to 1.27.11 ([#3232](https://github.com/cloudflare/terraform-provider-cloudflare/issues/3232))