Skip to content

Commit f7d6fa2

Browse files
committed
remove db subnet groups from tgw and cwan
1 parent b2c47ac commit f7d6fa2

File tree

4 files changed

+0
-100
lines changed

4 files changed

+0
-100
lines changed

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ No modules.
275275
|------|------|
276276
| [aws_cloudwatch_log_group.flow_log](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
277277
| [aws_customer_gateway.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/customer_gateway) | resource |
278-
| [aws_db_subnet_group.cwan](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_subnet_group) | resource |
279278
| [aws_db_subnet_group.database](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_subnet_group) | resource |
280-
| [aws_db_subnet_group.tgw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_subnet_group) | resource |
281279
| [aws_default_network_acl.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_network_acl) | resource |
282280
| [aws_default_route_table.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_route_table) | resource |
283281
| [aws_default_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_security_group) | resource |
@@ -389,7 +387,6 @@ No modules.
389387
| <a name="input_cidr"></a> [cidr](#input\_cidr) | (Optional) The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4_netmask_length` & `ipv4_ipam_pool_id` | `string` | `"10.0.0.0/16"` | no |
390388
| <a name="input_create_cwan_internet_gateway_route"></a> [create\_cwan\_internet\_gateway\_route](#input\_create\_cwan\_internet\_gateway\_route) | Controls if an internet gateway route for public CloudWAN access should be created | `bool` | `false` | no |
391389
| <a name="input_create_cwan_nat_gateway_route"></a> [create\_cwan\_nat\_gateway\_route](#input\_create\_cwan\_nat\_gateway\_route) | Controls if a nat gateway route should be created to give internet access to the CloudWAN subnets | `bool` | `false` | no |
392-
| <a name="input_create_cwan_subnet_group"></a> [create\_cwan\_subnet\_group](#input\_create\_cwan\_subnet\_group) | Controls if CloudWAN subnet group should be created (n.b. cwan\_subnets must also be set) | `bool` | `true` | no |
393390
| <a name="input_create_cwan_subnet_route_table"></a> [create\_cwan\_subnet\_route\_table](#input\_create\_cwan\_subnet\_route\_table) | Controls if separate route table for CloudWAN should be created | `bool` | `false` | no |
394391
| <a name="input_create_database_internet_gateway_route"></a> [create\_database\_internet\_gateway\_route](#input\_create\_database\_internet\_gateway\_route) | Controls if an internet gateway route for public database access should be created | `bool` | `false` | no |
395392
| <a name="input_create_database_nat_gateway_route"></a> [create\_database\_nat\_gateway\_route](#input\_create\_database\_nat\_gateway\_route) | Controls if a nat gateway route should be created to give internet access to the database subnets | `bool` | `false` | no |
@@ -408,7 +405,6 @@ No modules.
408405
| <a name="input_create_redshift_subnet_route_table"></a> [create\_redshift\_subnet\_route\_table](#input\_create\_redshift\_subnet\_route\_table) | Controls if separate route table for redshift should be created | `bool` | `false` | no |
409406
| <a name="input_create_tgw_internet_gateway_route"></a> [create\_tgw\_internet\_gateway\_route](#input\_create\_tgw\_internet\_gateway\_route) | Controls if an internet gateway route for public transit gateway access should be created | `bool` | `false` | no |
410407
| <a name="input_create_tgw_nat_gateway_route"></a> [create\_tgw\_nat\_gateway\_route](#input\_create\_tgw\_nat\_gateway\_route) | Controls if a nat gateway route should be created to give internet access to the transit gateway subnets | `bool` | `false` | no |
411-
| <a name="input_create_tgw_subnet_group"></a> [create\_tgw\_subnet\_group](#input\_create\_tgw\_subnet\_group) | Controls if transit gateway subnet group should be created (n.b. tgw\_subnets must also be set) | `bool` | `true` | no |
412408
| <a name="input_create_tgw_subnet_route_table"></a> [create\_tgw\_subnet\_route\_table](#input\_create\_tgw\_subnet\_route\_table) | Controls if separate route table for transit gateway should be created | `bool` | `false` | no |
413409
| <a name="input_create_vpc"></a> [create\_vpc](#input\_create\_vpc) | Controls if VPC should be created (it affects almost all resources) | `bool` | `true` | no |
414410
| <a name="input_customer_gateway_tags"></a> [customer\_gateway\_tags](#input\_customer\_gateway\_tags) | Additional tags for the Customer Gateway | `map(string)` | `{}` | no |
@@ -423,8 +419,6 @@ No modules.
423419
| <a name="input_cwan_subnet_enable_dns64"></a> [cwan\_subnet\_enable\_dns64](#input\_cwan\_subnet\_enable\_dns64) | Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `true` | `bool` | `true` | no |
424420
| <a name="input_cwan_subnet_enable_resource_name_dns_a_record_on_launch"></a> [cwan\_subnet\_enable\_resource\_name\_dns\_a\_record\_on\_launch](#input\_cwan\_subnet\_enable\_resource\_name\_dns\_a\_record\_on\_launch) | Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false` | `bool` | `false` | no |
425421
| <a name="input_cwan_subnet_enable_resource_name_dns_aaaa_record_on_launch"></a> [cwan\_subnet\_enable\_resource\_name\_dns\_aaaa\_record\_on\_launch](#input\_cwan\_subnet\_enable\_resource\_name\_dns\_aaaa\_record\_on\_launch) | Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `true` | `bool` | `true` | no |
426-
| <a name="input_cwan_subnet_group_name"></a> [cwan\_subnet\_group\_name](#input\_cwan\_subnet\_group\_name) | Name of CloudWAN subnet group | `string` | `null` | no |
427-
| <a name="input_cwan_subnet_group_tags"></a> [cwan\_subnet\_group\_tags](#input\_cwan\_subnet\_group\_tags) | Additional tags for the CloudWAN subnet group | `map(string)` | `{}` | no |
428422
| <a name="input_cwan_subnet_ipv6_native"></a> [cwan\_subnet\_ipv6\_native](#input\_cwan\_subnet\_ipv6\_native) | Indicates whether to create an IPv6-only subnet. Default: `false` | `bool` | `false` | no |
429423
| <a name="input_cwan_subnet_ipv6_prefixes"></a> [cwan\_subnet\_ipv6\_prefixes](#input\_cwan\_subnet\_ipv6\_prefixes) | Assigns IPv6 CloudWAN subnet id based on the Amazon provided /56 prefix base 10 integer (0-256). Must be of equal length to the corresponding IPv4 subnet list | `list(string)` | `[]` | no |
430424
| <a name="input_cwan_subnet_names"></a> [cwan\_subnet\_names](#input\_cwan\_subnet\_names) | Explicit values to use in the Name tag on CloudWAN subnets. If empty, Name tags are generated | `list(string)` | `[]` | no |
@@ -640,8 +634,6 @@ No modules.
640634
| <a name="input_tgw_subnet_enable_dns64"></a> [tgw\_subnet\_enable\_dns64](#input\_tgw\_subnet\_enable\_dns64) | Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `true` | `bool` | `true` | no |
641635
| <a name="input_tgw_subnet_enable_resource_name_dns_a_record_on_launch"></a> [tgw\_subnet\_enable\_resource\_name\_dns\_a\_record\_on\_launch](#input\_tgw\_subnet\_enable\_resource\_name\_dns\_a\_record\_on\_launch) | Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false` | `bool` | `false` | no |
642636
| <a name="input_tgw_subnet_enable_resource_name_dns_aaaa_record_on_launch"></a> [tgw\_subnet\_enable\_resource\_name\_dns\_aaaa\_record\_on\_launch](#input\_tgw\_subnet\_enable\_resource\_name\_dns\_aaaa\_record\_on\_launch) | Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `true` | `bool` | `true` | no |
643-
| <a name="input_tgw_subnet_group_name"></a> [tgw\_subnet\_group\_name](#input\_tgw\_subnet\_group\_name) | Name of transit gateway subnet group | `string` | `null` | no |
644-
| <a name="input_tgw_subnet_group_tags"></a> [tgw\_subnet\_group\_tags](#input\_tgw\_subnet\_group\_tags) | Additional tags for the transit gateway subnet group | `map(string)` | `{}` | no |
645637
| <a name="input_tgw_subnet_ipv6_native"></a> [tgw\_subnet\_ipv6\_native](#input\_tgw\_subnet\_ipv6\_native) | Indicates whether to create an IPv6-only subnet. Default: `false` | `bool` | `false` | no |
646638
| <a name="input_tgw_subnet_ipv6_prefixes"></a> [tgw\_subnet\_ipv6\_prefixes](#input\_tgw\_subnet\_ipv6\_prefixes) | Assigns IPv6 transit gateway subnet id based on the Amazon provided /56 prefix base 10 integer (0-256). Must be of equal length to the corresponding IPv4 subnet list | `list(string)` | `[]` | no |
647639
| <a name="input_tgw_subnet_names"></a> [tgw\_subnet\_names](#input\_tgw\_subnet\_names) | Explicit values to use in the Name tag on transit gateway subnets. If empty, Name tags are generated | `list(string)` | `[]` | no |
@@ -678,8 +670,6 @@ No modules.
678670
| <a name="output_cwan_route_table_association_ids"></a> [cwan\_route\_table\_association\_ids](#output\_cwan\_route\_table\_association\_ids) | List of IDs of the CloudWAN route table association |
679671
| <a name="output_cwan_route_table_ids"></a> [cwan\_route\_table\_ids](#output\_cwan\_route\_table\_ids) | List of IDs of CloudWAN route tables |
680672
| <a name="output_cwan_subnet_arns"></a> [cwan\_subnet\_arns](#output\_cwan\_subnet\_arns) | List of ARNs of CloudWAN subnets |
681-
| <a name="output_cwan_subnet_group"></a> [cwan\_subnet\_group](#output\_cwan\_subnet\_group) | ID of CloudWAN subnet group |
682-
| <a name="output_cwan_subnet_group_name"></a> [cwan\_subnet\_group\_name](#output\_cwan\_subnet\_group\_name) | Name of CloudWAN subnet group |
683673
| <a name="output_cwan_subnet_objects"></a> [cwan\_subnet\_objects](#output\_cwan\_subnet\_objects) | A list of all CloudWAN subnets, containing the full objects. |
684674
| <a name="output_cwan_subnets"></a> [cwan\_subnets](#output\_cwan\_subnets) | List of IDs of CloudWAN subnets |
685675
| <a name="output_cwan_subnets_cidr_blocks"></a> [cwan\_subnets\_cidr\_blocks](#output\_cwan\_subnets\_cidr\_blocks) | List of cidr\_blocks of CloudWAN subnets |
@@ -788,8 +778,6 @@ No modules.
788778
| <a name="output_tgw_route_table_association_ids"></a> [tgw\_route\_table\_association\_ids](#output\_tgw\_route\_table\_association\_ids) | List of IDs of the transit gateway route table association |
789779
| <a name="output_tgw_route_table_ids"></a> [tgw\_route\_table\_ids](#output\_tgw\_route\_table\_ids) | List of IDs of transit gateway route tables |
790780
| <a name="output_tgw_subnet_arns"></a> [tgw\_subnet\_arns](#output\_tgw\_subnet\_arns) | List of ARNs of transit gateway subnets |
791-
| <a name="output_tgw_subnet_group"></a> [tgw\_subnet\_group](#output\_tgw\_subnet\_group) | ID of transit gateway subnet group |
792-
| <a name="output_tgw_subnet_group_name"></a> [tgw\_subnet\_group\_name](#output\_tgw\_subnet\_group\_name) | Name of transit gateway subnet group |
793781
| <a name="output_tgw_subnet_objects"></a> [tgw\_subnet\_objects](#output\_tgw\_subnet\_objects) | A list of all transit gateway subnets, containing the full objects. |
794782
| <a name="output_tgw_subnets"></a> [tgw\_subnets](#output\_tgw\_subnets) | List of IDs of transit gateway subnets |
795783
| <a name="output_tgw_subnets_cidr_blocks"></a> [tgw\_subnets\_cidr\_blocks](#output\_tgw\_subnets\_cidr\_blocks) | List of cidr\_blocks of transit gateway subnets |

main.tf

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,22 +1086,6 @@ resource "aws_subnet" "tgw" {
10861086
)
10871087
}
10881088

1089-
resource "aws_db_subnet_group" "tgw" {
1090-
count = local.create_tgw_subnets && var.create_tgw_subnet_group ? 1 : 0
1091-
1092-
name = lower(coalesce(var.tgw_subnet_group_name, var.name))
1093-
description = "tgw subnet group for ${var.name}"
1094-
subnet_ids = aws_subnet.tgw[*].id
1095-
1096-
tags = merge(
1097-
{
1098-
"Name" = lower(coalesce(var.tgw_subnet_group_name, var.name))
1099-
},
1100-
var.tags,
1101-
var.tgw_subnet_group_tags,
1102-
)
1103-
}
1104-
11051089
resource "aws_route_table" "tgw" {
11061090
count = local.create_tgw_route_table ? var.single_nat_gateway || var.create_tgw_internet_gateway_route ? 1 : local.len_tgw_subnets : 0
11071091

@@ -1268,22 +1252,6 @@ resource "aws_subnet" "cwan" {
12681252
)
12691253
}
12701254

1271-
resource "aws_db_subnet_group" "cwan" {
1272-
count = local.create_cwan_subnets && var.create_cwan_subnet_group ? 1 : 0
1273-
1274-
name = lower(coalesce(var.cwan_subnet_group_name, var.name))
1275-
description = "CloudWAN subnet group for ${var.name}"
1276-
subnet_ids = aws_subnet.cwan[*].id
1277-
1278-
tags = merge(
1279-
{
1280-
"Name" = lower(coalesce(var.cwan_subnet_group_name, var.name))
1281-
},
1282-
var.tags,
1283-
var.cwan_subnet_group_tags,
1284-
)
1285-
}
1286-
12871255
resource "aws_route_table" "cwan" {
12881256
count = local.create_cwan_route_table ? var.single_nat_gateway || var.create_cwan_internet_gateway_route ? 1 : local.len_cwan_subnets : 0
12891257

outputs.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -534,16 +534,6 @@ output "tgw_subnets_ipv6_cidr_blocks" {
534534
value = compact(aws_subnet.tgw[*].ipv6_cidr_block)
535535
}
536536

537-
output "tgw_subnet_group" {
538-
description = "ID of transit gateway subnet group"
539-
value = try(aws_db_subnet_group.tgw[0].id, null)
540-
}
541-
542-
output "tgw_subnet_group_name" {
543-
description = "Name of transit gateway subnet group"
544-
value = try(aws_db_subnet_group.tgw[0].name, null)
545-
}
546-
547537
output "tgw_route_table_ids" {
548538
description = "List of IDs of transit gateway route tables"
549539
# Refer to https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/926 before changing logic
@@ -609,16 +599,6 @@ output "cwan_subnets_ipv6_cidr_blocks" {
609599
value = compact(aws_subnet.cwan[*].ipv6_cidr_block)
610600
}
611601

612-
output "cwan_subnet_group" {
613-
description = "ID of CloudWAN subnet group"
614-
value = try(aws_db_subnet_group.cwan[0].id, null)
615-
}
616-
617-
output "cwan_subnet_group_name" {
618-
description = "Name of CloudWAN subnet group"
619-
value = try(aws_db_subnet_group.cwan[0].name, null)
620-
}
621-
622602
output "cwan_route_table_ids" {
623603
description = "List of IDs of CloudWAN route tables"
624604
# Refer to https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/926 before changing logic

variables.tf

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,24 +1272,6 @@ variable "tgw_subnet_tags" {
12721272
default = {}
12731273
}
12741274

1275-
variable "create_tgw_subnet_group" {
1276-
description = "Controls if transit gateway subnet group should be created (n.b. tgw_subnets must also be set)"
1277-
type = bool
1278-
default = true
1279-
}
1280-
1281-
variable "tgw_subnet_group_name" {
1282-
description = "Name of transit gateway subnet group"
1283-
type = string
1284-
default = null
1285-
}
1286-
1287-
variable "tgw_subnet_group_tags" {
1288-
description = "Additional tags for the transit gateway subnet group"
1289-
type = map(string)
1290-
default = {}
1291-
}
1292-
12931275
################################################################################
12941276
# Transit Gateway Network ACLs
12951277
################################################################################
@@ -1430,24 +1412,6 @@ variable "cwan_subnet_tags" {
14301412
default = {}
14311413
}
14321414

1433-
variable "create_cwan_subnet_group" {
1434-
description = "Controls if CloudWAN subnet group should be created (n.b. cwan_subnets must also be set)"
1435-
type = bool
1436-
default = true
1437-
}
1438-
1439-
variable "cwan_subnet_group_name" {
1440-
description = "Name of CloudWAN subnet group"
1441-
type = string
1442-
default = null
1443-
}
1444-
1445-
variable "cwan_subnet_group_tags" {
1446-
description = "Additional tags for the CloudWAN subnet group"
1447-
type = map(string)
1448-
default = {}
1449-
}
1450-
14511415
################################################################################
14521416
# CloudWAN Network ACLs
14531417
################################################################################

0 commit comments

Comments
 (0)