title: How to get an instance id / arn of an existing ec2 instance via terraform?
body: <p>I am using Terraform for some infrastructure deployment:</p>
  
  <pre><code>data "aws_instance" "ec2_my_admin_instance" {
    filter {
      name = "tag:TfServerType"
      values = ["myAdmin"]
    }
  }
  
  
  output "theId" {
    value = "${data.aws_instance.ec2_my_admin_instance.instance_id}"
  }
  output "type" {
    value = "${data.aws_instance.ec2_my_admin_instance.instance_type}"
  }
  output "placement_group" {
    value = "${data.aws_instance.ec2_my_admin_instance.placement_group}"
  }
  output "availability_zone" {
    value = "${data.aws_instance.ec2_my_admin_instance.availability_zone}"
  }
  output "arn" {
    value = "${data.aws_instance.ec2_my_admin_instance.arn}"
  }
  </code></pre>
  
  <p>However, the most important values (id, arn) are not shown:</p>
  
  <pre><code>Outputs:
  
  availability_zone = ap-southeast-2b
  type = m4.large
  </code></pre>
  
  <p>Did I miss anything?</p>