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

Need a data source for cloudflare_origin_ca_certificate #2526

Closed
lra opened this issue Jun 14, 2023 · 7 comments · Fixed by #2961
Closed

Need a data source for cloudflare_origin_ca_certificate #2526

lra opened this issue Jun 14, 2023 · 7 comments · Fixed by #2961
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. kind/new-data-source Categorizes issue or PR as related to needing to create a datasource. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@lra
Copy link

lra commented Jun 14, 2023

Current Terraform and Cloudflare provider version

Terraform v1.5.0
on darwin_arm64
+ provider registry.terraform.io/cloudflare/cloudflare v4.8.0

Description

Since cloudflare v4.8.0, the csr is a required property of the cloudflare_origin_ca_certificate resource.
This is preventing us to keep track of our cloudflare_origin_ca_certificate with terraform as we don't have the CSR that we used to create those certs, and there is no way to recover them.
In the state, the csr property is set to null and any terraform plan leads to:

│ Error: Missing required argument
│ 
│   on ../../modules/seismic-global-service/cloudflare.tf line 259, in resource "cloudflare_origin_ca_certificate" "seismic_origin_server_cert":
│  259: resource "cloudflare_origin_ca_certificate" "seismic_origin_server_cert" {
│ 
│ The argument "csr" is required, but no definition was found.

Use cases

To solve this issue, we would like to see a data source for cloudflare_origin_ca_certificate so we can keep track of and reference our cloudflare_origin_ca_certificate without having to state the csr.

Potential Terraform configuration

data "cloudflare_origin_ca_certificate" "example" {
    id = "1234567890"
}

References

The csr requirement was introduced in #2496

@lra lra added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 14, 2023
@lra lra changed the title Need a data source for cloudflare_origin_ca_certificate Need a data source for cloudflare_origin_ca_certificate Jun 14, 2023
@github-actions
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@jacobbednarz jacobbednarz added kind/new-data-source Categorizes issue or PR as related to needing to create a datasource. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 14, 2023
@ruimarinho
Copy link
Contributor

What I did to workaround this was to generate a dummy CSR and manually import the state so that the provider doesn't complain about a missing one. This kind of breaking change shouldn't make it to a minor release though.

@LanceSandino
Copy link

We're running into this issue as well.
Adding the CSR forces creating the cert again, which we'd prefer not to do.

We created the cert in the GUI and cloudflare manages the CSR.

@LanceSandino
Copy link

Still waiting on an update for this.

@LanceSandino
Copy link

Hi bump... any progress on this?

@nateSias
Copy link

Hitting this problem. Any further thoughts?

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
kind/enhancement Categorizes issue or PR as related to improving an existing feature. kind/new-data-source Categorizes issue or PR as related to needing to create a datasource. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants