First, create VPC as subnet attaches to VPC id. Next, add to your Terraform code:
resource "aws_internet_gateway" "mtc_internet_gateway" { vpc_id = aws_vpc.mtc_vpc.id tags = { Name = "dev-igw" } }