This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
forked from inspec/inspec-gcp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add memcache, gke release channel, sql ca cert (#3682) (#412)
* Add memcache, gke release channel, sql ca cert * Fixes * Revert extra ga version * Fixes Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
f69f6ed
commit aadb95f
Showing
22 changed files
with
591 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: About the google_memcache_instance resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_memcache_instance` is used to test a Google Instance resource | ||
|
||
## Examples | ||
``` | ||
describe google_memcache_instance(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'mem-instance') do | ||
it { should exist } | ||
its('node_count') { should cmp 1 } | ||
end | ||
describe google_memcache_instance(project: 'chef-gcp-inspec', region: 'europe-west2', name: "nonexistent") do | ||
it { should_not exist } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_memcache_instance` resource: | ||
|
||
|
||
* `name`: (Beta only) The resource name of the instance. | ||
|
||
* `display_name`: (Beta only) A user-visible name for the instance. | ||
|
||
* `create_time`: (Beta only) Creation timestamp in RFC3339 text format. | ||
|
||
* `labels`: (Beta only) Resource labels to represent user-provided metadata. | ||
|
||
* `zones`: (Beta only) Zones where memcache nodes should be provisioned. If not provided, all zones will be used. | ||
|
||
* `authorized_network`: (Beta only) The full name of the GCE network to connect the instance to. If not provided, 'default' will be used. | ||
|
||
* `node_count`: (Beta only) Number of nodes in the memcache instance. | ||
|
||
* `node_config`: (Beta only) Configuration for memcache nodes. | ||
|
||
* `cpu_count`: (Beta only) Number of CPUs per node. | ||
|
||
* `memory_size_mb`: (Beta only) Memory size in Mebibytes for each memcache node. | ||
|
||
* `memcache_parameters`: (Beta only) User-specified parameters for this memcache instance. | ||
|
||
* `id`: (Beta only) This is a unique ID associated with this set of parameters. | ||
|
||
* `params`: (Beta only) User-defined set of parameters to use in the memcache process. | ||
|
||
* `region`: (Beta only) The name of the Memcache region of the instance. | ||
|
||
|
||
## GCP Permissions |
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,36 @@ | ||
--- | ||
title: About the google_memcache_instances resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_memcache_instances` is used to test a Google Instance resource | ||
|
||
## Examples | ||
``` | ||
describe google_memcache_instances(project: 'chef-gcp-inspec', region: 'europe-west2') do | ||
its('count') { should be >= 1 } | ||
its('node_counts') { should include 1 } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_memcache_instances` resource: | ||
|
||
See [google_memcache_instance.md](google_memcache_instance.md) for more detailed information | ||
* `names`: (Beta only) an array of `google_memcache_instance` name | ||
* `display_names`: (Beta only) an array of `google_memcache_instance` display_name | ||
* `create_times`: (Beta only) an array of `google_memcache_instance` create_time | ||
* `labels`: (Beta only) an array of `google_memcache_instance` labels | ||
* `zones`: (Beta only) an array of `google_memcache_instance` zones | ||
* `authorized_networks`: (Beta only) an array of `google_memcache_instance` authorized_network | ||
* `node_counts`: (Beta only) an array of `google_memcache_instance` node_count | ||
* `node_configs`: (Beta only) an array of `google_memcache_instance` node_config | ||
* `memcache_parameters`: (Beta only) an array of `google_memcache_instance` memcache_parameters | ||
* `regions`: (Beta only) an array of `google_memcache_instance` 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. | ||
|
||
## GCP Permissions |
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
34 changes: 34 additions & 0 deletions
34
libraries/google/container/property/cluster_release_channel.rb
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 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Container | ||
module Property | ||
class ClusterReleaseChannel | ||
attr_reader :channel | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@channel = args['channel'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ClusterReleaseChannel" | ||
end | ||
end | ||
end | ||
end | ||
end |
37 changes: 37 additions & 0 deletions
37
libraries/google/memcache/property/instance_memcache_parameters.rb
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,37 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Memcache | ||
module Property | ||
class InstanceMemcacheParameters | ||
attr_reader :id | ||
|
||
attr_reader :params | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@id = args['id'] | ||
@params = args['params'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} InstanceMemcacheParameters" | ||
end | ||
end | ||
end | ||
end | ||
end |
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,37 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Memcache | ||
module Property | ||
class InstanceNodeConfig | ||
attr_reader :cpu_count | ||
|
||
attr_reader :memory_size_mb | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@cpu_count = args['cpuCount'] | ||
@memory_size_mb = args['memorySizeMb'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} InstanceNodeConfig" | ||
end | ||
end | ||
end | ||
end | ||
end |
54 changes: 54 additions & 0 deletions
54
libraries/google/sql/property/databaseinstance_server_ca_cert.rb
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 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module SQL | ||
module Property | ||
class DatabaseInstanceServerCaCert | ||
attr_reader :cert | ||
|
||
attr_reader :cert_serial_number | ||
|
||
attr_reader :common_name | ||
|
||
attr_reader :create_time | ||
|
||
attr_reader :expiration_time | ||
|
||
attr_reader :sha1_fingerprint | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@cert = args['cert'] | ||
@cert_serial_number = args['certSerialNumber'] | ||
@common_name = args['commonName'] | ||
@create_time = parse_time_string(args['createTime']) | ||
@expiration_time = parse_time_string(args['expirationTime']) | ||
@sha1_fingerprint = args['sha1Fingerprint'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} DatabaseInstanceServerCaCert" | ||
end | ||
|
||
# Handles parsing RFC3339 time string | ||
def parse_time_string(time_string) | ||
time_string ? Time.parse(time_string) : nil | ||
end | ||
end | ||
end | ||
end | ||
end |
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
Oops, something went wrong.