diff --git a/README.md b/README.md index c38bd86fb..1cacc02c2 100644 --- a/README.md +++ b/README.md @@ -346,7 +346,7 @@ No modules. | [default\_security\_group\_ingress](#input\_default\_security\_group\_ingress) | List of maps of ingress rules to set on the default security group | `list(map(string))` | `[]` | no | | [default\_security\_group\_name](#input\_default\_security\_group\_name) | Name to be used on the default security group | `string` | `null` | no | | [default\_security\_group\_tags](#input\_default\_security\_group\_tags) | Additional tags for the default security group | `map(string)` | `{}` | no | -| [default\_vpc\_enable\_classiclink](#input\_default\_vpc\_enable\_classiclink) | Should be true to enable ClassicLink in the Default VPC | `bool` | `false` | no | +| [default\_vpc\_enable\_classiclink](#input\_default\_vpc\_enable\_classiclink) | [DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) Should be true to enable ClassicLink in the Default VPC | `bool` | `false` | no | | [default\_vpc\_enable\_dns\_hostnames](#input\_default\_vpc\_enable\_dns\_hostnames) | Should be true to enable DNS hostnames in the Default VPC | `bool` | `false` | no | | [default\_vpc\_enable\_dns\_support](#input\_default\_vpc\_enable\_dns\_support) | Should be true to enable DNS support in the Default VPC | `bool` | `true` | no | | [default\_vpc\_name](#input\_default\_vpc\_name) | Name to be used on the Default VPC | `string` | `null` | no | @@ -369,8 +369,8 @@ No modules. | [elasticache\_subnet\_suffix](#input\_elasticache\_subnet\_suffix) | Suffix to append to elasticache subnets name | `string` | `"elasticache"` | no | | [elasticache\_subnet\_tags](#input\_elasticache\_subnet\_tags) | Additional tags for the elasticache subnets | `map(string)` | `{}` | no | | [elasticache\_subnets](#input\_elasticache\_subnets) | A list of elasticache subnets | `list(string)` | `[]` | no | -| [enable\_classiclink](#input\_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](#input\_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\_classiclink](#input\_enable\_classiclink) | [DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) 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](#input\_enable\_classiclink\_dns\_support) | [DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) 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\_dhcp\_options](#input\_enable\_dhcp\_options) | Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type | `bool` | `false` | no | | [enable\_dns\_hostnames](#input\_enable\_dns\_hostnames) | Should be true to enable DNS hostnames in the VPC | `bool` | `false` | no | | [enable\_dns\_support](#input\_enable\_dns\_support) | Should be true to enable DNS support in the VPC | `bool` | `true` | no | diff --git a/examples/complete-vpc/main.tf b/examples/complete-vpc/main.tf index c9222f601..73af73caf 100644 --- a/examples/complete-vpc/main.tf +++ b/examples/complete-vpc/main.tf @@ -20,15 +20,15 @@ module "vpc" { source = "../../" name = local.name - cidr = "20.10.0.0/16" # 10.0.0.0/8 is reserved for EC2-Classic + cidr = "10.0.0.0/16" azs = ["${local.region}a", "${local.region}b", "${local.region}c"] - 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"] + private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] + public_subnets = ["10.0.11.0/24", "10.0.12.0/24", "10.0.13.0/24"] + database_subnets = ["10.0.21.0/24", "10.0.22.0/24", "10.0.23.0/24"] + elasticache_subnets = ["10.0.31.0/24", "10.0.32.0/24", "10.0.33.0/24"] + redshift_subnets = ["10.0.41.0/24", "10.0.42.0/24", "10.0.43.0/24"] + intra_subnets = ["10.0.51.0/24", "10.0.52.0/24", "10.0.53.0/24"] create_database_subnet_group = false @@ -44,9 +44,6 @@ module "vpc" { 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 9c020d2a1..7cf27cfd1 100644 --- a/main.tf +++ b/main.tf @@ -24,8 +24,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 + enable_classiclink = null # https://github.com/hashicorp/terraform/issues/31730 + enable_classiclink_dns_support = null # https://github.com/hashicorp/terraform/issues/31730 assign_generated_ipv6_cidr_block = var.enable_ipv6 tags = merge( @@ -1234,7 +1234,7 @@ resource "aws_default_vpc" "this" { enable_dns_support = var.default_vpc_enable_dns_support enable_dns_hostnames = var.default_vpc_enable_dns_hostnames - enable_classiclink = var.default_vpc_enable_classiclink + enable_classiclink = null # https://github.com/hashicorp/terraform/issues/31730 tags = merge( { "Name" = coalesce(var.default_vpc_name, "default") }, diff --git a/variables.tf b/variables.tf index 99f20c934..66d78584f 100644 --- a/variables.tf +++ b/variables.tf @@ -280,14 +280,16 @@ variable "enable_dns_support" { default = true } +# tflint-ignore: terraform_unused_declarations variable "enable_classiclink" { - description = "Should be true to enable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic." + description = "[DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) Should be true to enable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic." type = bool default = null } +# tflint-ignore: terraform_unused_declarations 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." + description = "[DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) 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 } @@ -694,8 +696,9 @@ variable "default_vpc_enable_dns_hostnames" { default = false } +# tflint-ignore: terraform_unused_declarations variable "default_vpc_enable_classiclink" { - description = "Should be true to enable ClassicLink in the Default VPC" + description = "[DEPRECATED](https://github.com/hashicorp/terraform/issues/31730) Should be true to enable ClassicLink in the Default VPC" type = bool default = false }