-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
R53 Delegation Set: Member must have length less than or equal to 32 #12238
Comments
You're using a string literal If you're using Terraform 0.12 then this should just be: resource "aws_route53_zone" "main" {
name = "${terraform.workspace}.fubarfubar.com"
delegation_set_id = aws_route53_delegation_set.main.id
tags = {
Environment = "${terraform.workspace}.terraform"
}
} but if you're using Terraform 0.11 or lower then you need to use the interpolation syntax: resource "aws_route53_zone" "main" {
name = "${terraform.workspace}.fubarfubar.com"
delegation_set_id = "${aws_route53_delegation_set.main.id}"
tags = {
Environment = "${terraform.workspace}.terraform"
}
} |
There should probably be a ValidateFunc on this as well to check this is no more than 32 characters at plan/validate time. |
Length validation for this argument has been merged and will release with version 3.23.0 of the Terraform AWS Provider, likely tomorrow. Thank you to @FrancisLfg for the implementation. 👍 |
This has been released in version 3.23.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @david-peters-aitch2o as hashicorp/terraform#24250. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
If ${terraform.workspace} is dev and domain is fubarfubar.com there should be no issues
Actual Behavior
Terraform fails with
Error: error creating Route53 Hosted Zone: InvalidInput: 1 validation error detected: Value 'aws_route53_delegation_set.main.id' at 'resourceId' failed to satisfy constraint: Member must have length less than or equal to 32 status code: 400, request id: 0f396743-1af5-417c-91e3-3d4a1ae23672
Steps to Reproduce
Additional Context
Changing the domain fubarfubar.com to a.com or something shorter works, it seems Terraform is taking ${terraform.workspace} as part of the domain when it calculates the domain name length.
This only happens when delegation_set_id is part of the aws_route53_zone resource
References
The text was updated successfully, but these errors were encountered: