Spec-Zone.ru › Chef 17

Ресурс google_kms_crypto_keys

[править на GitHub]

Синтаксис

Используется google_kms_crypto_keys, чтобы проверить ресурс Google CryptoKey.

Примеры

describe google_kms_crypto_keys(project: 'chef-gcp-inspec', location: 'europe-west2', key_ring_name: 'kms-key-ring') do
  its('count') { should be >= 1 }
  its('crypto_key_names') { should include 'kms-key' }
end

Проверка, что в хранилище ключей нет более указанного количества ключей

describe google_kms_crypto_keys(project: 'chef-inspec-gcp',   location: 'us-east1',  key_ring_name: 'key-ring') do
  its('count') { should be <= 100}
end

Проверка наличия ожидаемого имени ключа в хранилище ключей

describe google_kms_crypto_keys(project: 'chef-inspec-gcp',   location: 'us-east1',  key_ring_name: 'key-ring') do
  its('crypto_key_names') { should include "my-crypto-key-name" }
end

Свойства

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

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

crypto_key_name
массив google_kms_crypto_key crypto_key_name
create_time
массив google_kms_crypto_key create_time
labels
массив google_kms_crypto_key labels
purpose
массив google_kms_crypto_key purpose
rotation_period
массив google_kms_crypto_key rotation_period
version_template
массив google_kms_crypto_key version_template
next_rotation_time
массив google_kms_crypto_key next_rotation_time
key_ring
массив google_kms_crypto_key key_ring

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

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

Разрешения GCP

Убедитесь, что для текущего проекта включен API Cloud Key Management Service (KMS) по адресу https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/.

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

Spec-Zone.ru

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