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

Export Custom Hostname Certificate Validation TXT name/value and retain records in state #1197

Closed
jjtroberts opened this issue Sep 15, 2021 · 2 comments
Labels
lifecycle/stale workflow/pending-op-response Indicates an issue or PR requires a response from the original poster.

Comments

@jjtroberts
Copy link

Current Terraform and Cloudflare provider version

Terraform v1.0.0
on darwin_amd64

cloudflare = {
source = "cloudflare/cloudflare"
version = "2.26.1"
}

Description

The current provider exports the ownership_verification.value but not the Certificate validation TXT name or Certificate validation TXT value.

It also appears to be the case that once the ownership record is validated, it is no longer available as part of the state which means I can no longer refer to the value as expected using cloudflare_custom_hostname.foo. ownership_verification.value

Terraform detected the following changes made outside of Terraform since the last "terraform apply":

  # module.foo.cloudflare_custom_hostname.foo_org has been changed
  ~ resource "cloudflare_custom_hostname" "foo_org" {
        id                          = "xxxxxxxxx"
      ~ ownership_verification      = {
          ~ "name"  = "_cf-custom-hostname.foo.org" -> ""
          ~ "type"  = "txt" -> ""
          ~ "value" = "xxxxxxxxx" -> ""
        }
      ~ ownership_verification_http = {
          ~ "http_body" = "xxxxxxxxx" -> ""
          ~ "http_url"  = "http://foo.org/.well-known/cf-custom-hostname-challenge/xxxxxxxxx" -> ""

Use cases

For clients who manage DNS elsewhere, I need to be able to create their custom hostname at Cloudflare, retrieve the exported DCV records for both domain ownership and certificate validation, and then use those values in another module to fully automate DNS record management.

Potential Terraform configuration

...

References

No response

@jjtroberts jjtroberts 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 Sep 15, 2021
@jacobbednarz
Copy link
Member

jacobbednarz commented Feb 12, 2022

does #1424 solve for you use case here? you can pull it locally to confirm as it is not yet released.

@jacobbednarz jacobbednarz added workflow/pending-op-response Indicates an issue or PR requires a response from the original poster. and removed 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 Feb 12, 2022
@jjtroberts
Copy link
Author

@jacobbednarz I no longer work at the company where I encountered this issue. I've reached out to two of my former team members asking them to respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale workflow/pending-op-response Indicates an issue or PR requires a response from the original poster.
Projects
None yet
Development

No branches or pull requests

2 participants