-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into RESOURCE-36-sql-flags
- Loading branch information
Showing
66 changed files
with
2,577 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ $ cat /Users/john/.config/gcloud/myproject-1-feb7993e8660.json | |
|
||
And InSpec can be instructed to use it by setting this ENV variable prior to running `inspec exec`: | ||
```bash | ||
$ export GOOGLE_APPLICATION_CREDENTIALS='/Users/john/.config/gcloud/myproject-1-feb7993e8660.json' | ||
$ export GOOGLE_APPLICATION_CREDENTIALS='/Users/sample_user/.config/gcloud/myproject-1-feb7993e8660.json' | ||
``` | ||
|
||
### Enable the appropriate APIs that you want to use: | ||
|
@@ -69,6 +69,8 @@ Since this is an InSpec resource pack, it only defines InSpec resources. It incl | |
|
||
```bash | ||
$ inspec init profile --platform gcp my-profile | ||
|
||
|
||
Create new profile at /Users/spaterson/my-profile | ||
* Create directory libraries | ||
* Create file README.md | ||
|
@@ -80,7 +82,7 @@ Create new profile at /Users/spaterson/my-profile | |
|
||
``` | ||
|
||
### Update `attributes.yml` to point to your project | ||
### Update `inputs.yml` to point to your project | ||
|
||
``` | ||
gcp_project_id: 'my-gcp-project' | ||
|
@@ -90,7 +92,7 @@ gcp_project_id: 'my-gcp-project' | |
|
||
``` | ||
$ cd my-profile/ | ||
$ inspec exec . -t gcp:// --attrs attributes.yml | ||
$ inspec exec . -t gcp:// --input-file inputs.yml | ||
Profile: GCP InSpec Profile (my-profile) | ||
Version: 0.1.0 | ||
|
@@ -99,23 +101,34 @@ Target: gcp://[email protected] | |
✔ gcp-single-region-1.0: Ensure single region has the correct properties. | ||
✔ Region europe-west2 zone_names should include "europe-west2-a" | ||
✔ gcp-regions-loop-1.0: Ensure regions have the correct properties in bulk. | ||
✔ Region asia-east1 should be up | ||
✔ Region asia-northeast1 should be up | ||
✔ Region asia-south1 should be up | ||
✔ Region asia-southeast1 should be up | ||
✔ Region australia-southeast1 should be up | ||
✔ Region europe-north1 should be up | ||
✔ Region europe-west1 should be up | ||
✔ Region europe-west2 should be up | ||
✔ Region europe-west3 should be up | ||
✔ Region europe-west4 should be up | ||
✔ Region northamerica-northeast1 should be up | ||
✔ Region southamerica-east1 should be up | ||
✔ Region us-central1 should be up | ||
✔ Region us-east1 should be up | ||
✔ Region us-east4 should be up | ||
✔ Region us-west1 should be up | ||
✔ Region us-west2 should be up | ||
✔ Region asia-east1 is expected to be up | ||
✔ Region asia-east2 is expected to be up | ||
✔ Region asia-northeast1 is expected to be up | ||
✔ Region asia-northeast2 is expected to be up | ||
✔ Region asia-northeast3 is expected to be up | ||
✔ Region asia-south1 is expected to be up | ||
✔ Region asia-south2 is expected to be up | ||
✔ Region asia-southeast1 is expected to be up | ||
✔ Region asia-southeast2 is expected to be up | ||
✔ Region australia-southeast1 is expected to be up | ||
✔ Region australia-southeast2 is expected to be up | ||
✔ Region europe-central2 is expected to be up | ||
✔ Region europe-north1 is expected to be up | ||
✔ Region europe-west1 is expected to be up | ||
✔ Region europe-west2 is expected to be up | ||
✔ Region europe-west3 is expected to be up | ||
✔ Region europe-west4 is expected to be up | ||
✔ Region europe-west6 is expected to be up | ||
✔ Region northamerica-northeast1 is expected to be up | ||
✔ Region northamerica-northeast2 is expected to be up | ||
✔ Region southamerica-east1 is expected to be up | ||
✔ Region us-central1 is expected to be up | ||
✔ Region us-east1 is expected to be up | ||
✔ Region us-east4 is expected to be up | ||
✔ Region us-west1 is expected to be up | ||
✔ Region us-west2 is expected to be up | ||
✔ Region us-west3 is expected to be up | ||
✔ Region us-west4 is expected to be up | ||
Profile: Google Cloud Platform Resource Pack (inspec-gcp) | ||
|
@@ -125,7 +138,7 @@ Target: gcp://[email protected] | |
No tests executed. | ||
Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped | ||
Test Summary: 18 successful, 0 failures, 0 skipped | ||
Test Summary: 29 successful, 0 failures, 0 skipped | ||
``` | ||
|
||
The generated `inspec.yml` file automatically points to the InSpec GCP resource pack: | ||
|
@@ -134,7 +147,11 @@ The generated `inspec.yml` file automatically points to the InSpec GCP resource | |
name: my-profile | ||
title: My GCP InSpec Profile | ||
version: 0.1.0 | ||
inspec_version: '>= 4.6.9' | ||
inspec_version: '>= 4' | ||
inputs: | ||
- name: gcp_project_id | ||
required: true | ||
description: 'The GCP project identifier.' | ||
depends: | ||
- name: inspec-gcp | ||
url: https://github.com/inspec/inspec-gcp/archive/x.tar.gz | ||
|
@@ -150,6 +167,7 @@ The following resources are available in the InSpec GCP Profile | |
| InSpec GCP Supported Resources| [https://www.inspec.io/docs/reference/resources/#gcp-resources](https://www.inspec.io/docs/reference/resources/#gcp-resources) | | ||
|:---|:---| | ||
| Singular Resource | Plural Resource | | ||
| [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) | | ||
| [google_bigquery_table](docs/resources/google_bigquery_table.md) | [google_bigquery_tables](docs/resources/google_bigquery_tables.md) | | ||
| [google_cloudbuild_trigger](docs/resources/google_cloudbuild_trigger.md) | [google_cloudbuild_triggers](docs/resources/google_cloudbuild_triggers.md) | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.10.0 | ||
1.10.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: About the google_compute_accelerator_type resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_compute_accelerator_type` is used to test a Google AcceleratorType resource | ||
|
||
## Examples | ||
``` | ||
describe google_compute_accelerator_type(project: 'chef-gcp-inspec', zone: 'us-east1-b', name: 'accelerator_id') do | ||
it { should exist } | ||
it { should be_up } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_compute_accelerator_type` resource: | ||
|
||
|
||
* `creation_timestamp`: Creation timestamp in RFC3339 text format. | ||
|
||
* `deprecated`: The deprecation status associated with this accelerator type. | ||
|
||
* `state`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. | ||
|
||
* `deprecated`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. | ||
|
||
* `obsolete`: An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. | ||
|
||
* `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. | ||
|
||
* `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. | ||
Possible values: | ||
* DEPRECATED | ||
* OBSOLETE | ||
* DELETED | ||
|
||
* `description`: An optional textual description of the resource. | ||
|
||
* `id`: The unique identifier for the resource. | ||
|
||
* `name`: Name of the resource. | ||
|
||
* `zone`: The name of the zone where the accelerator type resides. | ||
|
||
|
||
## GCP Permissions | ||
|
||
Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: About the google_compute_accelerator_types resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_compute_accelerator_types` is used to test a Google AcceleratorType resource | ||
|
||
## Examples | ||
``` | ||
describe google_compute_accelerator_types(project: 'chef-gcp-inspec', zone: 'us-east1-b') do | ||
it { should exist } | ||
it { should be_up } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_compute_accelerator_types` resource: | ||
|
||
See [google_compute_accelerator_type.md](google_compute_accelerator_type.md) for more detailed information | ||
* `creation_timestamps`: an array of `google_compute_accelerator_type` creation_timestamp | ||
* `deprecateds`: an array of `google_compute_accelerator_type` deprecated | ||
* `descriptions`: an array of `google_compute_accelerator_type` description | ||
* `ids`: an array of `google_compute_accelerator_type` id | ||
* `names`: an array of `google_compute_accelerator_type` name | ||
* `zones`: an array of `google_compute_accelerator_type` zone | ||
|
||
## Filter Criteria | ||
This resource supports all of the above properties as filter criteria, which can be used | ||
with `where` as a block or a method. | ||
|
||
## GCP Permissions | ||
|
||
Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: About the google_compute_disk_type resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_compute_disk_type` is used to test a Google DiskType resource | ||
|
||
## Examples | ||
``` | ||
describe google_compute_disk_type(project: 'chef-gcp-inspec', zone: 'us-east1-b', name: 'disk_type_name') do | ||
it { should exist } | ||
it { should be_up } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_compute_disk_type` resource: | ||
|
||
|
||
* `creation_timestamp`: Creation timestamp in RFC3339 text format. | ||
|
||
* `default_disk_size_gb`: Server-defined default disk size in GB. | ||
|
||
* `deprecated`: The deprecation status associated with this disk type. | ||
|
||
* `deleted`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. | ||
|
||
* `deprecated`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. | ||
|
||
* `obsolete`: An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. | ||
|
||
* `replacement`: The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. | ||
|
||
* `state`: The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. | ||
Possible values: | ||
* DEPRECATED | ||
* OBSOLETE | ||
* DELETED | ||
|
||
* `description`: An optional description of this resource. | ||
|
||
* `id`: The unique identifier for the resource. | ||
|
||
* `name`: Name of the resource. | ||
|
||
* `valid_disk_size`: An optional textual description of the valid disk size, such as "10GB-10TB". | ||
|
||
* `zone`: A reference to the zone where the disk type resides. | ||
|
||
|
||
## GCP Permissions | ||
|
||
Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project. |
Oops, something went wrong.