aws_hosted_zones resource

[edit on GitHub]

Use the aws_hosted_zones resource to test the hosted zones configuration.

Syntax

describe aws_hosted_zones do
  its('names') { should include ("carry-on.films.com") }
end

Parameters

This resource does not expect any parameters.

Properties

Property Description
name The name of the hosted zone.
id It’s id.

Examples

Ensure a specific hosted zone exists

describe aws_hosted_zones do
  its('names') { should include ("carry-on.films.com") }
end

Matchers

This InSpec audit resource uses the following special matcher. For a full list of available matchers, please visit our matchers page.

should

The control will pass if the describe passes all tests.

Use should to validate if a specific hosted zone exists

describe aws_hosted_zones do
  its('names') { should include ("carry-on.films.com") }
end

AWS Permissions

Your Principal will need the route53:ListHostedZones action with Effect set to Allow.

You can find detailed documentation at Amazon Route 53

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/aws_hosted_zones/