title | platform |
---|---|
About the google_kms_key_ring_iam_binding Resource |
gcp |
Use the google_kms_key_ring_iam_binding
InSpec audit resource to test properties of a single GCP KMS key ring IAM binding.
A google_kms_key_ring_iam_binding
resource block declares the tests for a single GCP KMS key ring IAM binding by role.
describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do
it { should exist }
its('members') {should include 'user:[email protected]' }
end
The following examples show how to use this InSpec audit resource.
describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do
it { should exist }
end
describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do
its('members') {should include 'user:[email protected]' }
end
members
Ensure the Cloud Key Management Service (KMS) API is enabled for the project where the resource is located.