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

when geo_restrictions aren't set, set as nil and not empty string #2319

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

nickysemenza
Copy link
Member

@nickysemenza nickysemenza commented Mar 22, 2023

previously, we would send geo_restrictions":{"label":""}, now we won't send anything at all.

Closes #2318
Closes #1472

@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2023

changelog detected ✅

previously, we would send `geo_restrictions":{"label":""}`, now we won't send anything at all.

Resolves cloudflare#2318

```release-note:bug
resource/cloudflare_custom_ssl: fix json sent to API when geo_restrictions are not used (cloudflare#1472, cloudflare#2318)
```
nickysemenza added a commit to nickysemenza/cloudflare-go that referenced this pull request Mar 23, 2023
…like in the request struct

noticed this while working on cloudflare/terraform-provider-cloudflare#2319 but this isn't a requirement for that.
@nickysemenza nickysemenza force-pushed the nicky/custom-cert-no-geo branch from 5778016 to 07a8305 Compare March 23, 2023 20:01
@nickysemenza
Copy link
Member Author

note that there is this test here: https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/internal/sdkv2provider/resource_cloudflare_custom_ssl_test.go#L113 but the API returns the same value regardless of if you send empty string or nil (before/after) this change, so we have an internal ticket to adjust that.

@nickysemenza nickysemenza marked this pull request as ready for review March 23, 2023 20:04
@jacobbednarz
Copy link
Member

acceptance tests all look good

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareCustomSSL_" -timeout 120m -parallel 1
=== RUN   TestAccCloudflareCustomSSL_Basic
--- PASS: TestAccCloudflareCustomSSL_Basic (16.10s)
=== RUN   TestAccCloudflareCustomSSL_WithEmptyGeoRestrictions
--- PASS: TestAccCloudflareCustomSSL_WithEmptyGeoRestrictions (12.50s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	29.593s

@jacobbednarz jacobbednarz merged commit cc59935 into cloudflare:master Mar 24, 2023
@github-actions github-actions bot added this to the v4.3.0 milestone Mar 24, 2023
github-actions bot pushed a commit that referenced this pull request Mar 24, 2023
nickysemenza added a commit to nickysemenza/cloudflare-go that referenced this pull request Mar 28, 2023
…like in the request struct

noticed this while working on cloudflare/terraform-provider-cloudflare#2319 but this isn't a requirement for that.
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

This functionality has been released in v4.3.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 Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants