-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Config schema: Define AWS "provider" properties (top level only) #8016
Comments
@medikoo I'd like to take a crack at I am able to get an error when I run manually:
🎉 but I'm trying to figure out the right magic to add a unit test to validate the validation. If I'm lucky you will see this before I pour too much more time into figuring out all the wrong ways to do it. 🙂 I have looked at the tests in #7335 but haven't figured out how to write a new one that tests the right thing. UPDATE: I think I've figured it out ... had to use
instead of
as UPDATE 2: Nope, UPDATE 3: Got it by using |
@glb great to hear that!
I'm not sure if we should write tests for schema. AJV (validation engine) is extensively tested on it's own, so e.g. testing that adding field to I believe we should just test a valid configuration (that'll confirm that by accident we do not invalidate a valid format), and it's ok to invalid cases purely in scope of schema rules (without further tests). We may eventually write a single tests, that confirms on bad format in all properties and that unwanted properties are not sneaked, and if we do that, I will set |
Use case description
Part of #8022
Proposed solution
Define schemas for following properties:
Note: As that's a lot, proposed PR's may cover just some of them (or even just single one)
stage
region
stackName
profile
logRetentionInDays
deploymentBucket
deploymentPrefix
rolePermissionsBoundary
cfnRole
stackTags
iamManagedPolicies
iamRoleStatements
stackPolicy
notificationArns
stackParameters
rollbackConfiguration
tags
logs.frameworkLambda
Configuration should be done directly in:
lib/plugins/aws/provider/awsProvider.js
:serverless/lib/plugins/aws/provider/awsProvider.js
Lines 141 to 142 in d403d9c
The text was updated successfully, but these errors were encountered: