Skip to content

plus3it/terraform-aws-tardigrade-route53-resolver

Repository files navigation

terraform-aws-tardigrade-route53-resolver

Terraform module to manage a Route53 Resolver.

Testing

At the moment, testing is manual:

# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx 
make terraform/pytest PYTEST_ARGS="-v --nomock"

For automated testing, PYTEST_ARGS is optional and no profile is needed:

make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean

Requirements

Name Version
terraform >= 0.13
aws >= 3.49.0

Providers

Name Version
aws >= 3.49.0

Resources

Name Type

Inputs

Name Description Type Default Required
direction Direction of DNS queries to or from the Route 53 Resolver endpoint. Valid values are INBOUND (resolver forwards DNS queries to the DNS service for a VPC from your network or another VPC) or OUTBOUND (resolver forwards DNS queries from the DNS service for a VPC to your network or another VPC) string n/a yes
ip_addresses List of IP address objects for the resolver endpoint
list(object({
# ID of the subnet in which to create the resolver endpoint
subnet_id = string
# IP to use for the resolver endpoint (set to null to let AWS choose an IP)
ip = string
}))
n/a yes
security_group_ids List of security group IDs for the resolver endpoint list(string) n/a yes
name Name of the Route 53 resolver endpoint string null no
query_log_configs List of query log configurations for the resolver endpoint
list(object({
name = string
destination_arn = string
tags = map(string)
associations = list(object({
# name used as for_each key
name = string
# ID of a VPC to associate with this query log configuration
resource_id = string
}))
}))
[] no
rules List of resolver rules for the resolver endpoint
list(object({
domain_name = string
name = string
rule_type = string
tags = map(string)
target_ips = list(object({
# IP address where DNS queries will be forwarded (must be IPv4)
ip = string
# Port at ip listening for DNS queries (set to null to default to 53)
port = number
}))
associations = list(object({
# name used as for_each key
name = string
# ID of a VPC to associate with the resolver rule
vpc_id = string
}))
}))
[] no
tags ID of the rule to associate to the VPC map(string) {} no

Outputs

Name Description
query_log_configs Map of Route53 resolver query log configurations and associations
resolver_endpoint Object containing the Route53 resolver endpoint
rules Map of Route53 resolver rules and associations