All Projects → nozaq → terraform-aws-secure-vpc

nozaq / terraform-aws-secure-vpc

Licence: MIT license
A terraform module to create a VPC with secure default configurations.

Programming Languages

HCL
1544 projects

Projects that are alternatives of or similar to terraform-aws-secure-vpc

Prowler
Prowler is a security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. It contains more than 200 controls covering CIS, ISO27001, GDPR, HIPAA, SOC2, ENS and other security frameworks.
Stars: ✭ 4,561 (+34984.62%)
Mutual labels:  hardening, security-hardening, cis-benchmark, aws-auditing
prowler
Prowler is an Open Source Security tool for AWS, Azure and GCP to perform Cloud Security best practices assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. It contains hundreds of controls covering CIS, PCI-DSS, ISO27001, GDPR, HIPAA, FFIEC, SOC2, AWS FTR, ENS and custom security frameworks.
Stars: ✭ 8,046 (+61792.31%)
Mutual labels:  hardening, security-hardening, cis-benchmark
Windows11 Hardening
My Windows 11 x64 security hardening guide
Stars: ✭ 267 (+1953.85%)
Mutual labels:  hardening, security-hardening
Windows10 hardening
My Windows 10 x64 security hardening guide
Stars: ✭ 78 (+500%)
Mutual labels:  hardening, security-hardening
How To Secure A Linux Server
An evolving how-to guide for securing a Linux server.
Stars: ✭ 11,939 (+91738.46%)
Mutual labels:  hardening, security-hardening
cis-benchmark-centOS-8
Auditing Script based on CIS-BENCHMARK CENTOS 8
Stars: ✭ 34 (+161.54%)
Mutual labels:  hardening, cis-benchmark
Stronghold
Easily configure macOS security settings from the terminal.
Stars: ✭ 813 (+6153.85%)
Mutual labels:  hardening, security-hardening
Windows 10 Hardening
Windows 10 hardening guide without gimmicks
Stars: ✭ 102 (+684.62%)
Mutual labels:  hardening, security-hardening
Jshielder
Hardening Script for Linux Servers/ Secure LAMP-LEMP Deployer/ CIS Benchmark
Stars: ✭ 483 (+3615.38%)
Mutual labels:  hardening, security-hardening
Ansible Role Hardening
Ansible role to apply a security baseline. Systemd edition.
Stars: ✭ 188 (+1346.15%)
Mutual labels:  hardening, security-hardening
UBUNTU20-CIS
Ansible role for Ubuntu 2004 CIS Baseline
Stars: ✭ 136 (+946.15%)
Mutual labels:  security-hardening, cis-benchmark
Hardening
Hardening Ubuntu. Systemd edition.
Stars: ✭ 705 (+5323.08%)
Mutual labels:  hardening, security-hardening
Terraform Aws Secure Baseline
Terraform module to set up your AWS account with the secure baseline configuration based on CIS Amazon Web Services Foundations and AWS Foundational Security Best Practices.
Stars: ✭ 596 (+4484.62%)
Mutual labels:  hardening, security-hardening
Lynis
Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentless, and installation optional.
Stars: ✭ 9,137 (+70184.62%)
Mutual labels:  hardening, security-hardening
Snuffleupagus
Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest!
Stars: ✭ 509 (+3815.38%)
Mutual labels:  hardening, security-hardening
Content
Security automation content in SCAP, OSCAL, Bash, Ansible, and other formats
Stars: ✭ 1,219 (+9276.92%)
Mutual labels:  hardening, security-hardening
CIS-Ubuntu-20.04-Ansible
Ansible Role to Automate CIS v1.1.0 Ubuntu Linux 18.04 LTS, 20.04 LTS Remediation
Stars: ✭ 150 (+1053.85%)
Mutual labels:  hardening, cis-benchmark
nim-contra
Lightweight Self-Documenting Design by Contract Programming and Security Hardened mode.
Stars: ✭ 46 (+253.85%)
Mutual labels:  hardening, security-hardening
Hardentheworld
Harden the world is a community driven project to develop hardening guidelines and checklists for common software and devices.
Stars: ✭ 158 (+1115.38%)
Mutual labels:  hardening, security-hardening
cis benchmarks audit
Simple command line tool to check for compliance against CIS Benchmarks
Stars: ✭ 182 (+1300%)
Mutual labels:  hardening, cis-benchmark

