A google_compute_networks is used to test a Google Network resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
describe google_compute_networks(project: 'chef-gcp-inspec') do
its('network_names') { should include 'inspec-network' }
end
describe google_compute_networks(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
describe google_compute_networks(project: 'chef-inspec-gcp') do
its('network_ids') { should include 12345678975432 }
end
describe google_compute_networks(project: 'chef-inspec-gcp') do
its('network_names') { should include "network-name" }
end
Properties that can be accessed from the google_compute_networks resource:
See the google_compute_network resource for more information.
descriptionsgoogle_compute_network descriptiongateway_ipv4sgoogle_compute_network gateway_ipv4network_idsgoogle_compute_network idnetwork_namesgoogle_compute_network namesubnetworksgoogle_compute_network subnetworksauto_create_subnetworksgoogle_compute_network auto_create_subnetworkscreation_timestampsgoogle_compute_network creation_timestamprouting_configsgoogle_compute_network routing_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 Compute Engine 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_compute_networks/