Skip to content

ryte/INF-tf-vpc

Repository files navigation

INF-tf-vpc

Terraform module for creating a vpc

there is a EGW and a IGW deployed along with the VPC and flowlogs are beeing setup

also a available in that module

This project is internal open source and currently maintained by the INF.

Requirements

The following requirements are needed by this module:

  • terraform (>= 0.12)

Providers

The following providers are used by this module:

  • aws

Required Inputs

The following input variables are required:

environment

Description: the environment this vpc is created in (e.g. 'testing')

Type: string

Optional Inputs

The following input variables are optional (have default values):

availability_zones

Description: Region AZs this VPC should cover. Currently this would be a list of two (a, b) or three (a, b, c) AZs.

Type: list

Default:

[
  "a",
  "b",
  "c"
]

cidr_v4

Description: VPC CIDR.

Type: string

Default: "10.0.0.0/16"

deploy_flowlogs

Description: Deploy or not deploy VPC flowlogs in CloudWatch Logs.

Type: bool

Default: true

domain_internal

Description: Set this to an internal domain name to be associated with the VPC.

Type: string

Default: ""

flowlogs_retention_in_days

Description: CloudWatch Logs entry retention in days.

Type: number

Default: 90

flowlogs_traffic_type

Description: The type of traffic to capture. Valid values: ACCEPT, REJECT, ALL

Type: string

Default: "REJECT"

tags

Description: common tags to add to the ressources

Type: map(string)

Default: {}

Outputs

The following outputs are exported:

egw_id

Description: ID of the Egress only gateway deployed along with the VPC.

id

Description: VPC id created.

igw_id

Description: ID of the Internet Gateway deployed along with the VPC

Usage

module "vpc" {
  tags                       = local.common_tags
  environment                = var.environment
  cidr_v4                    = var.cidr_v4
  flowlogs_retention_in_days = 5

  source = "github.com/ryte/INF-tf-vpc?ref=v0.3.1"
}

Authors

Changelog

  • 0.3.1 - Add variable environment instead of reading from tags
  • 0.3.0 - Upgrade to terraform 0.12.x
  • 0.2.0 - made the Route53 zone a variable instead of data lookup
  • 0.1.1 - replace egress only gateway with gateway in public subnet
  • 0.1.0 - Initial release.

License

This software is released under the MIT License (see LICENSE).

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages