This module creates AWS VPC and also its:
- Internet Gateway
- Security Group
- Prefix List
- Route53 Private Hosted Zone
# main.tf
module "vpc" {
source = "git::https://github.com/lpavliuk/Terraform-Modules.git//aws_vpc"
name = "example"
cidr = "10.0.0.0/16"
domain_zone_name = "intranet.vpc"
}
Name | Version |
---|---|
terraform | < 2.0.0, >= 1.6.6 |
aws | < 6.0, >= 5.22 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | VPC Name | string |
n/a | yes |
cidr | IPv4 CIDR Block for the VPC (e.g. 10.0.0.0/16 ). Must have /16 mask |
string |
n/a | yes |
domain_zone_name | Private Hosted Zone Name that will be created in Route53 | string |
null |
no |
Name | Description |
---|---|
name | VPC Name |
id | VPC ID |
cidr | VPC CIDR Block |
internet_gateway_id | VPC Internet Gateway ID |
prefix_list_id | VPC Prefix List ID |
security_group_id | VPC Security Group ID |
account_id | VPC AWS Account ID |
region | VPC AWS Region Name |
domain_zone_id | Route53 Private Hosted Zone ID |
domain_zone_name | Route53 Private Hosted Zone Name |
Name | Type |
---|---|
aws_ec2_managed_prefix_list.this_vpc | resource |
aws_ec2_managed_prefix_list_entry.entry | resource |
aws_internet_gateway.this_vpc | resource |
aws_route53_zone.this | resource |
aws_security_group.this_vpc | resource |
aws_vpc.this | resource |
aws_availability_zones.available | data source |
aws_caller_identity.this | data source |
aws_region.current | data source |