Skip to content

Commit

Permalink
Add integrations product. Create Client resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitjangid committed Mar 13, 2024
1 parent ab21222 commit 67b8b97
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
95 changes: 95 additions & 0 deletions mmv1/products/integrations/Client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Copyright 2024 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:Api::Resource
name: 'Client'
description: |
Application Integration Client.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/application-integration/docs/overview'
'Set up Application Integration': 'https://cloud.google.com/application-integration/docs/setup-application-integration'
api: 'https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.clients'
base_url: 'projects/{{project}}/locations/{{location}}/clients'
self_link: 'projects/{{project}}/locations/{{location}}/clients'
immutable: true
create_url: 'projects/{{project}}/locations/{{location}}/clients:provision'
autogen_async: false
skip_delete: true
import_format:
[
'projects/{{project}}/locations/{{location}}/clients',
]
parameters:
- !ruby/object:Api::Type::String
name: 'location'
required: true
immutable: true
url_param_only: true
description: |
Location in which client needs to be provisioned.
properties:
- !ruby/object:Api::Type::NestedObject
name: 'cloudKmsConfig'
description: |
Cloud KMS config for AuthModule to encrypt/decrypt credentials.
properties:
- !ruby/object:Api::Type::String
name: "kmsLocation"
required: true
description: |
Location name of the key ring, e.g. "us-west1".
- !ruby/object:Api::Type::String
name: "kmsRing"
required: true
description: |
A key ring organizes keys in a specific Google Cloud location and allows you to
manage access control on groups of keys. A key ring's name does not need to be
unique across a Google Cloud project, but must be unique within a given location.
- !ruby/object:Api::Type::String
name: "key"
required: true
description: |
A Cloud KMS key is a named object containing one or more key versions, along
with metadata for the key. A key exists on exactly one key ring tied to a
specific location.
- !ruby/object:Api::Type::String
name: "keyVersion"
description: |
Each version of a key contains key material used for encryption or signing.
A key's version is represented by an integer, starting at 1. To decrypt data
or verify a signature, you must use the same key version that was used to
encrypt or sign the data.
- !ruby/object:Api::Type::String
name: "kmsProjectId"
description: |
The Google Cloud project id of the project where the kms key stored. If empty,
the kms key is stored at the same project as customer's project and ecrypted
with CMEK, otherwise, the kms key is stored in the tenant project and
encrypted with GMEK.
- !ruby/object:Api::Type::Boolean
name: 'createSampleWorkflows'
description: |
Indicates if sample workflow should be created along with provisioning.
- !ruby/object:Api::Type::Boolean
name: 'provisionGmek'
description: |
Indicates provision with GMEK or CMEK.
- !ruby/object:Api::Type::String
name: 'runAsServiceAccount'
description: |
User input run-as service account, if empty, will bring up a new default service account.
examples:
- !ruby/object:Provider::Terraform::Examples
name: "integrations_client_basic"
primary_resource_id: "basic"
29 changes: 29 additions & 0 deletions mmv1/products/integrations/product.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2020 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:Api::Product
name: Integrations
display_name: Application Integration
versions:
- !ruby/object:Api::Product::Version
name: ga
base_url: https://integrations.googleapis.com/v1/
# Integrations has no beta API, but running the full Terraform
# acceptance tests depends on a beta-only resource and a bug in MM
# will generate beta tests against the GA provider in this case, so
# we fake a beta API with the same endpoint as the GA API.
- !ruby/object:Api::Product::Version
name: beta
base_url: https://integrations.googleapis.com/v1/
scopes:
- https://www.googleapis.com/auth/cloud-platform
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "google_integrations_client" "<%= ctx[:primary_resource_id] %>" {
location = "us-central1"
}

0 comments on commit 67b8b97

Please sign in to comment.