A google_compute_snapshots is used to test a Google Snapshot resource


describe google_compute_snapshots(project: 'chef-gcp-inspec') do
  its('count') { should be >= 1 }
end do
  google_compute_snapshots(project: 'chef-gcp-inspec').names do |snapshot_name|
    describe google_compute_snapshot(project: 'chef-gcp-inspec', name: snapshot_name) do
      its('source_disk') { should match 'inspec-snapshot-disk' }


Properties that can be accessed from the google_compute_snapshots resource:

See for more detailed information * creation_timestamps: an array of google_compute_snapshot creationtimestamp * ids: an array of `googlecomputesnapshotid *disksizegbs: an array ofgooglecomputesnapshot` disksizegb * names: an array of `googlecomputesnapshotname *descriptions: an array ofgooglecomputesnapshotdescription *storagebytes: an array ofgooglecomputesnapshotstorage_bytes *licenses: an array ofgooglecomputesnapshotlicenses *labels: an array ofgooglecomputesnapshotlabels *labelfingerprints: an array ofgooglecomputesnapshot` labelfingerprint * source_disks: an array of google_compute_snapshot sourcedisk * zones: an array of `googlecomputesnapshotzone *snapshotencryptionkeys: an array ofgooglecomputesnapshot` snapshotencryptionkey * `sourcediskencryptionkeys: an array ofgooglecomputesnapshot` sourcediskencryption_key

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.