I have an env.yml file where I store some variables that should be be sent to the serverless.yml. I want to send this array of variables from the env.yml to the serverless.yml.
This. is what I have in the env.yml
securityGroupIds:[sg-xxx]
subnetIds: [subnet-xx1, subnet-xx2, subnet-xx3, subnet-xx4]
This is what I have in the serverless.yml:
vpc:
securityGroupIds: ${file(env.yml):securityGroupIds}
subnetIds: ${file(env.yml):securityGroupIds}
And this is what I was expecting to get inside serverless.yml when I sls print --stage dev:
vpc:
securityGroupIds:
- sg-xxx
subnetIds:
- subnet-xx1
- subnet-xx2
- subnet-xx3
- subnet-xx4
It is not working. What am I doing wrong?