Skip to content

Commit fcca66b

Browse files
committed
feat: Add route53_resolver_config_autodefined_reverse_flag
1 parent cf73787 commit fcca66b

File tree

8 files changed

+54
-0
lines changed

8 files changed

+54
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ No modules.
304304
| [aws_route.private_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
305305
| [aws_route.public_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
306306
| [aws_route.public_internet_gateway_ipv6](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
307+
| [aws_route53_resolver_config.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_resolver_config) | resource |
307308
| [aws_route_table.database](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
308309
| [aws_route_table.elasticache](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
309310
| [aws_route_table.intra](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
@@ -435,6 +436,7 @@ No modules.
435436
| <a name="input_enable_nat_gateway"></a> [enable\_nat\_gateway](#input\_enable\_nat\_gateway) | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |
436437
| <a name="input_enable_network_address_usage_metrics"></a> [enable\_network\_address\_usage\_metrics](#input\_enable\_network\_address\_usage\_metrics) | Determines whether network address usage metrics are enabled for the VPC | `bool` | `null` | no |
437438
| <a name="input_enable_public_redshift"></a> [enable\_public\_redshift](#input\_enable\_public\_redshift) | Controls if redshift should have public routing table | `bool` | `false` | no |
439+
| <a name="input_enable_route53_resolver_config"></a> [enable\_route53\_resolver\_config](#input\_enable\_route53\_resolver\_config) | Whether to manage Route53 configuration for VPC | `bool` | `false` | no |
438440
| <a name="input_enable_vpn_gateway"></a> [enable\_vpn\_gateway](#input\_enable\_vpn\_gateway) | Should be true if you want to create a new VPN Gateway resource and attach it to the VPC | `bool` | `false` | no |
439441
| <a name="input_external_nat_ip_ids"></a> [external\_nat\_ip\_ids](#input\_external\_nat\_ip\_ids) | List of EIP IDs to be assigned to the NAT Gateways (used in combination with reuse\_nat\_ips) | `list(string)` | `[]` | no |
440442
| <a name="input_external_nat_ips"></a> [external\_nat\_ips](#input\_external\_nat\_ips) | List of EIPs to be used for `nat_public_ips` output (used in combination with reuse\_nat\_ips and external\_nat\_ip\_ids) | `list(string)` | `[]` | no |
@@ -565,6 +567,7 @@ No modules.
565567
| <a name="input_redshift_subnets"></a> [redshift\_subnets](#input\_redshift\_subnets) | A list of redshift subnets inside the VPC | `list(string)` | `[]` | no |
566568
| <a name="input_region"></a> [region](#input\_region) | Region where the resource(s) will be managed. Defaults to the region set in the provider configuration | `string` | `null` | no |
567569
| <a name="input_reuse_nat_ips"></a> [reuse\_nat\_ips](#input\_reuse\_nat\_ips) | Should be true if you don't want EIPs to be created for your NAT Gateways and will instead pass them in via the 'external\_nat\_ip\_ids' variable | `bool` | `false` | no |
570+
| <a name="input_route53_resolver_config_autodefined_reverse_flag"></a> [route53\_resolver\_config\_autodefined\_reverse\_flag](#input\_route53\_resolver\_config\_autodefined\_reverse\_flag) | Indicates whether or not the Resolver will create autodefined rules for reverse DNS lookups. | `string` | `"ENABLE"` | no |
568571
| <a name="input_secondary_cidr_blocks"></a> [secondary\_cidr\_blocks](#input\_secondary\_cidr\_blocks) | List of secondary CIDR blocks to associate with the VPC to extend the IP Address pool | `list(string)` | `[]` | no |
569572
| <a name="input_single_nat_gateway"></a> [single\_nat\_gateway](#input\_single\_nat\_gateway) | Should be true if you want to provision a single shared NAT Gateway across all of your private networks | `bool` | `false` | no |
570573
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
@@ -686,6 +689,7 @@ No modules.
686689
| <a name="output_redshift_subnets"></a> [redshift\_subnets](#output\_redshift\_subnets) | List of IDs of redshift subnets |
687690
| <a name="output_redshift_subnets_cidr_blocks"></a> [redshift\_subnets\_cidr\_blocks](#output\_redshift\_subnets\_cidr\_blocks) | List of cidr\_blocks of redshift subnets |
688691
| <a name="output_redshift_subnets_ipv6_cidr_blocks"></a> [redshift\_subnets\_ipv6\_cidr\_blocks](#output\_redshift\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of redshift subnets in an IPv6 enabled VPC |
692+
| <a name="output_route53_resolver_config"></a> [route53\_resolver\_config](#output\_route53\_resolver\_config) | The ID of the Route53 Resolver Config ressource |
689693
| <a name="output_this_customer_gateway"></a> [this\_customer\_gateway](#output\_this\_customer\_gateway) | Map of Customer Gateway attributes |
690694
| <a name="output_vgw_arn"></a> [vgw\_arn](#output\_vgw\_arn) | The ARN of the VPN Gateway |
691695
| <a name="output_vgw_id"></a> [vgw\_id](#output\_vgw\_id) | The ID of the VPN Gateway |

examples/complete/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ No inputs.
144144
| <a name="output_redshift_subnets"></a> [redshift\_subnets](#output\_redshift\_subnets) | List of IDs of redshift subnets |
145145
| <a name="output_redshift_subnets_cidr_blocks"></a> [redshift\_subnets\_cidr\_blocks](#output\_redshift\_subnets\_cidr\_blocks) | List of cidr\_blocks of redshift subnets |
146146
| <a name="output_redshift_subnets_ipv6_cidr_blocks"></a> [redshift\_subnets\_ipv6\_cidr\_blocks](#output\_redshift\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of redshift subnets in an IPv6 enabled VPC |
147+
| <a name="output_route53_resolver_config"></a> [route53\_resolver\_config](#output\_route53\_resolver\_config) | The ID of the Route53 Resolver Config ressource |
147148
| <a name="output_this_customer_gateway"></a> [this\_customer\_gateway](#output\_this\_customer\_gateway) | Map of Customer Gateway attributes |
148149
| <a name="output_vgw_arn"></a> [vgw\_arn](#output\_vgw\_arn) | The ARN of the VPN Gateway |
149150
| <a name="output_vgw_id"></a> [vgw\_id](#output\_vgw\_id) | The ID of the VPN Gateway |

examples/complete/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ module "vpc" {
7676
dhcp_options_domain_name = "service.consul"
7777
dhcp_options_domain_name_servers = ["127.0.0.1", "10.10.0.2"]
7878

79+
enable_route53_resolver_config = true
80+
route53_resolver_config_autodefined_reverse_flag = "DISABLE"
81+
7982
tags = local.tags
8083
}
8184

examples/complete/outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,3 +528,9 @@ output "vpc_endpoints_security_group_id" {
528528
description = "ID of the security group"
529529
value = module.vpc_endpoints.security_group_id
530530
}
531+
532+
# Resolver
533+
output "route53_resolver_config" {
534+
description = "The ID of the Route53 Resolver Config ressource"
535+
value = module.vpc.route53_resolver_config
536+
}

main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,3 +1541,15 @@ resource "aws_default_route_table" "default" {
15411541
var.default_route_table_tags,
15421542
)
15431543
}
1544+
1545+
1546+
################################################################################
1547+
# Route53 Resolver config
1548+
################################################################################
1549+
1550+
resource "aws_route53_resolver_config" "this" {
1551+
count = local.create_vpc && var.enable_route53_resolver_config ? 1 : 0
1552+
1553+
resource_id = aws_vpc.this[0].id
1554+
autodefined_reverse_flag = var.route53_resolver_config_autodefined_reverse_flag
1555+
}

outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,3 +667,13 @@ output "name" {
667667
description = "The name of the VPC specified as argument to this module"
668668
value = var.name
669669
}
670+
671+
672+
################################################################################
673+
# Route53 Resolver Config
674+
################################################################################
675+
676+
output "route53_resolver_config" {
677+
description = "The ID of the Route53 Resolver Config ressource"
678+
value = try(aws_route53_resolver_config.this[0].id, null)
679+
}

variables.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,3 +1678,19 @@ variable "putin_khuylo" {
16781678
type = bool
16791679
default = true
16801680
}
1681+
1682+
################################################################################
1683+
# Route53 Resolver
1684+
################################################################################
1685+
1686+
variable "enable_route53_resolver_config" {
1687+
description = "Whether to manage Route53 configuration for VPC"
1688+
type = bool
1689+
default = false
1690+
}
1691+
1692+
variable "route53_resolver_config_autodefined_reverse_flag" {
1693+
description = "Indicates whether or not the Resolver will create autodefined rules for reverse DNS lookups."
1694+
type = string
1695+
default = "ENABLE"
1696+
}

wrappers/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ module "wrapper" {
162162
enable_nat_gateway = try(each.value.enable_nat_gateway, var.defaults.enable_nat_gateway, false)
163163
enable_network_address_usage_metrics = try(each.value.enable_network_address_usage_metrics, var.defaults.enable_network_address_usage_metrics, null)
164164
enable_public_redshift = try(each.value.enable_public_redshift, var.defaults.enable_public_redshift, false)
165+
enable_route53_resolver_config = try(each.value.enable_route53_resolver_config, var.defaults.enable_route53_resolver_config, false)
165166
enable_vpn_gateway = try(each.value.enable_vpn_gateway, var.defaults.enable_vpn_gateway, false)
166167
external_nat_ip_ids = try(each.value.external_nat_ip_ids, var.defaults.external_nat_ip_ids, [])
167168
external_nat_ips = try(each.value.external_nat_ips, var.defaults.external_nat_ips, [])
@@ -382,6 +383,7 @@ module "wrapper" {
382383
redshift_subnets = try(each.value.redshift_subnets, var.defaults.redshift_subnets, [])
383384
region = try(each.value.region, var.defaults.region, null)
384385
reuse_nat_ips = try(each.value.reuse_nat_ips, var.defaults.reuse_nat_ips, false)
386+
route53_resolver_config_autodefined_reverse_flag = try(each.value.route53_resolver_config_autodefined_reverse_flag, var.defaults.route53_resolver_config_autodefined_reverse_flag, "ENABLE")
385387
secondary_cidr_blocks = try(each.value.secondary_cidr_blocks, var.defaults.secondary_cidr_blocks, [])
386388
single_nat_gateway = try(each.value.single_nat_gateway, var.defaults.single_nat_gateway, false)
387389
tags = try(each.value.tags, var.defaults.tags, {})

0 commit comments

Comments
 (0)