Serverless: Deprecation warning: Serverless Framework was enhanced with a new variables resolver which doesn't recognize "provider.variableSyntax" setting.Starting with a new major it will be the only resolver that's used.. Drop setting from a configuration to adapt to it More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
Created
June 29, 2021 17:26
-
-
Save DavidWells/12b8194d7141eeef65eb6b94c1aa6fa8 to your computer and use it in GitHub Desktop.
Does the new variable setup still allow for me to reference `AWS::`, `Params` & resources with `${}`?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider: | |
name: aws | |
## Allows for ignoring AWS:: and any Capitilized resources for example ${PinpointApplicationId} a param ref | |
variableSyntax: "\\${((?!AWS|ctx|_)[a-z][ ~:a-zA-Z0-9=+!@#%*<|?._\\'\",|\\-\\/\\(\\)\\\\]+?)}" | |
## Using this syntax I can reference resources, params, and builtin AWS:: variables. | |
resources: | |
Parameters: | |
## This is referenced below with ${PinpointApplicationId} because I ignore capitilized ${Vars} | |
PinpointApplicationId: | |
Description: The pinpoint application identifier to use for analytics. | |
Type: String | |
Default: 'foobar' | |
Resources: | |
IdentityRole: | |
Type: AWS::IAM::Role | |
Properties: | |
Path: "/" | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: [] | |
Policies: | |
- PolicyName: "CognitoPolicy" | |
PolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Action: [ "mobiletargeting:PutEvents" ] | |
Resource: | |
## Here i'm able to use AWS:: and reference resources or params with ${AWS:: or ${PinpointApplicationId} | |
- !Sub arn:aws:mobiletargeting:${AWS::Region}:111:apps/${PinpointApplicationId}/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment