-
Notifications
You must be signed in to change notification settings - Fork 100
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
DXE-3390 Modifying a DNS TXT record with multiple values shows incorrect plan output #499
Comments
Hi @brucep-care Thanks for reporting that issue, we will investigate it and come back to you. BR, |
Hi @brucep-care we are not able to reproduce this issue. With recent 5.5.0 release we introduced some changes in this area. Please kindly test it with new version and let us know if it is still and issue for you. |
@lkowalsk-akamai-com well this is something I've never encountered before. We actually use terraform's JSON configuration syntax in-house. We have a suite of our own tools that generates JSON that we then feed to terraform. When I encountered this bug it was while using our JSON environment, but the report I filed included HCL that I put together but didn't actually test, assuming it would generate the same result. Well it doesn't. Here's the HCL that corresponds to the TXT record for our
The above HCL shows that terraform wants to make the correct change:
Now, this is what the same thing looks like in JSON. This is the current state of the DNS record in question, so
If I edit the JSON file to modify the SPF record as I did with the HCL above then it shows the wrong records being modified:
Given this behavior I now wonder if it's a bug in terraform itself that we're running into. I would expect it to ingest the HCL And JSON identically. We're currently on 1.3.7 and it looks like 1.6.6 is the current version. |
I just tested this with version 1.6.6 of terraform and it's showing the same issue when using JSON:
So I'm back to thinking this might still be a bug in the Akamai provider, just when using JSON input as opposed to HCL input. |
Thank you for the additional details. We are still working on this and will let you know once we find a solution. |
Hi @brucep-care, this issue should be fixed in the recent release. |
Hi @mgwoj. Thanks for letting me know. I just tested the above and it does appear to be resolved. However there still appears to be an issue. I just tested this out with apex TXT record for our primary domain care.com which is more complex than the one I used when submitting the original bug report. Please let me know if you'd like me to open a new issue with the details of our care.com zone record or if I should add it as another comment to this one. Edit: This particular case appears to revolve around a TXT string that is greater than 255 characters. To work around that character limit it's common to quote the string, so in Terraform the target can look something like this:
That's the part of the terraform record that defines our SPF record , and since it's > 255 characters it's split into two quoted & escaped strings that are enclosed in another set of quotes. This is exactly how the record was generated by the Akamai CLI when I invoked If I delete that line from the terraform configuration then the provider does appear to modify the record properly. With that line in the configuration it results in more invalid changes to the other records. |
Hello, Please be so kind a create a new issue |
We are seeing an issue with DNS records where an attempt to modify a list of values fails. Take for example, a TXT record for example.com that contains two distinct values:
Try to edit one of these entires, say by adding
include:mail.zendesk.com
into the second value. The resulting plan output is completely wrong. See below for details.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Output
Expected Behavior
The first value (
mandrill_verify.abcdefghijklmnop
) should remain unchanged.The second value (
v=spf1...
) should be replaced with a new value containing the desired change.Actual Behavior
The provider is attempting to add a second copy of the first value, and completely delete the second value.
Steps to Reproduce
terraform plan
and observe the proposed changes.The text was updated successfully, but these errors were encountered: