A google_bigquery_dataset is used to test a Google Dataset resource
describe google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'inspec_gcp_dataset') do
it { should exist }
its('friendly_name') { should eq 'A BigQuery dataset test' }
its('location') { should eq 'EU' }
its('description') { should eq 'Test BigQuery dataset description' }
its('name') { should eq 'inspec_gcp_dataset' }
its('default_table_expiration_ms') { should cmp '3600000' }
end
describe.one do
google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'inspec_gcp_dataset').access.each do |dataset_access|
describe dataset_access do
its('role') { should eq 'WRITER' }
its('special_group') { should eq 'projectWriters' }
end
end
end
describe google_bigquery_dataset(project: 'chef-gcp-inspec', name: 'nonexistent') do
it { should_not exist }
end
Properties that can be accessed from the google_bigquery_dataset resource:
accessdomaingroup_by_emailrolespecial_groupPossible values include:
projectOwners: Owners of the enclosing project.projectReaders: Readers of the enclosing project.projectWriters: Writers of the enclosing project.allAuthenticatedUsers: All authenticated BigQuery users.user_by_emailiam_memberallUsers
viewdataset_idproject_idtable_idcreation_timedataset_referencedataset_idproject_iddefault_table_expiration_msexpirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table’s expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.default_partition_expiration_msexpirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.descriptionetagfriendly_nameidlabelslast_modified_timelocationasia-east1, asia-northeast1, asia-southeast1, australia-southeast1, europe-north1, europe-west2 and us-east4. Possible multi-regional values: EU and US. The default value is multi-regional location US. Changing this forces a new resource to be created.default_encryption_configurationkms_key_nameEnsure the BigQuery API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_bigquery_dataset/