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 external evaluation as a new access group rule #1625

Merged
merged 9 commits into from May 25, 2022

Conversation

Noanan
Copy link
Contributor

@Noanan Noanan commented May 13, 2022

The new external evaluation access group rule has been added to the Access backend, this PR add this functionality to Terraform to match the backend.

Related necessary Cloudflare-go PR: cloudflare/cloudflare-go#882

@Noanan Noanan requested a review from jacobbednarz as a code owner May 13, 2022 14:46
@github-actions
Copy link
Contributor

Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/docs/changelog-process.md.

Example:

```release-note:TYPE
Release note
```

If you do not require a release note to be included, please add the workflow/skip-changelog-entry label.

@jacobbednarz jacobbednarz added the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label May 15, 2022
@jacobbednarz
Copy link
Member

thanks! can you please add some test coverage to this so that when the upstream change is merged, we can merge this one soon after?

@Noanan Noanan force-pushed the noan/add_external_evaluation branch from 986baa7 to 2613744 Compare May 16, 2022 12:22
@Noanan
Copy link
Contributor Author

Noanan commented May 16, 2022

thanks! can you please add some test coverage to this so that when the upstream change is merged, we can merge this one soon after?

Thanks for the feedback! Just pushed a new commit with tests, documentation and the changelog entry.
Please lmk if anything is missing!

@jacobbednarz
Copy link
Member

i'll give the acceptance tests a run tomorrow first thing. today got away from me with other reviews.

Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Comment on lines 860 to 861
external_evaluation = "example@example.com"
external_evaluation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
external_evaluation = "example@example.com"
external_evaluation {
external_evaluation {

@jacobbednarz
Copy link
Member

acceptance tests all passing with cloduflare-go shimmed in

TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareAccessPolicy_" -count 1 -parallel 1 -timeout 120m -parallel 1
?   	github.com/cloudflare/terraform-provider-cloudflare	[no test files]
=== RUN   TestAccCloudflareAccessPolicy_ServiceToken
--- PASS: TestAccCloudflareAccessPolicy_ServiceToken (19.92s)
=== RUN   TestAccCloudflareAccessPolicy_AnyServiceToken
--- PASS: TestAccCloudflareAccessPolicy_AnyServiceToken (19.34s)
=== RUN   TestAccCloudflareAccessPolicy_WithZoneID
--- PASS: TestAccCloudflareAccessPolicy_WithZoneID (36.14s)
=== RUN   TestAccCloudflareAccessPolicy_Group
--- PASS: TestAccCloudflareAccessPolicy_Group (19.20s)
=== RUN   TestAccCloudflareAccessPolicy_MTLS
--- PASS: TestAccCloudflareAccessPolicy_MTLS (17.97s)
=== RUN   TestAccCloudflareAccessPolicy_CommonName
--- PASS: TestAccCloudflareAccessPolicy_CommonName (18.29s)
=== RUN   TestAccCloudflareAccessPolicy_EmailDomain
--- PASS: TestAccCloudflareAccessPolicy_EmailDomain (18.36s)
=== RUN   TestAccCloudflareAccessPolicy_Emails
--- PASS: TestAccCloudflareAccessPolicy_Emails (18.55s)
=== RUN   TestAccCloudflareAccessPolicy_Everyone
--- PASS: TestAccCloudflareAccessPolicy_Everyone (17.71s)
=== RUN   TestAccCloudflareAccessPolicy_IPs
--- PASS: TestAccCloudflareAccessPolicy_IPs (20.74s)
=== RUN   TestAccCloudflareAccessPolicy_AuthMethod
--- PASS: TestAccCloudflareAccessPolicy_AuthMethod (22.17s)
=== RUN   TestAccCloudflareAccessPolicy_Geo
--- PASS: TestAccCloudflareAccessPolicy_Geo (18.13s)
=== RUN   TestAccCloudflareAccessPolicy_Okta
--- PASS: TestAccCloudflareAccessPolicy_Okta (19.44s)
=== RUN   TestAccCloudflareAccessPolicy_PurposeJustification
--- PASS: TestAccCloudflareAccessPolicy_PurposeJustification (18.93s)
=== RUN   TestAccCloudflareAccessPolicy_ApprovalGroup
--- PASS: TestAccCloudflareAccessPolicy_ApprovalGroup (22.91s)
=== RUN   TestAccCloudflareAccessPolicy_ExternalEvaluation
--- PASS: TestAccCloudflareAccessPolicy_ExternalEvaluation (21.01s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/cloudflare	329.160s
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/changelog-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/maintainer-only-file-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/tf-log-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/version	[no test files]

just pending the upstream merge now.

@Noanan Noanan closed this May 20, 2022
@Noanan Noanan reopened this May 20, 2022
@Noanan
Copy link
Contributor Author

Noanan commented May 20, 2022

Oops, sorry for accidently closing the branch. Just wanted to thank you @jacobbednarz for the tests and changing the markdown.

@jacobbednarz jacobbednarz merged commit 1f9ba2a into cloudflare:master May 25, 2022
@github-actions github-actions bot added this to the v3.16.0 milestone May 25, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2022

This functionality has been released in v3.16.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants