Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terraformtoolbox/terraform-aws-vpc
A terraform module for creating an AWS VPC.
https://github.com/terraformtoolbox/terraform-aws-vpc
aws terraform terraform-module wolfsoftware
Last synced: about 9 hours ago
JSON representation
A terraform module for creating an AWS VPC.
- Host: GitHub
- URL: https://github.com/terraformtoolbox/terraform-aws-vpc
- Owner: TerraformToolbox
- License: mit
- Created: 2024-06-07T10:19:14.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-09-23T05:03:42.000Z (1 day ago)
- Last Synced: 2024-09-24T04:20:12.299Z (about 18 hours ago)
- Topics: aws, terraform, terraform-module, wolfsoftware
- Language: HCL
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
## Overview
A Terraform module for creating an AWS VPC with options to create public and private subnets, NAT gateways, and Internet gateways.
## Usage
### Minimal Usage
```
module "vpc" {
source = "https://github.com/TerraformToolbox/terraform-aws-vpc"
region = "us-west-2"
cidr_block = "10.0.0.0/16"
vpc_name = "my-vpc"
}
```### All Options
```
module "vpc" {
source = "https://github.com/TerraformToolbox/terraform-aws-vpc"region = "us-west-2"
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
instance_tenancy = "default"
vpc_name = "my-vpc"
tags = { "Environment" = "dev" }create_subnets = true
create_internet_gateway = true
create_nat_gateway = true
public_subnet_cidrs = ["10.0.1.0/24", "10.0.2.0/24"]
private_subnet_cidrs = ["10.0.3.0/24", "10.0.4.0/24"]endpoints = ["com.amazonaws.us-west-2.s3", "com.amazonaws.us-west-2.dynamodb"]
endpoints_private_dns_enabled = [true, false]
endpoints_security_group_ids = [["sg-12345678"], ["sg-87654321"]]
endpoints_subnet_ids = [["subnet-1234abcd"], ["subnet-abcd1234"]]
endpoints_type = ["Gateway", "Interface"]
}
```## Inputs
- `region`: AWS region
- `cidr_block`: CIDR block for the VPC
- `enable_dns_support`: Enable DNS support in the VPC
- `enable_dns_hostnames`: Enable DNS hostnames in the VPC
- `instance_tenancy`: Tenancy option for instances launched into the VPC
- `vpc_name`: Name of the VPC
- `tags`: A map of tags to add to all resources
- `endpoints`: List of VPC endpoints
- `endpoints_private_dns_enabled`: List of private DNS enabled for endpoints
- `endpoints_security_group_ids`: List of security group IDs for endpoints
- `endpoints_subnet_ids`: List of subnet IDs for endpoints
- `endpoints_type`: List of endpoint types
- `create_subnets`: Flag to create subnets automatically
- `create_internet_gateway`: Flag to create an Internet Gateway
- `create_nat_gateway`: Flag to create NAT Gateway
- `public_subnet_cidrs`: List of public subnet CIDR blocks if manually creating subnets
- `private_subnet_cidrs`: List of private subnet CIDR blocks if manually creating subnets## Outputs
- `vpc_id`: The ID of the VPC
- `vpc_arn`: The ARN of the VPC
- `vpc_cidr_block`: The CIDR block of the VPC
- `vpc_default_network_acl_id`: The ID of the default network ACL
- `vpc_default_route_table_id`: The ID of the default route table
- `vpc_default_security_group_id`: The ID of the default security group
- `vpc_main_route_table_id`: The ID of the main route table
- `public_subnet_ids`: The IDs of the public subnets
- `public_subnet_cidr_blocks`: The CIDR blocks of the public subnets
- `private_subnet_ids`: The IDs of the private subnets
- `private_subnet_cidr_blocks`: The CIDR blocks of the private subnets
- `internet_gateway_id`: The ID of the Internet Gateway
- `nat_gateway_ids`: The IDs of the NAT Gateways
- `nat_gateway_ips`: The Elastic IPs of the NAT Gateways
- `public_route_table_id`: The ID of the public route table
- `private_route_table_id`: The ID of the private route table
- `vpc_endpoints`: The IDs of the VPC endpoints