aws_elasticsearchservice_domains Resource
Use the aws_elasticsearchservice_domains
InSpec audit resource to test properties of a plural Elasticsearch Domains.
The AWS::Elasticsearch::Domain resource creates an Amazon Elasticsearch Service (Amazon ES) domain.
For additional information, including details on parameters and properties, see the AWS documentation on Elasticsearch Domain.
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 domain name exists.
describe aws_elasticsearchservice_domains do
it { should exist }
end
Parameters
This resource does not require any parameters.
Properties
domain_name
- Specifies the domain name.
Examples
Ensure a domain name is available.
describe aws_elasticsearchservice_domains do
its('domain_name') { should include 'DOMAIN_NAME' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the describe
method returns at least one result.
exist
Use should
to test that the entity exists.
describe aws_elasticsearchservice_domains do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_elasticsearchservice_domains do
it { should_not exist }
end
be_available
Use should
to check if the work_group name is available.
describe aws_elasticsearchservice_domains do
it { should be_available }
end
AWS Permissions
Your Principal will need the ElasticsearchService:Client:ListDomainNamesResponse
action with Effect
set to Allow
.