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

DNS record change is not reflected in Cloudflare #7690

Closed
makered opened this issue Jul 18, 2016 · 11 comments
Closed

DNS record change is not reflected in Cloudflare #7690

makered opened this issue Jul 18, 2016 · 11 comments

Comments

@makered
Copy link

makered commented Jul 18, 2016

Terraform: v0.6.16
Resource: cloudflare_record

I was able to successfully create a CNAME record on Cloudflare. Later I needed to change the DNS name so I modified the name attribute and applied the change. Result was:

module.elb.cloudflare_record.cf_dns_record_elb: Modifying...
  name: "oldname" => "newname"
module.elb.cloudflare_record.cf_dns_record_elb: Modifications complete

However, the Cloudflare record was unaltered and the output showed:

Outputs:
  cloudflare_elb_fqdn       = oldname.mydomain.com

HCL:

variable "dns_hostname" {
  description = "ELB DNS hostname"
  default = "newname"
}
resource "cloudflare_record" "cf_dns_record_elb" {
  domain = "${var.cloudflare_domain}"
  name = "${var.dns_hostname}"
  value = "${aws_elb.elb.dns_name}"
  type = "CNAME"
}
output "cloudflare_elb_fqdn" {
  value = "${cloudflare_record.cf_dns_record_elb.hostname}"
}
@catufunwa
Copy link

I'm still running into this bug with the cloudflare provider on v0.7.3. Is it me or has the cloudflare provider been really flaky the last few version?

@jlgeering
Copy link

issue still present in Terraform v0.7.13

@joshuajabbour
Copy link

joshuajabbour commented Dec 8, 2016

I can confirm this is present in 0.7.13. The only workaround I have found is to comment out the individual cloudflare_record block so it's destroyed and then uncomment it so it's created anew with the proper name. Takes two applies, sadly. Unfortunately, there's no lifecycle option to force recreation in this manner.

Update: Also, after testing, some of the values do get updated, like ttl. Just not the name value for some reason.

@mwarkentin
Copy link
Contributor

Also ran into this on 0.7.13 - wonder if taint would work to force a destroy + recreate?

@mwarkentin
Copy link
Contributor

Opened cloudflare/cloudflare-go#97 to try and figure out if this is an issue with the upstream library.

@mwarkentin
Copy link
Contributor

It looks like this may just be an issue with the upstream Cloudflare library: cloudflare/cloudflare-go#97 (comment)

Trying to work with their engineer on a fix here: cloudflare/cloudflare-go#98

@mwarkentin
Copy link
Contributor

Tested the fix in cloudflare/cloudflare-go#98, seems to have fixed the issue when using the cloudflare-go library directly - I assume that'll fix the terraform issue as well.

@mwarkentin
Copy link
Contributor

@stack72 @catsby The fix for this has been merged upstream - not sure what needs to be done to update the vendored lib. Let me know if there's anything there I can do to help get this closed.

mwarkentin added a commit to mwarkentin/terraform that referenced this issue Dec 22, 2016
There was an upstream fix to allow updating of DNS record name fields.

A few other comment updates, but that's it.
@stack72
Copy link
Contributor

stack72 commented Dec 24, 2016

Hi @makered - this is closed via #10910

@makered
Copy link
Author

makered commented Dec 24, 2016

Perfect, thank you so much for the fix!!!

@ghost
Copy link

ghost commented Apr 18, 2020

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.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants