I'm running into some issues with my aws cloud formation template.
I have a general staging.yaml file where I define all my lambdas and apis. Problem is, that file has gotten WAY too big. So I decided to use this package: https://www.npmjs.com/package/cfn-include. So I can break the file up into several templates. As such:
Fn::Merge:
- !Include ./templates/api-lambdas/accounts.yaml
- !Include ./templates/api-lambdas/officers.yaml
- !Include ./templates/api-lambdas/branches.yaml
My question is, is there any way of passing variables into these includes? I.E:
- !include ./templates/api-lambdas/accounts/yaml, variables: {database: databaseName, environment: staging}
And the accounts.yaml would look like this:
Environment:
Variables:
ENV: ${environment}
DB_NAME: ${databaseName}
Thanks!