A google_compute_subnetworks is used to test a Google Subnetwork resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
describe google_compute_subnetworks(project: 'chef-gcp-inspec', region: 'europe-west2') do
its('ip_cidr_ranges') { should include '10.2.0.0/16' }
its('subnetwork_names') { should include 'inspec-subnet' }
end
describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('count') { should be <= 100}
end
describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('subnetwork_ids') { should include 12345678975432 }
end
describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('subnetwork_names') { should include "subnetwork-name" }
end
describe google_compute_subnetworks(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('subnetwork_networks') { should not include "network-name" }
end
Properties that can be accessed from the google_compute_subnetworks resource:
See the google_compute_subnetwork resource for more information.
creation_timestampsgoogle_compute_subnetwork creation_timestampdescriptionsgoogle_compute_subnetwork descriptiongateway_addressesgoogle_compute_subnetwork gateway_addresssubnetwork_idsgoogle_compute_subnetwork idip_cidr_rangesgoogle_compute_subnetwork ip_cidr_rangesubnetwork_namesgoogle_compute_subnetwork namenetworksgoogle_compute_subnetwork networkpurposesgoogle_compute_subnetwork purposerolesgoogle_compute_subnetwork rolesecondary_ip_rangesgoogle_compute_subnetwork secondary_ip_rangesprivate_ip_google_accessesgoogle_compute_subnetwork private_ip_google_accessregionsgoogle_compute_subnetwork regionlog_configsgoogle_compute_subnetwork log_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_subnetworks/