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

cloudflare_certificate_pack certificate_authority validation is missing ssl_com #4266

Closed
3 tasks done
lneves75 opened this issue Oct 10, 2024 · 3 comments · Fixed by #4267
Closed
3 tasks done

cloudflare_certificate_pack certificate_authority validation is missing ssl_com #4266

lneves75 opened this issue Oct 10, 2024 · 3 comments · Fixed by #4267
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.
Milestone

Comments

@lneves75
Copy link
Contributor

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.9.7
on darwin_arm64
+ provider registry.terraform.io/cloudflare/cloudflare v4.43.0

Affected resource(s)

cloudflare_certificate_pack

Terraform configuration files

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 4.0"
    }
  }
}

data "cloudflare_zone" "example" {
  name = "example.com"
}

resource "cloudflare_certificate_pack" "example" {
  zone_id               = data.cloudflare_zone.example.id
  type                  = "advanced"
  hosts                 = ["foo.example.com", "*.foo.example.com"]
  validation_method     = "txt"
  validity_days         = 30
  certificate_authority = "ssl_com"
  cloudflare_branding   = false
}

Link to debug output

https://gist.github.com/lneves75/a727c30dd4f942ae90dea7b068af1d6a

Panic output

No response

Expected output

Resource plan showing resource creation using the configured CA

Actual output

The CA is not present in the slice provided to the validation function used in this attribute.
That causes the plan to fail with a validation error.

Steps to reproduce

  1. Create an empty directory
  2. Create a file named main.tf with the terraform code shown above
  3. Run terraform init -upgrade && terraform plan

Additional factoids

When creating the advanced certificate in Cloudflare's dashboard following the documentation instructions, it's possible to use ssl.com as an CA for the certificate.
When querying the API endpoint to list SSL certificates for the target zone, that certificate shows having that CA.

			"created_on": "2024-10-10T13:36:02.007627Z",
			"validity_days": 90,
			"validation_method": "txt",
			"certificate_authority": "ssl_com"

References

No response

@lneves75 lneves75 added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 10, 2024
Copy link
Contributor

Terraform debug log detected ✅

@github-actions github-actions bot added the triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. label Oct 10, 2024
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.

lneves75 added a commit to lneves75/terraform-provider-cloudflare that referenced this issue Oct 10, 2024
@github-actions github-actions bot added this to the v4.44.0 milestone Oct 13, 2024
Copy link
Contributor

This functionality has been released in v4.44.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 Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.
Projects
None yet
1 participant