Skip to content

transcom/terraform-aws-destroy-default-vpc

 
 

Repository files navigation

DEPRECIATION NOTICE

This module has been deprecated and is no longer maintained. Should you need to continue to use it, please fork the repository. Thank you.

Supports management of all default networking resources in an AWS region. Use this module to lock down those resource by removing ingress/egress rules for the default network ACL and the ingress/egress rules for the default security group rules. These resources are special so please read the accompanying documentation below.

Resources supported:

WARNING: The management of default VPC resources in AWS is meant to close security holes and follow best practices. If you have an architecture that relies on default VPC resources DO NOT use this module until those resources have been moved to non-default resources. Once you apply this module to your architecture it is incredibly hard to undo as simply removing the module will not "reset" any changes made by the module. Please read the linked terraform docs above for more information about managing default resources.

Terraform Versions

Terraform 0.13 and newer. Pin module version to ~> 2.X . Submit pull-requests to master branch.

Terraform 0.12. Pin module version to ~> 1X . Submit pull-requests to terraform012 branch.

Usage

# Allows all services to log to bucket
module "default_vpc" {
  source = "trussworks/destroy-default-vpc/aws"
}

An example that will apply to all regions in an account:

data "aws_regions" "current" {}

module "default_vpc" {
  source = "trussworks/destroy-default-vpc/aws"
  for_each = toset(data.aws_regions.current.names)
  region = each.value
}

Requirements

Name Version
terraform >= 0.13
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

No modules.

Resources

Name Type
aws_default_network_acl.default resource
aws_default_route_table.default resource
aws_default_security_group.default resource
aws_default_subnet.default_azs resource
aws_default_vpc.default resource
aws_default_vpc_dhcp_options.default resource
aws_region.current data source

Inputs

Name Description Type Default Required
azs List of AZs to manage using only the letters, not full AZ name list(string)
[
"a",
"b",
"c",
"d"
]
no

Outputs

Name Description
network_acl The Default Network ACL
route_table The Default Route Table
security_group The Default Security Group
subnets The Default Subnets
vpc The Default VPC
vpc_dhcp_options The Default VPC DHCP Options Set

Upgrade Paths

Upgrading from 1.0.0 to TBD

TBD - No upgrade paths yet

Developer Setup

Install dependencies (macOS)

brew install pre-commit terraform terraform-docs

Testing

make test

About

Default VPC resource management for AWS Accounts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 87.4%
  • Makefile 12.6%