title: terraform - split variable value into 2
body: <p>I have a variable (var.http_proxy) that holds proxy details (ip address : port). I am setting env variable to a lambda and I have 2 variable , host and port. Now I need to use split the variable and assign proxy host and port instead of defining 2 new variables. I am using the code below and it is wrong -</p>
  
  <pre><code>environment = {
      variables = {
        proxy_host = "${split(":", var.http_proxy)[0]}"
        proxy_port = "${split(":", var.http_proxy)[1]}"
      }
    }
  </code></pre>