title: Terraform: User Data not rendered
body: <p>Using <code>terraform</code> to run some user data upon instance creation:</p>
  
  <pre><code>  user_data = "${template_file.user_data.rendered}"
  </code></pre>
  
  <p>Here is the definition:</p>
  
  <pre><code>resource "template_file" "user_data" {
    template = "files/user_data.tpl"
    vars {
      docker_version = "17.12.1~ce-0~ubuntu"
    }
  }
  </code></pre>
  
  <p>However, in the created instance, the user data just includes the above line:</p>
  
  <pre><code>sudo cat /var/lib/cloud/instances/i-05e8a76335472f27c/user-data.txt
  files/user_data.tpl
  </code></pre>
  
  <p>Any suggestions?</p>