title | platform |
---|---|
About the google_storage_object_acl Resource |
gcp |
Use the google_storage_object_acl
InSpec audit resource to test properties of a single GCP storage object ACL. See the Google documentation for this here covering the possible values for 'entity' argument below.
A google_storage_object_acl
resource block declares the tests for a single GCP storage object ACL by bucket name, object name and entity.
describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do
it { should exist }
end
describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do
its('role') { should eq 'OWNER' }
end
bucket
,email
,entity
,etag
,generation
,id
,kind
,object
,role
Ensure the Google Cloud Storage API is enabled.