title | platform |
---|---|
About the google_compute_disks resource |
gcp |
A google_compute_disks
is used to test a Google Disk resource
This resource has beta fields available. To retrieve these fields, include beta: true
in the constructor for the 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_bytesinterfaces
: (Beta only) an array ofgoogle_compute_disk
interfacetypes
: an array ofgoogle_compute_disk
typesource_images
: an array ofgoogle_compute_disk
source_imageresource_policies
: (Beta only) an array ofgoogle_compute_disk
resource_policiesmulti_writers
: (Beta only) an array ofgoogle_compute_disk
multi_writerprovisioned_iops
: an array ofgoogle_compute_disk
provisioned_iopszones
: 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.