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 googlecomputedisk.md for more detailed information
* label_fingerprints
: an array of google_compute_disk
labelfingerprint
* `creationtimestamps: an array of
googlecomputediskcreation_timestamp
*
descriptions: an array of
googlecomputediskdescription
*
ids: an array of
googlecomputediskid
*
lastattachtimestamps: an array of
googlecomputedisklast_attach_timestamp
*
lastdetachtimestamps: an array of
googlecomputedisklast_detach_timestamp
*
labels: an array of
googlecomputedisklabels
*
licenses: an array of
googlecomputedisklicenses
*
names: an array of
googlecomputediskname
*
sizegbs: an array of
googlecomputedisk` sizegb
* users
: an array of google_compute_disk
users
* physical_block_size_bytes
: an array of google_compute_disk
physicalblocksizebytes
* types
: an array of `googlecomputedisktype
*
sourceimages: an array of
googlecomputedisksource_image
*
resourcepolicies: (Beta only) an array of
googlecomputedisk` resourcepolicies
* zones
: an array of google_compute_disk
zone
* source_image_encryption_keys
: an array of google_compute_disk
sourceimageencryptionkey
* `sourceimageids: an array of
googlecomputedisk` sourceimageid
* `diskencryptionkeys: an array of
googlecomputedisk` diskencryptionkey
* `sourcesnapshots: an array of
googlecomputedisksource_snapshot
*
sourcesnapshotencryptionkeys: an array of
googlecomputedisk` sourcesnapshotencryptionkey
* source_snapshot_ids
: an array of google_compute_disk
sourcesnapshotid
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.