Skip to content

Variables not resolving in modularized templates after upgrading to variablesResolutionMode #18

@brettstack

Description

@brettstack

After upgrading to variablesResolutionMode: 20210326 in Serverless 2, or upgrading to Serverless 3, I'm now getting errors when trying to use native serverless variables such as ${aws:region}, ${aws:accountId}, ${ApiGatewayRestApi}, and ${sls:stage}, as well as custom variables such as ${self:custom.deletionPolicy}. These work correctly in the root serverless.yml but aren't resolved in the modularized templates.

The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [aws:accountId, sls:stage, aws:region] in the Resources block of the template
The CloudFormation template is invalid: Template format error: Unrecognized DeletionPolicy ${self:custom.deletionPolicy} for resource CognitoUserPool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions