diff --git a/README.md b/README.md index e40fd72bd..a7511e2fc 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,8 @@ Sometimes it is handy to have public access to Redshift clusters (for example if | elasticloadbalancing\_endpoint\_security\_group\_ids | The ID of one or more security groups to associate with the network interface for Elastic Load Balancing endpoint | list(string) | `[]` | no | | elasticloadbalancing\_endpoint\_subnet\_ids | The ID of one or more subnets in which to create a network interface for Elastic Load Balancing endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | list(string) | `[]` | no | | enable\_apigw\_endpoint | Should be true if you want to provision an api gateway endpoint to the VPC | bool | `"false"` | no | +| enable\_classiclink | Should be true to enable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. | bool | `"null"` | no | +| enable\_classiclink\_dns\_support | Should be true to enable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic. | bool | `"null"` | no | | enable\_cloudtrail\_endpoint | Should be true if you want to provision a CloudTrail endpoint to the VPC | bool | `"false"` | no | | enable\_codebuild\_endpoint | Should be true if you want to provision an Codebuild endpoint to the VPC | string | `"false"` | no | | enable\_codecommit\_endpoint | Should be true if you want to provision an Codecommit endpoint to the VPC | string | `"false"` | no | diff --git a/examples/complete-vpc/main.tf b/examples/complete-vpc/main.tf index 6b60720a1..08336f8a1 100644 --- a/examples/complete-vpc/main.tf +++ b/examples/complete-vpc/main.tf @@ -12,21 +12,24 @@ module "vpc" { name = "complete-example" - cidr = "10.10.0.0/16" + cidr = "20.10.0.0/16" # 10.0.0.0/8 is reserved for EC2-Classic azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] - private_subnets = ["10.10.1.0/24", "10.10.2.0/24", "10.10.3.0/24"] - public_subnets = ["10.10.11.0/24", "10.10.12.0/24", "10.10.13.0/24"] - database_subnets = ["10.10.21.0/24", "10.10.22.0/24", "10.10.23.0/24"] - elasticache_subnets = ["10.10.31.0/24", "10.10.32.0/24", "10.10.33.0/24"] - redshift_subnets = ["10.10.41.0/24", "10.10.42.0/24", "10.10.43.0/24"] - intra_subnets = ["10.10.51.0/24", "10.10.52.0/24", "10.10.53.0/24"] + private_subnets = ["20.10.1.0/24", "20.10.2.0/24", "20.10.3.0/24"] + public_subnets = ["20.10.11.0/24", "20.10.12.0/24", "20.10.13.0/24"] + database_subnets = ["20.10.21.0/24", "20.10.22.0/24", "20.10.23.0/24"] + elasticache_subnets = ["20.10.31.0/24", "20.10.32.0/24", "20.10.33.0/24"] + redshift_subnets = ["20.10.41.0/24", "20.10.42.0/24", "20.10.43.0/24"] + intra_subnets = ["20.10.51.0/24", "20.10.52.0/24", "20.10.53.0/24"] create_database_subnet_group = false enable_dns_hostnames = true enable_dns_support = true + enable_classiclink = true + enable_classiclink_dns_support = true + enable_nat_gateway = true single_nat_gateway = true diff --git a/main.tf b/main.tf index d1c156a8e..65e779ff6 100644 --- a/main.tf +++ b/main.tf @@ -33,6 +33,8 @@ resource "aws_vpc" "this" { instance_tenancy = var.instance_tenancy enable_dns_hostnames = var.enable_dns_hostnames enable_dns_support = var.enable_dns_support + enable_classiclink = var.enable_classiclink + enable_classiclink_dns_support = var.enable_classiclink_dns_support assign_generated_ipv6_cidr_block = var.enable_ipv6 tags = merge( diff --git a/variables.tf b/variables.tf index a4ad827c7..ed3d12498 100644 --- a/variables.tf +++ b/variables.tf @@ -256,6 +256,18 @@ variable "enable_dns_support" { default = true } +variable "enable_classiclink" { + description = "Should be true to enable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic." + type = bool + default = null +} + +variable "enable_classiclink_dns_support" { + description = "Should be true to enable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic." + type = bool + default = null +} + variable "enable_nat_gateway" { description = "Should be true if you want to provision NAT Gateways for each of your private networks" type = bool