title: Get subnet_id from VPC Terraform community module
body: <p>I am using the <a href="https://github.com/terraform-community-modules/tf_aws_vpc/blob/master/variables.tf" rel="nofollow noreferrer">tf_aws_vpc</a> and <a href="https://github.com/terraform-community-modules/tf_aws_ec2_instance" rel="nofollow noreferrer">tf_aws_ec2</a> Terraform community modules butnI am struggling to get the subnet_id which I should use to create an EC2 instance within an AWS VPC.</p>
  
  <p>In the tf_aws_ec2 module docs they say to define it in a variable but I can't get it from a variable because I don't know its id until I have created the subnet.</p>
  
  <p>I am trying to use Terraform modules. I know how to do it when not using Terraform modules.</p>
  
  <p>How am I supposed to create an EC2 instance in a VPC?</p>