AWS Route 53 Resolver Rule Association

This page shows how to write Terraform and CloudFormation for Route 53 Resolver Rule Association and write them securely.

aws_route53_resolver_rule_association (Terraform)

The Rule Association in Route 53 Resolver can be configured in Terraform with the resource name aws_route53_resolver_rule_association. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

github-iconkaysal/cloud-networking
resource "aws_route53_resolver_rule_association" "eu_west1_cloudtuples_fwd" {
  resolver_rule_id = aws_route53_resolver_rule.eu_west1_cloudtuples_fwd.id
  vpc_id           = aws_vpc.vpc1.id
}

# apple.cloudtuple rule
github-iconGSA/grace-paas-dns
resource "aws_route53_resolver_rule_association" "example" {
  resolver_rule_id = aws_route53_resolver_rule.sys.id
  vpc_id           = aws_vpc.foo.id
}

//dns route53 zone
github-iconcbfield/terraform-aws-vpc
resource "aws_route53_resolver_rule_association" "rule" {
  for_each = toset(var.route53_resolver_rule_associations)

  name             = var.name
  resolver_rule_id = each.key
  vpc_id           = aws_vpc.vpc.id
github-iconrhythmictech/terraform-aws-route53-resolver-rule
resource "aws_route53_resolver_rule_association" "fwdrule" {
  count            = length(var.associated_vpcs)
  resolver_rule_id = aws_route53_resolver_rule.fwd.id
  vpc_id           = var.associated_vpcs[count.index]
}

Parameters

Explanation in Terraform Registry

Provides a Route53 Resolver rule association.

AWS::Route53Resolver::ResolverRuleAssociation (CloudFormation)

The ResolverRuleAssociation in Route53Resolver can be configured in CloudFormation with the resource name AWS::Route53Resolver::ResolverRuleAssociation. The following sections describe how to use the resource and its parameters.

Parameters

Explanation in CloudFormation Registry

In the response to an AssociateResolverRule, DisassociateResolverRule, or ListResolverRuleAssociations request, provides information about an association between a resolver rule and a VPC. The association determines which DNS queries that originate in the VPC are forwarded to your network.

Frequently asked questions

What is AWS Route 53 Resolver Rule Association?

AWS Route 53 Resolver Rule Association is a resource for Route 53 Resolver of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Route 53 Resolver Rule Association?

For Terraform, the kaysal/cloud-networking, GSA/grace-paas-dns and cbfield/terraform-aws-vpc source code examples are useful. See the Terraform Example section for further details.