========================================
A Terraform module to create public subnets in VPC in AWS.
If you want to create public and private subnets using single module you can use tf_aws_vpc module.
name
- Name (optional)vpc_id
- VPC idigw_id
- Internet gateway idcidrs
- List of VPC CIDR blocksazs
- List of availability zonesmap_public_ip_on_launch
- Should be true or false (optional, default is true)tags
- dictionary of tags that will be added to resources created by the module
module "public_subnet" {
source = "github.com/terraform-community-modules/tf_aws_public_subnet"
name = "production-public"
cidrs = ["10.2.1.0/24", "10.2.2.0/24", "10.2.3.0/24"]
azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = "vpc-12345678"
igw_id = "igw-12345678"
tags {
"Terraform" = "true"
"Environment" = "${var.environment}"
}
}
subnet_ids
- Lst of subnet idspublic_route_table_ids
- List of route table ids
Originally created and maintained by hashicorp/atlas-examples. Hijacked by Anton Babenko.
Apache 2 Licensed. See LICENSE for full details.