Skip to content

angelabad/terraform-aws-vpc-dns-forwarder

Repository files navigation

AWS VPC Dns Forwarder Terraform module

GitHub tag (latest by date) Vpc Dns Forwarder

Terraform module which creates dns domain forwarder with Route53 Resolver on AWS

These types of resources are supported:

Features

This module creates one outbound Route 53 Resolver and attach defined forwarding rules.

With this configuration your vpcs will resolve these domains with corresponding resolvers.

Usage

module "myendpoint" {
  source  = "angelabad/vpc-dns-forwarder/aws"
  version = "1.0.0"

  name    = "myendpoint"
  subnets = ["subnet-0ab97cbe1bd1406c2", "subnet-0d6cbf60360dbac64"]

  forwarders = [
    {
      associate_vpcs = ["vpc-0435f44681812096b", "vpc-065fb9fa6c4ae13cb"]
      domain         = "angelabad.me"
      resolvers      = ["192.168.1.1"]
    },
    {
      associate_vpcs = ["vpc-0435f44681812096b"]
      domain         = "pastelero.net"
      resolvers      = ["172.16.32.1"]
    }
  ]

  tags = {
    Owner       = "user"
    Environment = "dev"
  }
}

Inputs

Name Description Type Default Required
forwarders A list of objects representing forwarders, with associated vpcs, domain name and resolvers ip list
list(
object({
associate_vpcs = list(string)
domain = string
resolvers = list(string)
})
)
[] no
name Route53 resolver endpoint name string n/a yes
subnets A list of VPC Subnet IDs to launch in list(string) n/a yes
tags A mapping of tags to assign to the resource map(string) n/a yes

Outputs

Name Description
resolver_endpoint_id Route53 resolver endpoint id

Authors

Module managed by Angel Abad

License

Apache 2 Licensed. See LICENSE for full deatils