| title | About the google_project_iam_custom_role Resource |
|---|---|
| platform | gcp |
Use the google_project_iam_custom_role InSpec audit resource to test properties of a GCP project IAM custom role.
s
A google_project_iam_custom_role resource block declares the tests for a single GCP project IAM custom role by project and name.
describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'chef-inspec-gcp-role-abcd') do
it { should exist }
its('name') { should eq 'chef-inspec-gcp-role-abcd' }
end
The following examples show how to use this InSpec audit resource.
describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'chef-inspec-gcp-role-abcd') do
its('stage') { should eq "GA" }
end
describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'chef-inspec-gcp-role-abcd') do
its('included_permissions') { should eq ["iam.roles.list"] }
end
description,etag,included_permissions,name,stage,title
Ensure the Identity and Access Management (IAM) API is enabled for the project.