Route53 doesn't validate TXT record lengths
#14.941 aperta il 1 set 2020
Metriche repository
- Star
- (11.045 stelle)
- Metriche merge PR
- (Merge medio 19g 21h) (251 PR mergiate in 30 g)
Descrizione
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 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
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform AWS Provider Version
Terraform v0.13.1
Affected Resource(s)
- aws_route53_record
Terraform Configuration Files
resource "aws_route53_record" "google_mail_dkim2" {
zone_id = aws_route53_zone.segmed_ai.zone_id
name = "google._domainkey"
type = "TXT"
ttl = "1799"
records = [
"v=DKIM1; k=rsa; p=verylongthinggoes........................................................................................................................................................................................................................................................................here"
]
}
Debug Output
Panic Output
[ERR]: Error building changeset: InvalidChangeBatch: [Invalid Resource Record: FATAL problem: CharacterStringTooLong (Value is too long) encountered with '"v=DKIM1; k=rsa; p=MIIBIjANBgkqhRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRrRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR_very_long_string"'] status code: 400, request id: 1f3fcfb0-344a-4b66-adbd-a40788df8990
Expected Behavior
Since 255 length limit is known, I'd expect terraform plan to warn me about a domain name that is too long, so that my GitOps "prep" stage could fail.
Actual Behavior
terraform plan is OK with very long domains. terraform apply crashes.
Steps to Reproduce
- Take a DNS block from above. The idea is that you should attempt to make a very long (400characters+) long TXT record, which is popular in DKIM settings.
- Run
terraform planand see it succeed. - Run
terraform applyand see it crash withCharacterStringTooLongerror
Important Factoids
References
- #0000