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
Fix schema for resource tags. #8314
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8314 +/- ##
==========================================
- Coverage 88.08% 88.01% -0.07%
==========================================
Files 250 249 -1
Lines 9368 9307 -61
==========================================
- Hits 8252 8192 -60
+ Misses 1116 1115 -1
Continue to review full report at Codecov.
|
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 @dashmug, it looks great! Still I think I've spotted one issue in pattern, let me know
@@ -356,9 +356,8 @@ class AwsProvider { | |||
awsResourceTags: { | |||
type: 'object', | |||
patternProperties: { | |||
'^(?!aws:)[\\w./=+-]{1,128}$': { | |||
'^(?!aws:)[\\w./=+-:]{1,128}$': { |
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 think we need to move -
so it's listed last, otherwise +-:
implies a range
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.
Thanks @medikoo. I've updated it.
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 @dashmug !
AWS allows for resource tags to have colons in them. In fact, they use it themselves for their reserved tags and they recommend their use in their best practices. Serverless config schema validation should also allow for it.
The schema validation is based on the documentation in this page: https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Tag.html.
This PR closes #8304.