I have used the terraform vpc module from registry to create vpc and subnets as follows:
#https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.77.0"
# insert the 49 required variables here
name = "${var.vpc_name}"
cidr = "${var.vpc_cidr}"
azs = "${var.azs}"
private_subnets = ["10.0.0.64/26", "10.0.0.128/26"]
public_subnets = "${var.public_subnets}"
enable_dns_hostnames = true
enable_dns_support = true
enable_nat_gateway = true
single_nat_gateway = true
private_subnet_tags = {
Name = "nprod-net"
}
}
As you can see I have 2 private subnet with tag "nprod-net" but I want to name each private subnet with a different name say "nprod-net-app-1a" and "nprod-net-vpce-1a". Any help would be appreciated.