Skip to main content

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.

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 AWS principal will need the ElasticsearchService:Client:ListDomainNamesResponse action with Effect set to Allow.

Thank you for your feedback!

×