title | platform |
---|---|
About the google_project_iam_binding Resource |
gcp |
Use the google_project_iam_binding
InSpec audit resource to test properties of a single GCP project IAM binding.
A google_project_iam_binding
resource block declares the tests for a single GCP project IAM binding by role.
describe google_project_iam_binding(project: 'chef-inspec-gcp', role: 'roles/compute.admin') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_project_iam_binding(project: 'chef-inspec-gcp', role: 'roles/compute.admin') do
it { should exist }
end
describe google_project_iam_binding(project: 'chef-inspec-gcp', role: 'roles/compute.admin') do
its('members') {should include 'user:[email protected]' }
end
members
Ensure the Cloud Resource Manager API is enabled for the project.