title | platform |
---|---|
About the aws_route53resolver_resolver_endpoint Resource |
aws |
Use the aws_route53resolver_resolver_endpoint
InSpec audit resource to test properties of a single AWS Route53 Resolver endpoint.
There are two types of Resolver endpoints, inbound and outbound. An inbound Resolver endpoint forwards DNS queries to the DNS service for a VPC from your network. An outbound Resolver endpoint forwards DNS queries from the DNS service for a VPC to your network.
Ensure that an endpoint exists.
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'ResourceId') do
it { should exist }
end
resolver_endpoint_id
(required)
The ID of the Resolver endpoint.
For additional information, see the AWS documentation on AWS Route53Resolver Resolver Endpoint.
Property | Description |
---|---|
id | The ID of the Resolver endpoint. |
creator_request_id | A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId allows failed requests to be retried without the risk of running the operation twice. |
arn | The ARN (Amazon Resource Name) for the Resolver endpoint. |
name | The name that you assigned to the Resolver endpoint when you submitted a CreateResolverEndpoint request. |
security_group_ids | The ID of one or more security groups that control access to this VPC. The security group must include one or more inbound rules (for inbound endpoints) or outbound rules (for outbound endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network. |
direction | Indicates whether the Resolver endpoint allows inbound or outbound DNS queries. Valid values: INBOUND , OUTBOUND |
ip_address_count | The number of IP addresses that the Resolver endpoint can use for DNS queries. |
host_vpc_id | The ID of the VPC that you want to create the Resolver endpoint in. |
status | A code that specifies the current status of the Resolver endpoint. Valid values are: CREATING , OPERATIONAL , UPDATING , AUTO_RECOVERING , ACTION_NEEDED , DELETING . |
status_message | A detailed description of the status of the Resolver endpoint. |
creation_time | The date and time that the endpoint was created, in Unix time format and Coordinated Universal Time (UTC). |
modification_time | The date and time that the endpoint was last modified, in Unix time format and Coordinated Universal Time (UTC). |
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'RESOLVER_ENDPOINT_ID') do
its('name') { should eq 'ENDPOINT_NAME' }
end
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'RESOLVER_ENDPOINT_ID') do
its('status') { should eq 'CREATING' }
end
This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.
The controls will pass if the get
method returns at least one result.
Use should
to test that the entity exists.
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'RESOLVER_ENDPOINT_ID') do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'RESOLVER_ENDPOINT_ID') do
it { should_not exist }
end
Use should
to check if the endpoint name is available.
describe aws_route53resolver_resolver_endpoint(resolver_endpoint_id: 'RESOLVER_ENDPOINT_ID') do
it { should be_available }
end
Your Principal will need the Route53Resolver:Client:GetResolverEndpointResponse
action with Effect
set to Allow
.