title: In terraform, how do I output an aws_route53_record alias value?
body: <p>Terraform v0.12.x</p>
  <p>I'm creating an AWS Route53 record, like this, and it's created with no issues.</p>
  <pre><code>data &quot;aws_route53_zone&quot; &quot;zone&quot; {
    name         = &quot;my.domain.com.&quot;
    private_zone = true
  }
  
  resource &quot;aws_route53_record&quot; &quot;record&quot; {
    zone_id = data.aws_route53_zone.zone.zone_id
    name    = &quot;${var.record_name}.${data.aws_route53_zone.zone.name}&quot;
    type    = &quot;A&quot;
    alias {
      name                   = var.alias_record
      zone_id                = var.alias_zone_id
      evaluate_target_health = false
    }
  }
  </code></pre>
  <p>Now I want to output the value the alias's name, and I tried</p>
  <pre><code>output &quot;alias_name&quot; {
    value = aws_route53_record.record.alias.name
  }
  </code></pre>
  <p>or</p>
  <pre><code>output &quot;alias_name&quot; {
    value = aws_route53_record.record.alias[&quot;name&quot;]
  }
  </code></pre>
  <p>but get the error</p>
  <pre><code>Block type &quot;alias&quot; is represented by a set of objects, and set elements do not
  have addressable keys. To find elements matching specific criteria, use a
  &quot;for&quot; expression with an &quot;if&quot; clause.
  </code></pre>
  <p>What's the correct syntax?</p>