Skip to main content

aws_route53resolver_resolver_rule_association Resource

Use the aws_route53resolver_resolver_rule_association InSpec audit resource to test properties of a single AWS Route53 Resolver rule association.

The Resolver rule association determines which DNS queries that originate in the VPC are forwarded to your network.

For additional information, including details on parameters and properties, see the AWS documentation on AWS Route53Resolver Resolver Rule Association.

Install

This resource is available in the Chef InSpec AWS resource pack.

For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.

Syntax

Ensure that a resolver rule exists.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  it { should exist }
end

Parameters

resolver_rule_association_id (required)

The ID of the Resolver rule association that you want to get information about.

Properties

id
The ID of the association between a Resolver rule and a VPC.
resolver_rule_id
The ID of the Resolver rule that you associated with the VPC that is specified by VPCId.
name
The name of an association between a Resolver rule and a VPC.
vpc_id
The ID of the VPC that you associated the Resolver rule with.
status
A code that specifies the current status of the association between a Resolver rule and a VPC.
status_message
A detailed description of the status of the association between a Resolver rule and a VPC.

Examples

Ensure a resolver rule name is available.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  its('name') { should eq 'RESOLVER_RULE_NAME' }
end

Ensure that the status is COMPLETE or FAILED.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  its('status') { should eq 'COMPLETE' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

This resource has the following special matchers.

exist

Use should to test that the entity exists.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_route53resolver_resolver_rule_association(resolver_rule_association_id: 'RESOLVER_RULE_ASSOCIATION_ID') do
  it { should be_available }
end

AWS Permissions

Your Principal will need the Route53Resolver:Client:GetResolverRuleAssociationResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×











Search Results