title: Terraform: Output a field from a module
body: <h1>Code</h1>
  
  <p>Consider a terraform module:</p>
  
  <pre><code>module "blah-asg" {
    source = "asg"
  
    asg_max_size       = 1
    asg_min_size       = "${var.min_blah}"
    ...
  }
  </code></pre>
  
  <h1>My problem</h1>
  
  <p>How do I <a href="https://www.terraform.io/intro/getting-started/outputs.html" rel="noreferrer"><code>output</code></a> variables from it? </p>
  
  <h1>What have I tried</h1>
  
  <pre><code>output "blah-es-asg" {
      value = "${asg.blah-asg.arn}"
  }
  </code></pre>
  
  <p>Which failed with</p>
  
  <blockquote>
    <p>Error getting plugins: module root: 1 error(s) occurred:
    * output 'blah-asg': unknown resource 'asg.blah' referenced in variable asg.blah-asg.arn</p>
  </blockquote>
  
  <h1>My question</h1>
  
  <p>How can I output module fields in Terraform?</p>