-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
resource/aws_route53_health_check: Validate reference_name #12873
resource/aws_route53_health_check: Validate reference_name #12873
Conversation
Hey @bflad, is there anything I need for this PR? |
Ooof! Okay, it should be good now. Thanks! |
Support plan-time validation for the length of the reference_name argument. Since this resource auto-appends a unique string to the provided argument, this is necessary to avoid obtuse errors on apply. This validates the provided reference_name plus the generated string is no longer than 64 chars, the actual API limit. Since the generated unique ID is 37 chars, the `reference_name` argument cannot exceed 27 characters. Closes #7248 Co-Authored-By: Brian Flad <bflad417@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @timoguin 🚀
Output from acceptance testing:
--- PASS: TestAccAWSRoute53HealthCheck_disappears (9.61s)
--- PASS: TestAccAWSRoute53HealthCheck_withHealthCheckRegions (19.50s)
--- PASS: TestAccAWSRoute53HealthCheck_withChildHealthChecks (22.39s)
--- PASS: TestAccAWSRoute53HealthCheck_withSearchString (25.97s)
--- PASS: TestAccAWSRoute53HealthCheck_IpConfig (26.48s)
--- PASS: TestAccAWSRoute53HealthCheck_Ipv6Config (27.27s)
--- PASS: TestAccAWSRoute53HealthCheck_basic (29.14s)
--- PASS: TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck (29.42s)
--- PASS: TestAccAWSRoute53HealthCheck_tags (36.04s)
--- PASS: TestAccAWSRoute53HealthCheck_withSNI (37.91s)
This has been released in version 2.60.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! |
Support plan-time validation for the length of the reference_name argument. Since this resource auto-appends a unique string to the provided argument, this is necessary to avoid obtuse errors on apply. This validates the provided reference_name plus the generated string is no longer than 64 chars, the actual API limit. Since the generated unique ID is 37 chars, the `reference_name` argument cannot exceed 27 characters. Closes hashicorp#7248 Co-Authored-By: Brian Flad <bflad417@gmail.com> Co-authored-by: Brian Flad <bflad417@gmail.com>
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! |
Community Note
Support plan-time validation for the length of the
reference_name argument
. Since this resource auto-appends a unique string to the provided argument, this is necessary to avoid obtuse errors on apply. This ensures the providedreference_name
plus the generated string is no longer than 64 chars, the actual API limit.Since the generated unique ID is 26 chars, the
reference_name
argument cannot exceed 38 characters.Closes #7248
Release note for CHANGELOG:
Output from acceptance testing:
Output from Terraform run with patched build: