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

Fix ASN and Hostname list items #2951

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

Cyb3r-Jak3
Copy link
Contributor

Fixes issues preventing usage of asn or hostname as cloudflare_list_item resources.

ASN fails because the ASN number is provider as an int and getSearchTerm was typecasting as a string.

Hostname fails because it is hostname is a block and not a string.

Adds unit tests for both kinds of list_item to prevent future issues.

Copy link
Contributor

changelog detected ✅

@jacobbednarz
Copy link
Member

thanks! acceptance tests look good

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareListItem_" -count 1 -timeout 120m -parallel 1

=== RUN   TestAccCloudflareListItem_Basic
--- PASS: TestAccCloudflareListItem_Basic (16.06s)
=== RUN   TestAccCloudflareListItem_MultipleItems
--- PASS: TestAccCloudflareListItem_MultipleItems (20.58s)
=== RUN   TestAccCloudflareListItem_Update
--- PASS: TestAccCloudflareListItem_Update (22.94s)
=== RUN   TestAccCloudflareListItem_BadListItemType
--- PASS: TestAccCloudflareListItem_BadListItemType (5.56s)
=== RUN   TestAccCloudflareListItem_ASN
--- PASS: TestAccCloudflareListItem_ASN (13.26s)
=== RUN   TestAccCloudflareListItem_Hostname
--- PASS: TestAccCloudflareListItem_Hostname (13.36s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	92.969s

@jacobbednarz jacobbednarz merged commit 80cf15d into cloudflare:master Nov 20, 2023
9 checks passed
@github-actions github-actions bot added this to the v4.20.0 milestone Nov 20, 2023
github-actions bot pushed a commit that referenced this pull request Nov 20, 2023
Copy link
Contributor

This functionality has been released in v4.20.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 28, 2023
@Cyb3r-Jak3 Cyb3r-Jak3 deleted the fix-asn-hostname-list-item branch November 28, 2023 22:27
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.

2 participants