title | platform |
---|---|
About the google_compute_project_info Resource |
gcp |
Use the google_compute_project_info
InSpec audit resource to test GCP compute project information.
A google_compute_project_info
resource block declares the tests for GCP compute project information by project identifier.
describe google_compute_project_info(project: 'chef-inspec-gcp') do
its('name') { should match 'chef-inspec-gcp' }
end
The following examples show how to use this InSpec audit resource.
describe google_compute_project_info(project: 'chef-inspec-gcp') do
it { should exist }
end
describe google_compute_project_info(project: 'chef-inspec-gcp') do
its('default_service_account') { should eq '12345-compute@developer.gserviceaccount.com' }
end
common_instance_metadata
,creation_timestamp
,creation_timestamp_date
,default_service_account
,id
,kind
,name
,quotas
,xpn_project_status
Ensure the Compute Engine API is enabled for the project where the resource is located.