Skip to content

Network Module

This module is a wrapper around the public VPC module with some additional configuration options suitable for the Tamedia platform.

See the network example how to use it and how to retrieve informations on the created resources from another stack.

Requirements

Name Version
terraform >= 1.10
aws >= 5.42

Providers

Name Version
aws >= 5.42

Modules

Name Source Version
ssm ./../ssm n/a
vpc terraform-aws-modules/vpc/aws 6.4.0

Resources

Name Type
aws_security_group.vpc_endpoints resource
aws_vpc_endpoint.ecr_api resource
aws_vpc_endpoint.ecr_dkr resource
aws_vpc_endpoint.s3 resource
aws_availability_zones.available data source
aws_region.current data source

Inputs

Name Description Type Default Required
az_count Number of availability zones to use number 3 no
cidr The CIDR block for the VPC string "10.0.0.0/16" no
create_vpc Create the VPC bool true no
create_vpc_endpoints Whether to create VPC endpoints for ECR and S3 bool false no
enable_nat_gateway Enable NAT Gateways bool true no
enabled_vpc_endpoints_private_dns Whether to enable private DNS for VPC endpoints bool true no
secondary_cidr_blocks List of secondary CIDR blocks to associate with the VPC to extend the IP Address pool list(string) [] no
single_nat_gateway Use a single NAT Gateway bool true no
stack_name The stack name for the resources string n/a yes
subnet_configs List of networks objects with their name and size in bits. The order of the list should not change. list(map(number))
[
{
"public": 24
},
{
"private": 24
},
{
"intra": 26
},
{
"database": 26
},
{
"elasticache": 26
},
{
"redshift": 26
}
]
no
tags A map of tags to add to all resources map(string) {} no

Outputs

Name Description
additional_cidr_blocks The additional CIDR blocks associated with the VPC
cidr The base CIDR block for the VPC
grouped_networks A map of subnet names to their respective list of CIDR blocks.
networks A list of network objects with name, az, hosts, and cidr_block.
vpc Map of attributes for the VPC
vpc_endpoint_ecr_api_id The ID of the ECR API VPC endpoint
vpc_endpoint_ecr_dkr_id The ID of the ECR DKR VPC endpoint
vpc_endpoint_s3_id The ID of the S3 VPC endpoint
vpc_endpoints_security_group_id The ID of the VPC endpoints security group

Requirements

Name Version
terraform >= 1.3.2
aws >= 5.42.0

Providers

Name Version
aws >= 5.42.0

Modules

Name Source Version
vpc terraform-aws-modules/vpc/aws 5.8.1

Resources

Name Type
aws_availability_zones.available data source

Inputs

Name Description Type Default Required
az_count Number of availability zones to use number 3 no
cidr The CIDR block for the VPC string "10.0.0.0/16" no
create_vpc Create the VPC bool true no
enable_nat_gateway Enable NAT Gateways bool true no
single_nat_gateway Use a single NAT Gateway bool true no
stack_name The stack name for the resources string n/a yes
subnet_configs List of networks objects with their name and size in bits. The order of the list should not change. list(map(number))
[
{
"public": 24
},
{
"private": 24
},
{
"intra": 26
},
{
"database": 26
},
{
"redshift": 26
},
{
"karpenter": 22
}
]
no
tags A map of tags to add to all resources map(string) {} no

Outputs

Name Description
cidr The base CIDR block for the VPC
grouped_networks A map of subnet names to their respective details and list of CIDR blocks.
network_cidr_blocks A map from network names to allocated address prefixes in CIDR notation.
networks A list of network objects with name, az, hosts, and cidr_block.
vpc Map of attributes for the VPC