title | platform |
---|---|
About the google_storage_buckets resource |
gcp |
A google_storage_buckets
is used to test a Google Bucket resource
describe google_storage_buckets(project: 'chef-gcp-inspec') do
its('bucket_names') { should include bucket-name }
end
describe google_storage_buckets(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
describe google_storage_buckets do
its('bucket_names'){ should include "my_expected_bucket" }
end
google_storage_buckets(project: 'chef-inspec-gcp').bucket_names.each do |bucket_name|
describe google_storage_bucket(name: bucket_name) do
it { should exist }
its('project_number'){ should eq 1122334455 }
end
end
Properties that can be accessed from the google_storage_buckets
resource:
See google_storage_bucket.md for more detailed information
acls
: an array ofgoogle_storage_bucket
aclcors
: an array ofgoogle_storage_bucket
corsdefault_event_based_holds
: an array ofgoogle_storage_bucket
default_event_based_holddefault_object_acls
: an array ofgoogle_storage_bucket
default_object_aclbucket_ids
: an array ofgoogle_storage_bucket
idlifecycles
: an array ofgoogle_storage_bucket
lifecyclebucket_locations
: an array ofgoogle_storage_bucket
locationloggings
: an array ofgoogle_storage_bucket
loggingmetagenerations
: an array ofgoogle_storage_bucket
metagenerationbucket_names
: an array ofgoogle_storage_bucket
nameowners
: an array ofgoogle_storage_bucket
ownerbucket_project_numbers
: an array ofgoogle_storage_bucket
project_numberstorage_classes
: an array ofgoogle_storage_bucket
storage_classtime_createds
: an array ofgoogle_storage_bucket
time_createdupdateds
: an array ofgoogle_storage_bucket
updatedversionings
: an array ofgoogle_storage_bucket
versioningwebsites
: an array ofgoogle_storage_bucket
websitelabels
: an array ofgoogle_storage_bucket
labelsencryptions
: an array ofgoogle_storage_bucket
encryptionretention_policies
: an array ofgoogle_storage_bucket
retention_policyprojects
: an array ofgoogle_storage_bucket
projectpredefined_default_object_acls
: an array ofgoogle_storage_bucket
predefined_default_object_acl
This resource supports all of the above properties as filter criteria, which can be used
with where
as a block or a method.
Ensure the Google Cloud Storage is enabled for the current project.