Skip to content

Provisions a VPC from the current AWS context including subnets

License

Notifications You must be signed in to change notification settings

goci-io/aws-kubernetes-vpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-kubernetes-vpc

terraform

This terraform module combines cloudposse/terraform-aws-vpc and cloudposse/terraform-aws-dynamic-subnets to provision a new AWS VPC with public and private subnets for use with kubernetes.

In addition it reads the current available AWS information as Terraform DataSource and uses some more available variables in the current context and adds required tags to VPC and subnets for kubernetes.

Important note: When using this module and kops your VPC may be deleted as it contains KubernetesCluster AWS Tags and all related resources created by this module. In case you want to avoid this you can override the KubernetesCluster tag and change it to something else than the cluster name.

Usage

module "vpc" {
  source           = "git::https://github.com/goci-io/aws-kubernetes-vpc.git?ref=tags/<latest-version>"
  namespace        = "goci"
  stage            = "staging"
  name             = "main"
  cidr_block       = "10.0.0.0/16"
  max_subnet_count = 3
}