Skip to content

Terraform module for VPC creation

License

Notifications You must be signed in to change notification settings

virsas/terraform_vpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform_vpc

Terraform module to create VPC in AWS using terraform

Variables

# name: the name of the VPC
# block: the IP allocation for the VPC
# logtype: type of the logs if logflow is enabled. If disabled, this can be an empty string.
# logtype: Valid values: ACCEPT,REJECT, ALL 
# logformat: type of the format of the stored logs.
# logformat: Valid values: plain-text, parquet
# logperhour: Indicates whether to partition the flow log per hour to reduce the AWS cost
variable "example_vpc" { default = { name = "example", block = "10.0.0.0/16", logtype = "ALL", logformat = "parquet", logperhour = true} }
vpc = var.example_vpc

# to enable logflow to comply with AWS recommendation
logflow = true

# ARN of the S3 log bucket
logsbucket = module.s3_logs.arn

Terraform example

######################
# VPC Variables
######################
variable "vpc" { default = { name = "example", block = "10.0.0.0/16", logtype = "ALL", logformat = "parquet", logperhour = true} }

######################
# VPC
######################
module "vpc_main" {
  source = "git::https://github.com/virsas/terraform_vpc.git?ref=v1.0.0"
  vpc  = var.vpc
  logflow = true
  logsbucket = module.s3_logs.arn
}

About

Terraform module for VPC creation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages