Skip to content

cloudflare_record -> cloudflare_dns_record v5 #7072

Description

@barapz

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

  • OpenTofu version: (1.11.6)
  • Cloudflare provider: v4.52.5 → v5.19.0

Affected resource(s)

cloudflare_dns_record

Terraform configuration files

resource "cloudflare_dns_record" "xyz" {
  zone_id = var.cf_zone_id
  name    = ""
  content = ""
  type    = "CNAME"
  proxied = true
  ttl     = 1
}

Link to debug output


Panic output

no schema available for cloudflare_record.xyz while reading state; this is a bug in OpenTofu and should be reported

Expected output

Automatic migration should be sucessfull.

Actual output

see Panic

Steps to reproduce

Steps to Reproduce

  1. Have a resource of type cloudflare_record managed in state (Cloudflare provider v4)
  2. Upgrade to Cloudflare provider v5 (which renames it to cloudflare_dns_record)
  3. Add a moved{ from = cloudflare_record.xyz}
  4. Run terraform plan

Additional factoids

Only known workaround that I've found is removing from the tfstate completely and re-importing by ID - which is quite the hassle.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions