Skip to content

Commit

Permalink
Automatically generated by magic modules for service: cloudkms and re…
Browse files Browse the repository at this point in the history
…source: Projects__locations__keyRing.

This commit includes the following changes:
- Singular Resource ERB File
- Plural Resource ERB File
- Terraform configuration
- api.yaml configuration for product cloudkms and resource Projects__locations__keyRing

Signed-off-by: Samir Anand <[email protected]>
  • Loading branch information
samiranand1990 committed Dec 13, 2023
1 parent dfff5d9 commit d7fde76
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 0 deletions.
54 changes: 54 additions & 0 deletions mmv1/products/cloudkms/api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

--- !ruby/object:Api::Product
name: cloudkms
display_name: cloudkms
versions:
- !ruby/object:Api::Product::Version
name: ga
base_url: https://cloudkms.googleapis.com//v1/
scopes:
- https://cloudkms.googleapis.com//auth/cloud-platform
apis_required:
- !ruby/object:Api::Product::ApiReference
name: https://cloudkms.googleapis.com/
url: https://console.cloud.google.com/apis/library/cloudkms.googleapis.com/
objects:

- !ruby/object:Api::Resource
name: ProjectLocationKeyRing
base_url: '{{parent}}/keyRings'
self_link: '{{name}}'
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
api: 'https://cloud.google.com/cloudkms/docs'
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
base_url: '{op_id}'
wait_ms: 1000
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
status: !ruby/object:Api::OpAsync::Status
path: 'done'
complete: True
allowed:
- True
- False
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
description: |-
A KeyRing is a toplevel logical grouping of CryptoKeys.
properties:

- !ruby/object:Api::Type::String
name: 'name'
description: |
Output only. The resource name for the KeyRing in the format `projects/*/locations/*/keyRings/*`.
- !ruby/object:Api::Type::String
name: 'createTime'
description: |
Output only. The time at which this KeyRing was created.
15 changes: 15 additions & 0 deletions mmv1/products/cloudkms/inspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Provider::Inspec::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% project_location_key_ring = grab_attributes(pwd)['project_location_key_ring'] -%>
describe google_cloudkms_project_location_key_ring(name: <%= doc_generation ? "' #{project_location_key_ring['name']}'":"project_location_key_ring['name']" -%>) do
it { should exist }
its('name') { should cmp <%= doc_generation ? "'#{project_location_key_ring['name']}'" : "project_location_key_ring['name']" -%> }
its('create_time') { should cmp <%= doc_generation ? "'#{project_location_key_ring['create_time']}'" : "project_location_key_ring['create_time']" -%> }

end

describe google_cloudkms_project_location_key_ring(name: "does_not_exit") do
it { should_not exist }
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.')

project_location_key_ring = input('project_location_key_ring', value: <%= JSON.pretty_generate(grab_attributes(pwd)['project_location_key_ring']) -%>, description: 'project_location_key_ring description')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% project_location_key_ring = grab_attributes(pwd)['project_location_key_ring'] -%>
describe google_cloudkms_project_location_key_rings() do
it { should exist }
end
Original file line number Diff line number Diff line change
Expand Up @@ -942,3 +942,8 @@ project_location_environment:
state : "value_state"
create_time : "value_createtime"
update_time : "value_updatetime"

project_location_key_ring:
name : "value_name"
parent : "value_parent"
create_time : "value_createtime"

0 comments on commit d7fde76

Please sign in to comment.