-
Notifications
You must be signed in to change notification settings - Fork 72
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
aws_route53_record_invalid_zone_id should also allow /hostedzone/ prefix on zone_id #345
Comments
generated from
https://github.com/aws/aws-sdk-go/blob/b7f3444e8fe813e07fb71fa8c487ff738882d79f/models/apis/route53/2013-04-01/api-2.json#L3645 |
The trouble here partially comes from the fact that the AWS provider accepts this but then proceeds to chop it off everywhere, e.g.: You can find lots of examples of this happening in other projects: https://github.com/search?q=zone_id+%3D+%22%2Fhostedzone%2F+TrimPrefix&type=code And the shape of a https://github.com/aws/aws-sdk-go/blob/main/models/apis/route53/2013-04-01/api-2.json#LL4069 The provider also asserts that Particularly given that this report is missing the output, I'm not understanding what the discrepancy is and how the rule logic would change, even setting aside the fact that it's generated. |
Didn't intend to close, looking for a clear reproduction before spending any more time here |
The rule
aws_route53_record_invalid_zone_id
has a char limit of 32 chars on thezone_id
property. A longerzone_id
raises an error when linting.According to the AWS docs, this is correct. See
Id
section of linked documentation.In my use case I generate Terraform files with kOps, and the generated
zone_id
s are in the format/hostedzone/XXXXXXXXXXXXXXXXXXXXX
. The generatedzone_id
format is accepted by the Terraform AWS provideraws_route53_record
resource.Example:
I was not able to find the source code for the
aws_route53_record
, because I don't know the provider codebase that well. Maybe it's auto generated. As a proof besides my own codebase, I found a test case in the provider repository which also uses the prefix.The ruleset should be adjusted to support the
/hostedzone/
prefix on theaws_route53_record.zone_id
property.The text was updated successfully, but these errors were encountered: