Require provider.credentials vars to be resolved before s3/ssm/cf vars #5763
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did you implement:
Require provider.credentials vars to be resolved before s3/ssm/cf vars, similar to long standing region/stage and new profile preresolve.
test uses the service definition instead of
getCredentials
becausegetCredentials
is much more complex thangetStage
/getProfile
/getRegion
and we only need to test that the config is updated, not all the
credential setting logic
How did you implement it:
added
credentials
in the prepopulate step of variable systemHow can we verify it:
Create an SSM var called
sls-5763
containing the valuesls-5763
Create a service with the following config, replacing the key id & secret key of course:
then when you run
sls print
with the stable version of serverless you'll get:then install this branch with
npm i -g serverless/serverless#credentials-preresolve
and you should get:Todos:
Write documentationIs this ready for review?: YES
Is it a breaking change?: NO