Spec-Zone.ru › Chef 16

Ресурс google_compute_disks

Синтаксис

Используется google_compute_disks для проверки ресурса Google Disk.

Ресурс Beta

Этот ресурс имеет доступные поля beta. Чтобы получить доступ к этим полям, включите beta: true в конструктор ресурса.

Примеры

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

Свойства

Свойства, к которым можно получить доступ из ресурса google_compute_disks:

Для получения дополнительной информации см. ресурс google_compute_disk.

label_fingerprints
массив google_compute_disk label_fingerprint
creation_timestamps
массив google_compute_disk creation_timestamp
descriptions
массив google_compute_disk description
ids
массив google_compute_disk id
last_attach_timestamps
массив google_compute_disk last_attach_timestamp
last_detach_timestamps
массив google_compute_disk last_detach_timestamp
labels
массив google_compute_disk labels
licenses
массив google_compute_disk licenses
names
массив google_compute_disk name
size_gbs
массив google_compute_disk size_gb
users
массив google_compute_disk users
physical_block_size_bytes
массив google_compute_disk physical_block_size_bytes
types
массив google_compute_disk type
source_images
массив google_compute_disk source_image
resource_policies
(Только Beta) массив google_compute_disk resource_policies
zones
массив google_compute_disk zone
source_image_encryption_keys
массив google_compute_disk source_image_encryption_key
source_image_ids
массив google_compute_disk source_image_id
disk_encryption_keys
массив google_compute_disk disk_encryption_key
source_snapshots
массив google_compute_disk source_snapshot
source_snapshot_encryption_keys
массив google_compute_disk source_snapshot_encryption_key
source_snapshot_ids
массив google_compute_disk source_snapshot_id

Критерии фильтрации

Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут быть использованы с where как блоком, так и методом.

Разрешения GCP

Убедитесь, что для текущего проекта включен API Compute Engine по адресу Compute Engine API.

© 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/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API