A google_dns_managed_zones is used to test a Google ManagedZone resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
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
describe google_dns_managed_zones(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
describe google_dns_managed_zones(project: 'chef-inspec-gcp') do
its('zone_names') { should include "zone-name" }
end
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 that can be accessed from the google_dns_managed_zones resource:
See the google_dns_managed_zone resource for more information.
descriptionsgoogle_dns_managed_zone descriptionzone_dns_namesgoogle_dns_managed_zone dns_namednssec_configsgoogle_dns_managed_zone dnssec_configzone_idsgoogle_dns_managed_zone idzone_namesgoogle_dns_managed_zone namename_serversgoogle_dns_managed_zone name_serversname_server_setsgoogle_dns_managed_zone name_server_setcreation_timesgoogle_dns_managed_zone creation_timelabelsgoogle_dns_managed_zone labelsvisibilitiesgoogle_dns_managed_zone visibilityprivate_visibility_configsgoogle_dns_managed_zone private_visibility_configforwarding_configsgoogle_dns_managed_zone forwarding_configpeering_configsgoogle_dns_managed_zone peering_configreverse_lookupsgoogle_dns_managed_zone reverse_lookupservice_directory_configsgoogle_dns_managed_zone service_directory_configThis resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
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/