A google_kms_crypto_keys is used to test a Google CryptoKey resource
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
Properties that can be accessed from the google_kms_crypto_keys resource:
See the google_kms_crypto_key resource for more information.
crypto_key_namesgoogle_kms_crypto_key crypto_key_namecreate_timesgoogle_kms_crypto_key create_timelabelsgoogle_kms_crypto_key labelspurposesgoogle_kms_crypto_key purposerotation_periodsgoogle_kms_crypto_key rotation_periodversion_templatesgoogle_kms_crypto_key version_templatenext_rotation_timesgoogle_kms_crypto_key next_rotation_timekey_ringsgoogle_kms_crypto_key key_ringThis resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
Ensure the Cloud Key Management Service (KMS) API is enabled for the current project.
© 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/