/* VPC and Account Discovery: Instead of creating a new VPC (which Landing Zones often block), this looks up the pre-provisioned VPC and subnets shared with a Dev account. */ data "aws_caller_identity" "current" {} # Looks up the non-default VPC provisioned by Control Tower / Network Team data "aws_vpc" "shared" { default = false # Optional: filter by tag if multiple VPCs exist # tags = { Name = "*dev-vpc*" } } # Discovers private subnets (update tag key/values to match org's naming convention) data "aws_subnets" "private" { filter { name = "vpc-id" values = [data.aws_vpc.shared.id] } tags = { Tier = "Private" # Common alternatives: "private", "*private*" under Name tag } } # Discovers database/isolated subnets for RDS data "aws_subnets" "database" { filter { name = "vpc-id" values = [data.aws_vpc.shared.id] } tags = { Tier = "Database" # Fallback to private subnets if isolated subnets aren't tagged separately } }