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

Remove region from turnstile update #4496

Merged

Conversation

Cyb3r-Jak3
Copy link
Contributor

@Cyb3r-Jak3 Cyb3r-Jak3 commented Nov 3, 2024

Removes region from update as it is not listed in the API docs. Marks it as force recreate on update to it.

Fixes: #4217

Copy link
Contributor

github-actions bot commented Nov 3, 2024

changelog detected ✅

@Cyb3r-Jak3
Copy link
Contributor Author

Most of the tests pass for me:

TF_ACC=1 go test ./internal/framework/service/turnstile/ -v -run "^TestAccCloudflare" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareTurnstileWidget_Basic
=== PAUSE TestAccCloudflareTurnstileWidget_Basic
=== RUN   TestAccCloudflareTurnstileWidget_Minimum
=== PAUSE TestAccCloudflareTurnstileWidget_Minimum
=== CONT  TestAccCloudflareTurnstileWidget_Basic
--- PASS: TestAccCloudflareTurnstileWidget_Basic (2.39s)
=== CONT  TestAccCloudflareTurnstileWidget_Minimum
--- PASS: TestAccCloudflareTurnstileWidget_Minimum (1.68s)
PASS
ok      github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/turnstile        4.083s

If I run TestAccCloudflareTurnstileWidget_NoDomains I get,

=== CONT  TestAccCloudflareTurnstileWidget_NoDomains
    resource_test.go:118: Step 1/2 error: Error running apply: exit status 1

        Error: Error creating challenge widget

          with cloudflare_turnstile_widget.zxoheflslb,
          on terraform_plugin_test.tf line 12, in resource "cloudflare_turnstile_widget" "zxoheflslb":
          12:   resource "cloudflare_turnstile_widget" "zxoheflslb" {

        error from makeRequest: invalid value for `domains`: not entitled to use
        empty list
--- FAIL: TestAccCloudflareTurnstileWidget_NoDomains (0.53s)

guessing my testing account doesn't have the entitlement needed.

@jacobbednarz
Copy link
Member

@punkeel when you can

@jacobbednarz
Copy link
Member

acceptance tests all passing here

$ TF_ACC=1 go test ./internal/framework/service/turnstile/ -run "^TestAcc" -count 1 -v

=== RUN   TestAccCloudflareTurnstileWidget_Basic
=== PAUSE TestAccCloudflareTurnstileWidget_Basic
=== RUN   TestAccCloudflareTurnstileWidget_Minimum
=== PAUSE TestAccCloudflareTurnstileWidget_Minimum
=== RUN   TestAccCloudflareTurnstileWidget_NoDomains
=== PAUSE TestAccCloudflareTurnstileWidget_NoDomains
=== CONT  TestAccCloudflareTurnstileWidget_Basic
=== CONT  TestAccCloudflareTurnstileWidget_NoDomains
=== CONT  TestAccCloudflareTurnstileWidget_Minimum
--- PASS: TestAccCloudflareTurnstileWidget_Minimum (3.44s)
--- PASS: TestAccCloudflareTurnstileWidget_Basic (3.52s)
--- PASS: TestAccCloudflareTurnstileWidget_NoDomains (4.44s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/turnstile	5.685s

@jacobbednarz jacobbednarz merged commit c31d080 into cloudflare:master Nov 5, 2024
2 checks passed
@github-actions github-actions bot added this to the v4.46.0 milestone Nov 5, 2024
@Cyb3r-Jak3 Cyb3r-Jak3 deleted the remove-region-from-turnstile branch November 5, 2024 01:55
Copy link
Contributor

This functionality has been released in v4.46.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 Nov 13, 2024
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.

Issue updating domains list for cloudflare_turnstile_widget
3 participants