-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor(apprunner): consolidate name validations for App Runner Resources and improve error messages #32062
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32062 +/- ##
=======================================
Coverage 77.19% 77.19%
=======================================
Files 105 105
Lines 7164 7164
Branches 1311 1311
=======================================
Hits 5530 5530
Misses 1454 1454
Partials 180 180
Flags with carried forward coverage won't be shown. Click here to find out more.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
I have made just one comment! Please check it!
); | ||
} | ||
|
||
if (!/^[A-Za-z0-9][A-Za-z0-9\-_]*$/.test(props.vpcConnectorName)) { |
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.
From Cfn document, it seems that hyphen is not allowed for the VPC Connector name.
^[A-Za-z0-9][A-Za-z0-9-\\_]{3,39}$
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.
@badmintoncryer
Thanks.
I think regex pattern in Cfn document is wrong.
I successfully created a VPC Connector with a name containing hyphens.
According to the management console, VPC connector names can only contain alphanumeric characters, hyphens, and underscores.
While the regex pattern in the CFn documentation indicates that backslashes are allowed, in practice they are not permitted.
I would like to provide feedback regarding this documentation to AWS team.
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.
Thank you for your information! I understand.
Issue # (if applicable)
N/A
Reason for this change
Consolidate name validations for App Runner Resources and improve error messages.
Description of changes
autoScalingConfigurationName
inAutoScalingConfiguration
observabilityConfigurationName
inObservabilityConfigurationName
vpcIngressConnectionName
inVpcIngressConnectionName
serviceName
inServiceName
. (Ref: CFn document)vpcConnectorName
inVpcConnectorName
. (Ref: CFn document)Description of how you validated changes
Modify and add unit tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license