Commit 32d1aa1f authored by Anton Babenko's avatar Anton Babenko Committed by GitHub

Added support for EC2 ClassicLink (#322)

parent c0f5674e
...@@ -294,6 +294,8 @@ Sometimes it is handy to have public access to Redshift clusters (for example if ...@@ -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\_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 | | 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\_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\_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\_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 | | enable\_codecommit\_endpoint | Should be true if you want to provision an Codecommit endpoint to the VPC | string | `"false"` | no |
......
...@@ -12,21 +12,24 @@ module "vpc" { ...@@ -12,21 +12,24 @@ module "vpc" {
name = "complete-example" 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"] 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"] private_subnets = ["20.10.1.0/24", "20.10.2.0/24", "20.10.3.0/24"]
public_subnets = ["10.10.11.0/24", "10.10.12.0/24", "10.10.13.0/24"] public_subnets = ["20.10.11.0/24", "20.10.12.0/24", "20.10.13.0/24"]
database_subnets = ["10.10.21.0/24", "10.10.22.0/24", "10.10.23.0/24"] database_subnets = ["20.10.21.0/24", "20.10.22.0/24", "20.10.23.0/24"]
elasticache_subnets = ["10.10.31.0/24", "10.10.32.0/24", "10.10.33.0/24"] elasticache_subnets = ["20.10.31.0/24", "20.10.32.0/24", "20.10.33.0/24"]
redshift_subnets = ["10.10.41.0/24", "10.10.42.0/24", "10.10.43.0/24"] redshift_subnets = ["20.10.41.0/24", "20.10.42.0/24", "20.10.43.0/24"]
intra_subnets = ["10.10.51.0/24", "10.10.52.0/24", "10.10.53.0/24"] intra_subnets = ["20.10.51.0/24", "20.10.52.0/24", "20.10.53.0/24"]
create_database_subnet_group = false create_database_subnet_group = false
enable_dns_hostnames = true enable_dns_hostnames = true
enable_dns_support = true enable_dns_support = true
enable_classiclink = true
enable_classiclink_dns_support = true
enable_nat_gateway = true enable_nat_gateway = true
single_nat_gateway = true single_nat_gateway = true
......
...@@ -33,6 +33,8 @@ resource "aws_vpc" "this" { ...@@ -33,6 +33,8 @@ resource "aws_vpc" "this" {
instance_tenancy = var.instance_tenancy instance_tenancy = var.instance_tenancy
enable_dns_hostnames = var.enable_dns_hostnames enable_dns_hostnames = var.enable_dns_hostnames
enable_dns_support = var.enable_dns_support 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 assign_generated_ipv6_cidr_block = var.enable_ipv6
tags = merge( tags = merge(
......
...@@ -256,6 +256,18 @@ variable "enable_dns_support" { ...@@ -256,6 +256,18 @@ variable "enable_dns_support" {
default = true 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" { variable "enable_nat_gateway" {
description = "Should be true if you want to provision NAT Gateways for each of your private networks" description = "Should be true if you want to provision NAT Gateways for each of your private networks"
type = bool type = bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment