Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allwelldotdev/terraform-aws-vpc-own-module

Simple Terraform AWS VPC Networking module created by Allwell.
https://github.com/allwelldotdev/terraform-aws-vpc-own-module

Last synced: about 1 month ago
JSON representation

Simple Terraform AWS VPC Networking module created by Allwell.

Awesome Lists containing this project

README

        

# terraform-aws-vpc-own-module
Simple Terraform AWS VPC Networking module created by Allwell.

This module manages the creation of VPCs and Subnets, allowing for the creation of both public and private subnets.

## Usage:

```hcl
module "vpc" {
source = "./modules/networking"

vpc_config = {
cidr_block = "10.0.0.0/16"
name = "your_vpc"
}

subnet_config = {
subnet_1 = {
cidr_block = "10.0.0.0/24"
az = "us-east-1a"
},
subnet_2 = {
cidr_block = "10.0.1.0/24"
az = "us-east-1b"
public = true
},
subnet_3 = {
cidr_block = "10.0.2.0/24"
az = "us-east-1c"
public = true
},
subnet_4 = {
cidr_block = "10.0.3.0/24"
az = "us-east-1d"
}
}
}

```

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [vpc_config](#vpc_config) | An object that contains and sets the VPC configuration | `object()` |

{
cidr_block = null
name = null
}
| yes |
| [cidr_block](#vpc_config-cidr_block) | An attribute in [vpc_config](#vpc_config) used to set CIDR block | `string` | `null` | yes |
| [name](#vpc_config-name) | An attribute in [vpc_config](#vpc_config) used to set VPC name | `string` | `null` | no |
| [subnet_config](#subnet_config) | An object that contains and sets VPC Subnet configuration | `map(object())` |
{
subnet_1 = {
cidr_block = null
az = null
public = false
}
}
| no |
| [cidr_block](#subnet_config-cidr_block) | An attribute in [subnet_config](#subnet_config) used to set VPC subnet CIDR block | `string` | `null` | no |
| [az](#subnet_config-az) | An attribute in [subnet_config](#subnet_config) used to set VPC subnet availability zone | `string` | `null` | no |
| [public](#subnet_config-public) | An attribute in [subnet_config](#subnet_config) used to set if VPC subnet is public or private | `bool` | `false` | no |

## Outputs

| Name | Description |
| ---- | ----------- |
| [vpc_id](#vpc_id) | The ID of the VPC |
| [public_subnets](#public_subnets) | A map of objects containing each public VPC subnet's ID and availability zone |
| [private_subnets](#private_subnets) | A map of objects containing each VPC subnet's ID and availability zone of private subnets |