serverless-ide-vscode
serverless-ide-vscode copied to clipboard
Unable to include a local file
I'm running into the following issue trying to import a local file:
resources:
- ${file(resources/dynamo/UsersSubscriptionTable.yml):UsersSubscriptionTable}
The linter isn't liking this format. What could I be missing? I've tried a dozen different combinations of this.
Adjacent file:
UsersSubscriptionTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: MyCoolTable
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: email
AttributeType: S
# Specifies the email as the partition key (primary key)
KeySchema:
- AttributeName: email
KeyType: HASH
Looks like I see what's going on. I need the resources object to have a key referencing the logical name of the resource I'm referencing:
resources:
Resources:
UsersSubscriptionTable: ${file(resources/dynamo/UsersSubscriptionTable.yml):UsersSubscriptionTable}
It's valid under serverless framework, but not the ide plugin:
Curious if there is a cleaner way. I don't really foresee super needing this, but was frustrating to debug.