On this page
google_compute_disks resource
Syntax
A google_compute_disks is used to test a Google Disk resource
Beta Resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
Examples
most_recent_image = google_compute_image(project: 'debian-cloud', name: 'debian-10-buster-v20191014')
describe google_compute_disks(project: 'chef-gcp-inspec', zone: 'zone') do
it { should exist }
its('names') { should include 'inspec-snapshot-disk' }
its('source_images') { should include most_recent_image.self_link }
end
Properties
Properties that can be accessed from the google_compute_disks resource:
See the google_compute_disk resource for more information.
-
label_fingerprints -
an array of
google_compute_disklabel_fingerprint -
creation_timestamps -
an array of
google_compute_diskcreation_timestamp -
descriptions -
an array of
google_compute_diskdescription -
ids -
an array of
google_compute_diskid -
last_attach_timestamps -
an array of
google_compute_disklast_attach_timestamp -
last_detach_timestamps -
an array of
google_compute_disklast_detach_timestamp -
labels -
an array of
google_compute_disklabels -
licenses -
an array of
google_compute_disklicenses -
names -
an array of
google_compute_diskname -
size_gbs -
an array of
google_compute_disksize_gb -
users -
an array of
google_compute_diskusers -
physical_block_size_bytes -
an array of
google_compute_diskphysical_block_size_bytes -
types -
an array of
google_compute_disktype -
source_images -
an array of
google_compute_disksource_image -
resource_policies -
(Beta only) an array of
google_compute_diskresource_policies -
zones -
an array of
google_compute_diskzone -
source_image_encryption_keys -
an array of
google_compute_disksource_image_encryption_key -
source_image_ids -
an array of
google_compute_disksource_image_id -
disk_encryption_keys -
an array of
google_compute_diskdisk_encryption_key -
source_snapshots -
an array of
google_compute_disksource_snapshot -
source_snapshot_encryption_keys -
an array of
google_compute_disksource_snapshot_encryption_key -
source_snapshot_ids -
an array of
google_compute_disksource_snapshot_id
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 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_disks/