Skip to main content

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

Was this page helpful?

×









Search Results