A google_project is used to test a Google Project resource
describe google_project(project: 'chef-gcp-inspec') do
it { should exist }
its('project_id') { should cmp 'chef-gcp-inspec' }
its('lifecycle_state') { should cmp 'ACTIVE' }
end
describe google_project(project: 'chef-inspec-gcp') do
its('project_number') { should eq 12345678 }
end
describe google_project(project: 'chef-inspec-gcp') do
its('lifecycle_state') { should eq "ACTIVE" }
end
describe google_project(project: 'chef-inspec-gcp').label_value_by_key('season') do
it {should match '^(winter|spring|summer|autumn)$' }
end
Properties that can be accessed from the google_project resource:
numberlifecycle_statePossible values:
namecreate_timelabels[a-z]([-a-z0-9]*[a-z0-9])?. Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowedparenttypeidproject_idEnsure the Cloud Resource Manager 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_project/