Skip to content

Importing cloudflare_certificate_pack doesn't import configuration into state file. #6376

@tpickett66

Description

@tpickett66

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 -v
Terraform v1.13.4
on darwin_arm64
+ provider registry.terraform.io/cloudflare/cloudflare v5.11.0
+ provider registry.terraform.io/hashicorp/aws v6.18.0

Affected resource(s)

cloudflare_certificate_pack

Terraform configuration files

import {
  id = "my-zone-id/my-pack-id"
  to = cloudflare_certificate_pack.my_pack
}

resource "cloudflare_certificate_pack" "data-dev" {
  certificate_authority = "lets_encrypt"
  hosts                 = ["*.subdomain.zone.com", "subdomain.zone.com"]
  type                  = "advanced"
  validation_method     = "txt"
  validity_days         = 90
  zone_id               = "my-zone-id"
}

Link to debug output

Logs won't help this

Panic output

No response

Expected output

I expected the imported certificate pack to have the existing configuration shown by the api.

Actual output

All fields are blank in the state file forcing a replacement of the resource after being imported.

Steps to reproduce

  1. Create a certificate pack using the UI
  2. Import the certificate pack into Terraform
  3. Embrace the sadness.

Additional factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triage/needs-informationIndicates an issue needs more information in order to work on it.version/5Categorizes issue or PR as related to version 5 of the provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions