Variable keys in terraform maps
<p>In Terraform, I'm trying to create a module with that includes a map with variable keys.  I'm not sure if this is possible but I've tried the following without success.</p>

<pre class="lang-tf prettyprint-override"><code>resource "aws_instance" "web" {
    ami = "${var.base_ami}"
    availability_zone = "${var.region_a}"
    instance_type = "${var.ec2_instance_size}"
    security_groups = ["sec1"]
    count = "${var.ec2_instance_count}"
    tags {
        Name = "${var.role} ${var_env}"
        role = "${var.app_role}"
        ${var.app_role} = "${var_env}"
    }
}
</code></pre>

<p>and this:</p>

<pre class="lang-tf prettyprint-override"><code>tags {
   Name = "${var.role} ${var_env}"
}
tags."${var.role}" = "${var.env}"
</code></pre>

<p>Any ideas? Is this not possible with Terraform currently?</p>