...
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: pubsub.cnrm.cloud.google.com
19 namespace: cnrm-system
20spec:
21 name: PubSub
22 version: v1beta1
23 serviceHostName: "pubsub.googleapis.com"
24 resources:
25 - name: google_pubsub_schema
26 kind: PubSubSchema
27 resourceID:
28 targetField: name
29 idTemplate: "projects/{{project}}/schemas/{{name}}"
30 idTemplateCanBeUsedToMatchResourceName: true
31 resourceAvailableInAssetInventory: false
32 metadataMapping:
33 name: name
34 hierarchicalReferences:
35 - type: project
36 key: projectRef
37 resourceReferences:
38 - tfField: project
39 key: projectRef
40 description: |-
41 The project that this resource belongs to.
42 gvk:
43 kind: Project
44 version: v1beta1
45 group: resourcemanager.cnrm.cloud.google.com
46 - name: google_pubsub_subscription
47 kind: PubSubSubscription
48 iamConfig:
49 policyName: google_pubsub_subscription_iam_policy
50 policyMemberName: google_pubsub_subscription_iam_member
51 referenceField:
52 name: subscription
53 type: name
54 metadataMapping:
55 name: name
56 labels: labels
57 resourceID:
58 targetField: name
59 idTemplate: "projects/{{project}}/subscriptions/{{name}}"
60 idTemplateCanBeUsedToMatchResourceName: true
61 resourceAvailableInAssetInventory: true
62 resourceReferences:
63 - key: topicRef
64 tfField: topic
65 description: |-
66 Reference to a PubSubTopic.
67 valueTemplate: "projects/{{project}}/topics/{{value}}"
68 gvk:
69 kind: PubSubTopic
70 version: v1beta1
71 group: pubsub.cnrm.cloud.google.com
72 - tfField: dead_letter_policy.dead_letter_topic
73 key: deadLetterTopicRef
74 gvk:
75 kind: PubSubTopic
76 version: v1beta1
77 group: pubsub.cnrm.cloud.google.com
78 valueTemplate: "projects/{{project}}/topics/{{value}}"
79 - tfField: bigquery_config.table
80 key: tableRef
81 description: |-
82 The name of the table to which to write data.
83 gvk:
84 kind: BigQueryTable
85 version: v1beta1
86 group: bigquery.cnrm.cloud.google.com
87 valueTemplate: "{{project}}.{{dataset_id}}.{{value}}"
88 containers:
89 - type: project
90 tfField: project
91 - name: google_pubsub_topic
92 kind: PubSubTopic
93 iamConfig:
94 policyName: google_pubsub_topic_iam_policy
95 policyMemberName: google_pubsub_topic_iam_member
96 referenceField:
97 name: topic
98 type: name
99 resourceReferences:
100 - tfField: kms_key_name
101 description: |-
102 The KMSCryptoKey to be used to protect access to messages published
103 on this topic. Your project's Pub/Sub service account
104 ('service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com')
105 must have 'roles/cloudkms.cryptoKeyEncrypterDecrypter' to use this
106 feature.
107 key: kmsKeyRef
108 gvk:
109 kind: KMSCryptoKey
110 version: v1beta1
111 group: kms.cnrm.cloud.google.com
112 targetField: self_link
113 - tfField: schema_settings.schema
114 key: schemaRef
115 gvk:
116 kind: PubSubSchema
117 version: v1beta1
118 group: pubsub.cnrm.cloud.google.com
119 valueTemplate: "projects/{{project}}/schemas/{{value}}"
120 metadataMapping:
121 name: name
122 labels: labels
123 resourceID:
124 targetField: name
125 idTemplate: "projects/{{project}}/topics/{{name}}"
126 idTemplateCanBeUsedToMatchResourceName: true
127 resourceAvailableInAssetInventory: true
128 containers:
129 - type: project
130 tfField: project
View as plain text