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

Create origin ca data source #2961

Merged
merged 12 commits into from
Nov 26, 2023

Conversation

danquack
Copy link
Contributor

@danquack danquack commented Nov 24, 2023

I love the upgrade to Framework!

testing notes

When creating the data source, I am unable to run the tests though because the provider isn't aware of the resource. Is there some sort of merge process? Do the resources have to be moved too? Happy to do the legwork, just looking for what’s you’ve done in the past.

Close #2526

Copy link
Contributor

github-actions bot commented Nov 24, 2023

changelog detected ✅

@danquack danquack force-pushed the cloudflare-origin-ca branch from b568b41 to 460274d Compare November 24, 2023 16:30
@jacobbednarz
Copy link
Member

I am unable to run the tests though because the provider isn't aware of the resource

the framework structure is individual packages so you need to reference it appropriately for it to run them. examples:

@danquack
Copy link
Contributor Author

I am unable to run the tests though because the provider isn't aware of the resource

the framework structure is individual packages so you need to reference it appropriately for it to run them. examples:

How does this work when we’re talking a resource in sdk and data source in framework? Does the resource have to be migrated?

jacobbednarz and others added 4 commits November 27, 2023 10:08
these aren't a part of the API response once the certificate exists
@jacobbednarz
Copy link
Member

How does this work when we’re talking a resource in sdk and data source in framework? Does the resource have to be migrated?

they don't have to be in the same plugin for actually using it. they are only treated differently internally and running tests.

i went ahead and updated the schema and tests here to get it working. on the schema side, csr and requested_validity don't exist (intentionally) and the tests were a bit out because of the wrong datasource name but it's all passing now.

TF_ACC=1 go test ./internal/framework/service/origin_ca_certificate -v -run "^TestAccCloudflareOriginCACertificateDataSource" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareOriginCACertificateDataSource
=== PAUSE TestAccCloudflareOriginCACertificateDataSource
=== CONT  TestAccCloudflareOriginCACertificateDataSource
--- PASS: TestAccCloudflareOriginCACertificateDataSource (13.24s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/origin_ca_certificate	13.912s

@danquack
Copy link
Contributor Author

danquack commented Nov 26, 2023

makes sense. I totally just copy pasta’d those, trying to get it to run, so thanks for making the code not suck so much!

@jacobbednarz jacobbednarz merged commit ffb4cf4 into cloudflare:master Nov 26, 2023
8 checks passed
@jacobbednarz
Copy link
Member

thanks for getting this one over the line! 🏅

@github-actions github-actions bot added this to the v4.20.0 milestone Nov 26, 2023
github-actions bot pushed a commit that referenced this pull request Nov 26, 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
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.

Need a data source for cloudflare_origin_ca_certificate
2 participants