Terraform module to create following AWS resources:
- VPC
- Intenet Gateway
- Subnets, Route Tables and Routes
- IAM role and policy for VPC flow log
At least following input variables must be provided. See full list of supported variables
Name | Description |
---|---|
name | Common name, a unique identifier |
To provision default configuration containing one private and one public subnet in each availability zone use:
module "network" {
source = "./modules/aws_network"
name = "Example Project"
}
By default vpc flow log is turned off as it applies additional charge. To turn it on add "vpc_flow_log_enabled" property:
module "network" {
source = "./modules/aws_network"
name = "Example Project"
vpc_flow_log_enabled = true
}
If any alterations to subnets required, use "subnets" parameter to specify custom configuration:
module "network" {
source = "./modules/aws_network"
name = "Example Project"
subnets = [
{
name = "public"
ig_attached = true
tags = {
kubernetes.io/cluster/eks-cluster = "shared",
kubernetes.io/role/elb = "1"
}
},
{
name = "eks"
ig_attached = false
tags = {
kubernetes.io/cluster/eks-cluster = "shared",
kubernetes.io/role/internal-elb = "1"
}
}
]
}
Full list of module outputs and their descriptions can be found in outputs.tf
The module is distributed under MIT License. Please make sure you have read, understood and agreed to it's terms and conditions
Vladimir Tiukhtin [email protected]
London