Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to include a local file #150

Open
Schachte opened this issue Jan 14, 2022 · 1 comment
Open

Unable to include a local file #150

Schachte opened this issue Jan 14, 2022 · 1 comment
Assignees

Comments

@Schachte
Copy link

Schachte commented Jan 14, 2022

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

image

image

@Schachte
Copy link
Author

Schachte commented Jan 14, 2022

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:

image

Curious if there is a cleaner way. I don't really foresee super needing this, but was frustrating to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants