Closed georgesglynn closed 2 months ago
Hi @georgesglynn,
This issue stems from introducing Variable Resolvers in v4. In v4, variables are parsed into three sections using a colon (:
) as the delimiter: ${provider:resolver:key}
. A single provider can now have multiple resolvers, for example, ${aws:s3:key}
and ${aws:ssm:key}
. This is why you’re encountering the error us-east-1 resolver of provider customKmsKey not found
when using the :
delimiter.
Plugins' configurationVariablesSources
are now treated as providers with a single resolver, and both the provider and resolver share the same name as the variable source. To continue using the colon delimiter, you can adjust your syntax to ${provider:resolver:key}
. For your use case, this would be:
${customKmsKey:customKmsKey:us-east-1:alias/test_${aws:accountId}_kms}
.
Issue description
For custom plugins (docs), it appears the parsing has changed during the upgrade from v3 to v4. I've illuminated my observations below:
In v3, this is the snippet of my config:
And my
KMSPlugin.js
was written in the following way:After upgrading to v4, I am getting the following error on the above config during
sls deploy
:I have observed that this is related to an apparent severless-v4-parsing of the
:
in the expected variable (address
parameter in the plugin code). If I remove the:
, and replace it with a different delimiter, the deployment will succeed.I am seeking to understand the details which caused this new behavior.
Please advise if I can provide anymore helpful detail.
Thank you for your time!
-George
Context
N/A