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 total string length needs to be updated from 1024 to 4096 #24152

Closed
1 task done
abhinavkumar7 opened this issue Dec 7, 2023 · 2 comments · Fixed by #24169
Closed
1 task done

DNS total string length needs to be updated from 1024 to 4096 #24152

abhinavkumar7 opened this issue Dec 7, 2023 · 2 comments · Fixed by #24169

Comments

@abhinavkumar7
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.6.5

AzureRM Provider Version

3.83.0

Affected Resource(s)/Data Source(s)

azurerm_dns_txt_record

Terraform Configuration Files

resource "azurerm_dns_txt_record" "spf_example_com" {
  name                = "spf"
  zone_name           = data.azurerm_dns_zone.my_zone.name
  resource_group_name = data.azurerm_dns_zone.my_zone.resource_group_name
  ttl                 = 3600
  record {
    value = "v=spf1..........." #More than 1024 characters here
  }
}

Debug Output/Panic Output

Error: expected length of record.0.value to be in the range (1 - 1024)

Expected Behaviour

The Terraform configuration for Azure TXT record with more than 1024 characters in value should not have given error.

Actual Behaviour

Following error is generated, when the string length for Azure DNS TXT record goes beyond 1024:

Error: expected length of record.0.value to be in the range (1 - 1024)

Steps to Reproduce

1.) Add the config suggested in this Issue.
2.) Run Terraform Validate.
3.) Terraform throws error.

Important Factoids

No response

References

The multiple strings in a DNS record shouldn't be confused with the multiple TXT records in a TXT record set. A TXT record set can contain multiple records, each of which can contain multiple strings. Azure DNS supports a total string length of up to 4096 characters* in each TXT record set (across all records combined).

@mikemadeja
Copy link
Contributor

mikemadeja commented Dec 8, 2023

Hello, I created a pull request updated it to 4096. I think it should be ok even if National clouds are still set at 1024. I assume the response to going over that limit would respond with that but I can't test it.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants