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