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

Updates to cloudflare_record resources don't work when using deprecated value field #3890

Closed
3 tasks done
zackpollard opened this issue Sep 3, 2024 · 4 comments
Closed
3 tasks done
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@zackpollard
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

4.39.0 and 4.40.0 both exhibit this behaviour

Affected resource(s)

cloudflare_record

Terraform configuration files

resource "cloudflare_record" "immich_app_release_domain" {
  name = "a.update.test.example.org"
  proxied = true
  ttl = 1
  type = "CNAME"
  value = "test.example.org"
  zone_id = var.zone_id
}

Link to debug output

https://gist.github.com/zackpollard/85c3a4922e9d5221b12dcbd61749a147

Panic output

No crash

Expected output

The dns record to change in cloudflare.

Actual output

The dns record value remains unchanged, terraform completes successfully and without manual inspection you wouldn't know what had happened.

Steps to reproduce

  1. Create resource given above
  2. Alter resource value
  3. Apply changes
  4. Apply changes again and see that terraform tries to update it for a second time
  5. Check dashboard, record is not updated.

Additional factoids

It looks like this may be fixed in main, but not yet released (link included in references). I would like to request a new provider is released ASAP. The current behavior where the value field that was the recommended method up to two releases ago, silently fails to update, is very scary. I'm surprised a bugfix version wasn't immediately released, this could be breaking production deployments all over the place without people realising what is going on.

References

e4e87a2

@zackpollard zackpollard 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 Sep 3, 2024
Copy link
Contributor

github-actions bot commented Sep 3, 2024

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 Sep 3, 2024
@zackpollard
Copy link
Contributor Author

Sorry, just noticed the debug logs are from 4.39.0 as I was testing which previous versions were also affected. If you would like me to attach logs from 4.40.0 I can do that, but the bug absolutely still exists in that version.

@jacobbednarz
Copy link
Member

this is already fixed by #3776 and will be released with the next mainline release based on https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/release-process.md

if you want to use the fix immediately, you can build a custom version following the docs at https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/using-non-released-versions.md

@jacobbednarz jacobbednarz added triage/duplicate Indicates an issue is a duplicate of other open issue. and removed 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. labels Sep 3, 2024
@zackpollard
Copy link
Contributor Author

this is already fixed by #3776 and will be released with the next mainline release based on https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/release-process.md

if you want to use the fix immediately, you can build a custom version following the docs at https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/using-non-released-versions.md

Right, I'm just surprised this isn't deemed as needing a hotfix. The two latest versions out there right now won't update DNS records values if you were using the previously accepted value property. That seems like a pretty serious bug and the worst part is terraform succeeds and says the resource was updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

2 participants