Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master updated #107

Merged
merged 7 commits into from
Feb 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions docs/resources/google_bigquery_dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: About the google_bigquery_dataset resource
platform: gcp
---

## Syntax
A `google_bigquery_dataset` is used to test a Google Dataset resource

## Examples
```
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('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
Properties that can be accessed from the `google_bigquery_dataset` resource:

* `name`: Dataset name

* `access`: Access controls on the bucket.

* `domain`: A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

* `groupByEmail`: An email address of a Google Group to grant access to

* `role`: Describes the rights granted to the user specified by the other member of the access object

* `specialGroup`: A special group to grant access to.

* `userByEmail`: An email address of a user to grant access to. For example: [email protected]

* `view`: A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.

* `creation_time`: The time when this dataset was created, in milliseconds since the epoch.

* `dataset_reference`: A reference that identifies the dataset.

* `datasetId`: A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

* `projectId`: The ID of the project containing this dataset.

* `default_table_expiration_ms`: The default lifetime of all tables in the dataset, in milliseconds

* `description`: A user-friendly description of the dataset

* `friendly_name`: A descriptive name for the dataset

* `id`: The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field

* `labels`: The labels associated with this dataset. You can use these to organize and group your datasets

* `last_modified_time`: The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

* `location`: The geographic location where the dataset should reside. Possible values include EU and US. The default value is US.
30 changes: 30 additions & 0 deletions docs/resources/google_bigquery_datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: About the google_bigquery_datasets resource
platform: gcp
---

## Syntax
A `google_bigquery_datasets` is used to test a Google Dataset resource

## Examples
```
describe google_bigquery_datasets(project: 'chef-gcp-inspec') do
its('count') { should be >= 1 }
its('friendly_names') { should include 'A BigQuery dataset test' }
its('locations') { should include 'EU' }
end
```

## Properties
Properties that can be accessed from the `google_bigquery_datasets` resource:

See [google_bigquery_dataset.md](google_bigquery_dataset.md) for more detailed information
* `dataset_references`: an array of `google_bigquery_dataset` dataset_reference
* `friendly_names`: an array of `google_bigquery_dataset` friendly_name
* `ids`: an array of `google_bigquery_dataset` id
* `labels`: an array of `google_bigquery_dataset` labels
* `locations`: an array of `google_bigquery_dataset` location

## 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.
50 changes: 50 additions & 0 deletions docs/resources/google_compute_router.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: About the google_compute_router resource
platform: gcp
---

## Syntax
A `google_compute_router` is used to test a Google Router resource

## Examples
```
describe google_compute_router(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-gcp-router') do
it { should exist }
its('bgp.asn') { should eq '64514' }
its('bgp.advertise_mode') { should eq 'CUSTOM' }
its('bgp.advertised_groups') { should include 'ALL_SUBNETS' }
its('bgp.advertised_ip_ranges.count') { should eq 2 }
its('bgp.advertised_ip_ranges.first.range') { should eq '1.2.3.4' }
its('bgp.advertised_ip_ranges.last.range') { should eq '1.2.3.4' }
its('network') { should match /\/gcp-inspec-network$/ }
end

describe google_compute_router(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do
it { should_not exist }
end
```

## Properties
Properties that can be accessed from the `google_compute_router` resource:

* `id`: The unique identifier for the resource.

* `creation_timestamp`: Creation timestamp in RFC3339 text format.

* `name`: Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

* `description`: An optional description of this resource.

* `network`: A reference to the network to which this router belongs.

* `bgp`: BGP information specific to this router.

* `asn`: Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.

* `advertiseMode`: User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are: DEFAULT, CUSTOM

* `advertisedGroups`: User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS

* `advertisedIpRanges`: User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

* `region`: Region where the router resides.
30 changes: 30 additions & 0 deletions docs/resources/google_compute_routers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: About the google_compute_routers resource
platform: gcp
---

## Syntax
A `google_compute_routers` is used to test a Google Router resource

## Examples
```
describe google_compute_routers(project: 'chef-gcp-inspec', region: 'europe-west2') do
its('names') { should include 'inspec-gcp-router' }
end
```

## Properties
Properties that can be accessed from the `google_compute_routers` resource:

See [google_compute_router.md](google_compute_router.md) for more detailed information
* `ids`: an array of `google_compute_router` id
* `creation_timestamps`: an array of `google_compute_router` creation_timestamp
* `names`: an array of `google_compute_router` name
* `descriptions`: an array of `google_compute_router` description
* `networks`: an array of `google_compute_router` network
* `bgps`: an array of `google_compute_router` bgp
* `regions`: an array of `google_compute_router` region

## 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.
59 changes: 59 additions & 0 deletions docs/resources/google_compute_snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: About the google_compute_snapshot resource
platform: gcp
---

## Syntax
A `google_compute_snapshot` is used to test a Google Snapshot resource

## Examples
```

describe google_compute_snapshot(project: 'chef-gcp-inspec', name: 'inspec-gcp-disk-snapshot') do
it { should exist }
its('source_disk') { should match 'my_disk' }
end

describe google_compute_snapshot(project: 'chef-gcp-inspec', name: 'nonexistent') do
it { should_not exist }
end
```

## Properties
Properties that can be accessed from the `google_compute_snapshot` resource:

* `creation_timestamp`: Creation timestamp in RFC3339 text format.

* `id`: The unique identifier for the resource.

* `disk_size_gb`: Size of the snapshot, specified in GB.

* `name`: Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

* `description`: An optional description of this resource.

* `storage_bytes`: A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.

* `licenses`: A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key.

* `labels`: Labels to apply to this Snapshot.

* `label_fingerprint`: The fingerprint used for optimistic locking of this resource. Used internally during updates.

* `source_disk`: A reference to the disk used to create this snapshot.

* `zone`: A reference to the zone where the disk is hosted.

* `snapshot_encryption_key`: The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

* `rawKey`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.

* `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

* `kmsKeyName`: The name of the encryption key that is stored in Google Cloud KMS.

* `source_disk_encryption_key`: The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

* `rawKey`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.

* `kmsKeyName`: The name of the encryption key that is stored in Google Cloud KMS.
45 changes: 45 additions & 0 deletions docs/resources/google_compute_snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: About the google_compute_snapshots resource
platform: gcp
---

## Syntax
A `google_compute_snapshots` is used to test a Google Snapshot resource

## Examples
```

describe google_compute_snapshots(project: 'chef-gcp-inspec') do
its('count') { should be >= 1 }
end

describe.one do
google_compute_snapshots(project: 'chef-gcp-inspec').names do |snapshot_name|
describe google_compute_snapshot(project: 'chef-gcp-inspec', name: snapshot_name) do
its('source_disk') { should match 'my_disk' }
end
end
end
```

## Properties
Properties that can be accessed from the `google_compute_snapshots` resource:

See [google_compute_snapshot.md](google_compute_snapshot.md) for more detailed information
* `creation_timestamps`: an array of `google_compute_snapshot` creation_timestamp
* `ids`: an array of `google_compute_snapshot` id
* `disk_size_gbs`: an array of `google_compute_snapshot` disk_size_gb
* `names`: an array of `google_compute_snapshot` name
* `descriptions`: an array of `google_compute_snapshot` description
* `storage_bytes`: an array of `google_compute_snapshot` storage_bytes
* `licenses`: an array of `google_compute_snapshot` licenses
* `labels`: an array of `google_compute_snapshot` labels
* `label_fingerprints`: an array of `google_compute_snapshot` label_fingerprint
* `source_disks`: an array of `google_compute_snapshot` source_disk
* `zones`: an array of `google_compute_snapshot` zone
* `snapshot_encryption_keys`: an array of `google_compute_snapshot` snapshot_encryption_key
* `source_disk_encryption_keys`: an array of `google_compute_snapshot` source_disk_encryption_key

## 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.
52 changes: 52 additions & 0 deletions docs/resources/google_compute_ssl_certificate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: About the google_compute_ssl_certificate resource
platform: gcp
---

## Syntax
A `google_compute_ssl_certificate` is used to test a Google SslCertificate resource

## Examples
```
describe google_compute_ssl_certificate(project: 'chef-gcp-inspec', name: 'inspec-gcp-ssl-certificate') do
it { should exist }
its('description') { should eq 'A fake ssl certificate (DO NOT USE)' }
its('certificate') { should eq '-----BEGIN CERTIFICATE-----
MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT
BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm
b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN
AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2
MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP
BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM
FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z
aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH
KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ
4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O
BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn
0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O
M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ
zqGNhIPGq2ULqXKK8BY=
-----END CERTIFICATE-----
' }
end

describe google_compute_ssl_certificate(project: 'chef-gcp-inspec', name: 'nonexistent') do
it { should_not exist }
end
```

## Properties
Properties that can be accessed from the `google_compute_ssl_certificate` resource:

* `certificate`: The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.

* `creation_timestamp`: Creation timestamp in RFC3339 text format.

* `description`: An optional description of this resource.

* `id`: The unique identifier for the resource.

* `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

* `private_key`: The write-only private key in PEM format.
49 changes: 49 additions & 0 deletions docs/resources/google_compute_ssl_certificates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: About the google_compute_ssl_certificates resource
platform: gcp
---

## Syntax
A `google_compute_ssl_certificates` is used to test a Google SslCertificate resource

## Examples
```
describe google_compute_ssl_certificates(project: 'chef-gcp-inspec') do

its('names') { should include 'inspec-gcp-ssl-certificate' }
its('descriptions') { should include 'A fake ssl certificate (DO NOT USE)' }
its('certificates') { should include '-----BEGIN CERTIFICATE-----
MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT
BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm
b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN
AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2
MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP
BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM
FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z
aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH
KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ
4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O
BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn
0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O
M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ
zqGNhIPGq2ULqXKK8BY=
-----END CERTIFICATE-----
' }
end
```

## Properties
Properties that can be accessed from the `google_compute_ssl_certificates` resource:

See [google_compute_ssl_certificate.md](google_compute_ssl_certificate.md) for more detailed information
* `certificates`: an array of `google_compute_ssl_certificate` certificate
* `creation_timestamps`: an array of `google_compute_ssl_certificate` creation_timestamp
* `descriptions`: an array of `google_compute_ssl_certificate` description
* `ids`: an array of `google_compute_ssl_certificate` id
* `names`: an array of `google_compute_ssl_certificate` name
* `private_keys`: an array of `google_compute_ssl_certificate` private_key

## 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.
Loading