terraform-aws-secure-vpc

Github Actions

Terraform Module Registry

A terraform module to create a VPC with secure default configurations. Most configurations are based on CIS Amazon web Services Foundations and CIS Amazon Web Services Three-tier Web Architecture Benchmark.

The primary goal of this module is to create a VPC itself in a secure manner without any boilerplate code hence it does not create any subnets except ones for NAT Gateways.

Features

  • Disable insecure default configurations, e.g. denying all traffic in the default security group etc.
  • Enable VPC Flow Logs to monitor all traffic type.
  • Create NAT Gateways in each availability zones with the dedicated subnets and Network ACL rules.
  • Create route tables for public/private subnets and set the private settings as default.

Usage

data "aws_caller_identity" "current" {}

module "secure_vpc" {
  source = "nozaq/secure-vpc/aws"

  aws_account_id          = data.aws_caller_identity.current.account_id
  cidr_block              = "10.0.0.0/8"
  availability_zones      = ["ap-northeast-1a", "ap-northeast-1c"]
  nat_subnet_cidr_blocks  = ["10.0.253.0/24", "10.0.254.0/24"]
  flow_logs_iam_role_name = "FlowLogsPublisher"
  flow_logs_group_name    = "SimpleVPCFlowLogs"

  tags = {
    Environment = "SimpleVPC"
  }
}

Inputs

Name Description Type Default Required
assign_generated_ipv6_cidr_block Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. string "false" no
availability_zones The availability zones to support with this VPC. list [] no
aws_account_id The AWS Account ID number of the account. string n/a yes
cidr_block The CIDR block for the VPC. string n/a yes
enable_dns_hostnames A boolean flag to enable/disable DNS hostnames in the VPC. string "false" no
enable_dns_support A boolean flag to enable/disable DNS support in the VPC. string "true" no
flow_logs_group_name The name of the CloudWatch Logs group for VPC Flow Logs. string n/a yes
flow_logs_iam_role_name The name of the IAM role to publish VPC Flow Logs. string n/a yes
flow_logs_key_deletion_window_in_days Duration in days after which the key is deleted after destruction of the resource, must be between 7 and 30 days. Defaults to 30 days. string "30" no
flow_logs_retention_in_days Specifies the number of days you want to retain VPC Flow Logs events. string "0" no
flow_logs_traffic_type The type of traffic to capture. Valid values: ACCEPT,REJECT, ALL string "ALL" no
instance_tenancy A tenancy option for instances launched into the VPC string "default" no
nat_subnet_cidr_blocks The CIDR blocks for the NAT subnets. list [] no
tags Tags to be attached to all resources created with this module. map {} no

Outputs

Name Description
default_network_acl_id The ID of the default network ACL
default_route_table_id The ID of the default route table
default_security_group_id The ID of the security group created by default on VPC creation
flow_logs_group_arn The ARN of the CloudWatch log group to which VPC Flow Logs will publish to.
internet_gateway_id The ID of the internet gateawy
nat_gateway_ids The ID of the NAT Gateawy
nat_gateway_private_ips The private IP address of the NAT Gateway
nat_gateway_public_ips The public IP address of the NAT Gateway
private_route_table_id The ID of the route table for private subnets
public_route_table_id The ID of the route table for public subnets
vpc_cidr_block The CIDR block of the VPC
vpc_enable_dns_hostnames Whether or not the VPC has DNS hostname support
vpc_enable_dns_support Whether or not the VPC has DNS support
vpc_id The ID of the VPC
vpc_instance_tenancy Tenancy of instances spin up within VPC
vpc_main_route_table_id The ID of the main route table associated with this VPC
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].