interview-prep
data "aws_vpc" "main" {
  filter {
    name   = "tag:Name"
    values = ["production-vpc"]
  }
}

Data sources are read-only. They look up information from existing infrastructure that Terraform didn't create. Use them to reference resources managed elsewhere, or to look up dynamic values (latest AMI ID, current AWS account ID, etc.).

You reference data sources as data.aws_vpc.main.id.

My notes