...
1# Copyright 2022 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: core.cnrm.cloud.google.com/v1alpha1
16kind: ServiceMapping
17metadata:
18 name: kms.cnrm.cloud.google.com
19 namespace: cnrm-system
20spec:
21 name: KMS
22 version: v1beta1
23 serviceHostName: kms.googleapis.com
24 resources:
25 - name: google_kms_crypto_key
26 kind: KMSCryptoKey
27 autoGenerated: true
28 idTemplate: "{{key_ring}}/cryptoKeys/{{name}}"
29 idTemplateCanBeUsedToMatchResourceName: false
30 resourceAvailableInAssetInventory: false
31 metadataMapping:
32 name: name
33 labels: labels
34 resourceID:
35 targetField: name
36 - name: google_kms_crypto_key_version
37 kind: KMSCryptoKeyVersion
38 autoGenerated: true
39 idTemplate: "{{name}}"
40 idTemplateCanBeUsedToMatchResourceName: false
41 resourceAvailableInAssetInventory: false
42 serverGeneratedIDField: name
43 resourceID:
44 targetField: name
45 valueTemplate: "{{crypto_key}}/cryptoKeyVersions/{{value}}"
46 - name: google_kms_key_ring
47 kind: KMSKeyRing
48 autoGenerated: true
49 idTemplate: "projects/{{project}}/locations/{{location}}/keyRings/{{name}}"
50 idTemplateCanBeUsedToMatchResourceName: false
51 resourceAvailableInAssetInventory: false
52 metadataMapping:
53 name: name
54 resourceID:
55 targetField: name
56 hierarchicalReferences:
57 - type: project
58 key: projectRef
59 resourceReferences:
60 - tfField: project
61 key: projectRef
62 description: |-
63 The project that this resource belongs to.
64 gvk:
65 kind: Project
66 version: v1beta1
67 group: resourcemanager.cnrm.cloud.google.com
68 - name: google_kms_key_ring_import_job
69 kind: KMSKeyRingImportJob
70 autoGenerated: true
71 idTemplate: "{{name}}"
72 idTemplateCanBeUsedToMatchResourceName: false
73 resourceAvailableInAssetInventory: false
74 serverGeneratedIDField: name
75 resourceID:
76 targetField: name
77 valueTemplate: "{{key_ring}}/importJobs/{{value}}"
78 - name: google_kms_secret_ciphertext
79 kind: KMSSecretCiphertext
80 autoGenerated: true
81 idTemplate: "{{crypto_key}}/{{ciphertext}}"
82 idTemplateCanBeUsedToMatchResourceName: false
83 resourceAvailableInAssetInventory: false
84 serverGeneratedIDField: ciphertext
85 resourceID:
86 targetField: ciphertext
View as plain text