terraform-aws-vpc
terraform-aws-vpc copied to clipboard
Allow subnet specific tags
This pull request adds a couple more variables (additional_dmz_tags
& additional_lan_tags
) to the az terraform module. By adding these additional tags, we can differentiate between dmz and lan subnets.
An example use case for this feature is; suppose we want to create a VPC for an AWS EKS cluster. Defining these additional tags allows one to control where Elastic Load Balancers are provisioned. See Cluster VPC considerations in the AWS documentation.
Here is an example of possible data values:
terraform::vpc::vars:
additional_dmz_tags: { "kubernetes.io/role/elb": "1" }
additional_lan_tags: { "kubernetes.io/role/internal-elb": "1" }
additional_subnet_tags: { "kubernetes.io/cluster/%{hiera('env_label')}": "shared" }