You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues, it hasn't been reported yet
Issue description
Adding a Rules property to the resources section in a serverless yml file eg
resources:
Rules:
ValidateStage:
Assertions:
- Assert:
'Fn::Contains':
- - dev
- int
- ${self:provider.stage}AssertDescription: Stack must only be deployed in lower envs
Yields the following warning:
Invalid configuration encountered at 'resources': unrecognized property 'Rules'
Despite it yielding the correct json:
"Rules": {
"ValidateStage": {
"Assertions": [
{
"Assert": {
"Fn::Contains": [
[
"dev",
"int"
],
"dev"
]
},
"AssertDescription": "Stack must only be deployed in lower envs"
}
]
}
}
(Which behaves correctly)
It appears this issue is just the validation of the serverless.yml file is incorrect, and the Rule property should be regonized.
Service configuration (serverless.yml) content
service: sample-serviceconfigValidationMode: errorprovider:
name: awsstage: devregion: us-east-1resources:
Rules:
ValidateStage:
Assertions:
- Assert:
'Fn::Contains':
- - dev
- int
- ${self:provider.stage}AssertDescription: Stack must only be deployed in lower envs
I've noticed that the rules are using Pascal case instead of the usual Camel case. Wouldn't it be better to have it using camel case too? I've never used rules though so I'm not sure what's what in this case.
As far as I can see, according to the schema all child properties of resources are using Pascal case (which makes sense if they're simply passed as is into CloudFormation script).
Rules will be added next to Condition, Outputs, Resources and other similarly cased properties.
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
Adding a
Rules
property to theresources
section in a serverless yml file egYields the following warning:
Despite it yielding the correct json:
(Which behaves correctly)
It appears this issue is just the validation of the serverless.yml file is incorrect, and the
Rule
property should be regonized.Service configuration (serverless.yml) content
Command name and used flags
serverless deploy
Command output
Environment information
The text was updated successfully, but these errors were encountered: