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

upgraded to rc1- Unable to Read Previously Saved State for UpgradeResourceState #4888

Closed
3 tasks done
ibigbug opened this issue Jan 14, 2025 · 2 comments
Closed
3 tasks done
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.

Comments

@ibigbug
Copy link

ibigbug commented Jan 14, 2025

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

Updates cloudflare/cloudflare from 5.0.0-alpha1 to 5.0.0-rc1

Affected resource(s)

resource "cloudflare_dns_record"

Terraform configuration files

resource "cloudflare_dns_record" "ipv4" {
  zone_id = var.cloudflare_zone_id
  name    = var.dns_name
  content = var.ipv4_address
  type    = "A"
  ttl     = 1
  proxied = false
}

Link to debug output

https://gist.github.com/ibigbug/a60e2412ff86d7415e47a50abe9c1613

Panic output

Error: Unable to Read Previously Saved State for UpgradeResourceState

│ with module.nodes["westus"].module.dns[0].cloudflare_dns_record.ipv6,
│ on ../modules/cloudflare/main.tf line 10, in resource "cloudflare_dns_record" "ipv6":
│ 10: resource "cloudflare_dns_record" "ipv6" {

│ There was an error reading the saved resource state using the current resource schema.

│ If this resource state was last refreshed with Terraform CLI 0.11 and earlier, it must be refreshed or applied with
│ an older provider version first. If you manually modified the resource state, you will need to manually modify it to
│ match the current resource schema. Otherwise, please report this to the provider developer:

│ AttributeName("settings"): invalid JSON, expected "{", got "{}"

Expected output

should not fail

Actual output

failed

Steps to reproduce

  1. create cloudflare_dns_record with 5.0.0-alpha1
  2. upgrade to 5.0.0-rc1
  3. run terraform plan

Additional factoids

No response

References

No response

@ibigbug ibigbug 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 Jan 14, 2025
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.

@github-actions github-actions bot added the triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. label Jan 14, 2025
@jacobbednarz
Copy link
Member

there has been significant changes in the resources between alpha1 and rc1. i wouldn't recommend an in place upgrade but instead, recreate or reimport the resources to eliminate any weirdness or issues going forward.

@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Development

No branches or pull requests

2 participants