On this page
google_dns_managed_zones resource
Syntax
A google_dns_managed_zones is used to test a Google ManagedZone resource
Beta Resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
Examples
describe google_dns_managed_zones(project: 'chef-gcp-inspec') do
it { should exist }
its('zone_names') { should include 'example-zone' }
its('zone_dns_names') { should include 'dns-zone-name.com.' }
end
Test that there are no more than a specified number of zones available for the project
describe google_dns_managed_zones(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
Test that an expected, named managed zone is available for the project
describe google_dns_managed_zones(project: 'chef-inspec-gcp') do
its('zone_names') { should include "zone-name" }
end
Test that a subset of all zones matching “myzone*” exist
google_dns_managed_zones(project: 'chef-inspec-gcp').where(zone_name: /^myzone/).zone_names.each do |zone_name|
describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: zone_name) do
it { should exist }
end
end
Properties
Properties that can be accessed from the google_dns_managed_zones resource:
See the google_dns_managed_zone resource for more information.
-
descriptions -
an array of
google_dns_managed_zonedescription -
zone_dns_names -
an array of
google_dns_managed_zonedns_name -
dnssec_configs -
an array of
google_dns_managed_zonednssec_config -
zone_ids -
an array of
google_dns_managed_zoneid -
zone_names -
an array of
google_dns_managed_zonename -
name_servers -
an array of
google_dns_managed_zonename_servers -
name_server_sets -
an array of
google_dns_managed_zonename_server_set -
creation_times -
an array of
google_dns_managed_zonecreation_time -
labels -
an array of
google_dns_managed_zonelabels -
visibilities -
an array of
google_dns_managed_zonevisibility -
private_visibility_configs -
an array of
google_dns_managed_zoneprivate_visibility_config -
forwarding_configs -
(Beta only) an array of
google_dns_managed_zoneforwarding_config -
peering_configs -
(Beta only) an array of
google_dns_managed_zonepeering_config -
reverse_lookups -
(Beta only) an array of
google_dns_managed_zonereverse_lookup -
service_directory_configs -
(Beta only) an array of
google_dns_managed_zoneservice_directory_config
Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
GCP Permissions
Ensure the Google Cloud DNS API is enabled for the current project.
© 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/google_dns_managed_zones/