title | platform |
---|---|
About the google_compute_disks resource |
gcp |
A google_compute_disks
is used to test a Google Disk resource
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 that can be accessed from the google_compute_disks
resource:
See google_compute_disk.md for more detailed information
label_fingerprints
: an array ofgoogle_compute_disk
label_fingerprintcreation_timestamps
: an array ofgoogle_compute_disk
creation_timestampdescriptions
: an array ofgoogle_compute_disk
descriptionids
: an array ofgoogle_compute_disk
idlast_attach_timestamps
: an array ofgoogle_compute_disk
last_attach_timestamplast_detach_timestamps
: an array ofgoogle_compute_disk
last_detach_timestamplabels
: an array ofgoogle_compute_disk
labelslicenses
: an array ofgoogle_compute_disk
licensesnames
: an array ofgoogle_compute_disk
namesize_gbs
: an array ofgoogle_compute_disk
size_gbusers
: an array ofgoogle_compute_disk
usersphysical_block_size_bytes
: an array ofgoogle_compute_disk
physical_block_size_bytestypes
: an array ofgoogle_compute_disk
typesource_images
: an array ofgoogle_compute_disk
source_imagezones
: an array ofgoogle_compute_disk
zonesource_image_encryption_keys
: an array ofgoogle_compute_disk
source_image_encryption_keysource_image_ids
: an array ofgoogle_compute_disk
source_image_iddisk_encryption_keys
: an array ofgoogle_compute_disk
disk_encryption_keysource_snapshots
: an array ofgoogle_compute_disk
source_snapshotsource_snapshot_encryption_keys
: an array ofgoogle_compute_disk
source_snapshot_encryption_keysource_snapshot_ids
: an array ofgoogle_compute_disk
source_snapshot_id
This 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.