Versio 0.7.7 and Version 0.7.10
Please list the resources as a list, for example:
resource "cloudflare_record" "my_record" {
domain = "<MY_DOMAIN>"
name = "*.<MY_DOMAIN>"
value = "<MY_VALUE>"
type = "CNAME"
ttl = 1
}
`cloudflare_record.my_record: Creating...
domain: "" => "
hostname: "" => "
name: "" => "*.
proxied: "" => "false"
ttl: "" => "1"
type: "" => "CNAME"
value: "" => "
zone_id: "" => "
Error applying plan:
1 error(s) occurred:
The record should be updated.
Terraform failed and did not update the record
terraform plan@ahosking Ohai! Is this record already managed in terraform, or had you created it manually in Cloudflare ahead of time?
I think cloudflare records need terraform import support in order to handle the second case.
I'm not so sure if this ticket is the place, but +1 from me for the cloudflare records terraform import support. This "Can not update as it already exists" error is quite annoying.
+1 from me as well. Currently facing the same issue mentioned in this issue while trying to manage a zone in CloudFlare that had records created via the UI.
@mwarkentin The flow to get to this point was;
Terraform import would definitely help here, but it's strange that when created with Terraform it would lose management of itself. I suspect a change was made to it in the GUI that threw Terraform out but can't verify at the moment.
Probably a duplicate of #7690
This is closed via #10910
This resolved?
I'm having the same problem, what's the solution ????
This is still happening in Terraform 0.11.7
It's happening for me with Terraform v0.11.10 and provider.cloudflare v1.7.0 when I have a 2 type A subdomain entries for 2 different IPs and, for some reason, the IPs change order. I think the provider should detect this situation and not try to apply any changes.
I'm having this issue with Terraform 0.12.6 (and Cloudflare provider 1.17.1) after following: https://www.sergeydotnet.com/using-terraform-with-azure-devops/. Can create new records but when I try and change the value of one of them it can't update it because the record already exists.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
It's happening for me with Terraform v0.11.10 and provider.cloudflare v1.7.0 when I have a 2 type A subdomain entries for 2 different IPs and, for some reason, the IPs change order. I think the provider should detect this situation and not try to apply any changes.