title: Put list from variable into inline policy in Terraform
body: <p>I'm creating <strong>access_policies</strong> as an inline policy in Terraform:
  <a href="https://i.stack.imgur.com/4iMKH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4iMKH.png" alt="enter image description here"></a></p>
  
  <p>Is it possible to use one var with type of list instead of it? 
  If yes, could you please give an example? </p>
  
  <p>For me exception was:</p>
  
  <pre><code>Error: Error running plan: 1 error(s) occurred:
  
  * aws_elasticsearch_domain.db: 1 error(s) occurred:
  
  * aws_elasticsearch_domain.db: At column 1, line 1: output of an HIL expression must be a string, or a single list (argument 6 is TypeList) in:
  </code></pre>