Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 1.33 KB

google_compute_project_info.md

File metadata and controls

49 lines (29 loc) · 1.33 KB
title platform
About the google_compute_project_info Resource
gcp

google_compute_project_info

Use the google_compute_project_info InSpec audit resource to test GCP compute project information.


Syntax

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

Examples

The following examples show how to use this InSpec audit resource.

Test that GCP compute project information exists

describe google_compute_project_info(project: 'chef-inspec-gcp') do
  it { should exist }
end

Test that GCP compute project default service account is as expected

describe google_compute_project_info(project: 'chef-inspec-gcp') do
  its('default_service_account') { should eq '[email protected]' }
end

Properties

  • common_instance_metadata, creation_timestamp, creation_timestamp_date, default_service_account, id, kind, name, quotas, xpn_project_status

GCP Permissions

Ensure the Compute Engine API is enabled for the project where the resource is located.