Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for body_scanning to cloudflare_teams_account #2887

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

webbgeorge
Copy link
Contributor

@webbgeorge webbgeorge commented Oct 26, 2023

Resolves #2374

The teams account configuration APIs and the Go SDK now support Enhanced File Detection (body_scanning), see links below. This PR adds support for this parameter to this provider.

Enhanced file detection: https://developers.cloudflare.com/cloudflare-one/insights/logs/gateway-logs/#enhanced-file-detection
API docs: https://developers.cloudflare.com/api/operations/zero-trust-accounts-get-zero-trust-account-configuration
SDK: https://github.com/cloudflare/cloudflare-go/blob/master/teams_accounts.go#L47 (released in v0.80.0)

In addition to the tests in the this repository, I have tested this change using dev_overrides on a local project with several scenarios, and it behaves as expected.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

changelog detected ✅

@webbgeorge webbgeorge force-pushed the add-body-scanning-config branch from c3095da to 04ebb2e Compare October 26, 2023 15:02
@webbgeorge webbgeorge marked this pull request as ready for review October 26, 2023 15:39
@webbgeorge webbgeorge force-pushed the add-body-scanning-config branch from 04ebb2e to 031ae57 Compare October 26, 2023 15:51
@webbgeorge webbgeorge force-pushed the add-body-scanning-config branch from 031ae57 to 9934d7c Compare October 26, 2023 16:09
@jacobbednarz
Copy link
Member

lgtm, thanks!

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^(TestAccCloudflareAccessPolicy_|TestAccCloudflareTeamsAccounts_)" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareAccessPolicy_ServiceToken
--- PASS: TestAccCloudflareAccessPolicy_ServiceToken (13.62s)
=== RUN   TestAccCloudflareAccessPolicy_AnyServiceToken
--- PASS: TestAccCloudflareAccessPolicy_AnyServiceToken (12.52s)
=== RUN   TestAccCloudflareAccessPolicy_WithZoneID
--- PASS: TestAccCloudflareAccessPolicy_WithZoneID (20.98s)
=== RUN   TestAccCloudflareAccessPolicy_Group
--- PASS: TestAccCloudflareAccessPolicy_Group (12.97s)
=== RUN   TestAccCloudflareAccessPolicy_MTLS
--- PASS: TestAccCloudflareAccessPolicy_MTLS (12.76s)
=== RUN   TestAccCloudflareAccessPolicy_CommonName
--- PASS: TestAccCloudflareAccessPolicy_CommonName (12.31s)
=== RUN   TestAccCloudflareAccessPolicy_EmailDomain
--- PASS: TestAccCloudflareAccessPolicy_EmailDomain (12.48s)
=== RUN   TestAccCloudflareAccessPolicy_Emails
--- PASS: TestAccCloudflareAccessPolicy_Emails (12.79s)
=== RUN   TestAccCloudflareAccessPolicy_Everyone
--- PASS: TestAccCloudflareAccessPolicy_Everyone (12.26s)
=== RUN   TestAccCloudflareAccessPolicy_IPs
--- PASS: TestAccCloudflareAccessPolicy_IPs (15.19s)
=== RUN   TestAccCloudflareAccessPolicy_AuthMethod
--- PASS: TestAccCloudflareAccessPolicy_AuthMethod (12.25s)
=== RUN   TestAccCloudflareAccessPolicy_Geo
--- PASS: TestAccCloudflareAccessPolicy_Geo (12.15s)
=== RUN   TestAccCloudflareAccessPolicy_Okta
--- PASS: TestAccCloudflareAccessPolicy_Okta (11.94s)
=== RUN   TestAccCloudflareAccessPolicy_PurposeJustification
--- PASS: TestAccCloudflareAccessPolicy_PurposeJustification (12.82s)
=== RUN   TestAccCloudflareAccessPolicy_ApprovalGroup
--- PASS: TestAccCloudflareAccessPolicy_ApprovalGroup (13.58s)
=== RUN   TestAccCloudflareAccessPolicy_ExternalEvaluation
--- PASS: TestAccCloudflareAccessPolicy_ExternalEvaluation (12.11s)
=== RUN   TestAccCloudflareAccessPolicy_IsolationRequired
--- PASS: TestAccCloudflareAccessPolicy_IsolationRequired (17.46s)
=== RUN   TestAccCloudflareTeamsAccounts_ConfigurationBasic
--- PASS: TestAccCloudflareTeamsAccounts_ConfigurationBasic (12.29s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	243.248s

@jacobbednarz jacobbednarz merged commit befb317 into cloudflare:master Oct 26, 2023
9 checks passed
@github-actions github-actions bot added this to the v4.18.0 milestone Oct 26, 2023
github-actions bot pushed a commit that referenced this pull request Oct 26, 2023
@webbgeorge webbgeorge deleted the add-body-scanning-config branch October 30, 2023 09:31
Copy link
Contributor

This functionality has been released in v4.18.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add body_scanning option to cloudflare_teams_account (Resource)
2 participants