...
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: storagetransfer.cnrm.cloud.google.com
19 namespace: cnrm-system
20spec:
21 name: StorageTransfer
22 version: v1beta1
23 serviceHostName: "storagetransfer.googleapis.com"
24 resources:
25 - name: google_storage_transfer_job
26 kind: StorageTransferJob
27 serverGeneratedIDField: "name"
28 resourceID:
29 targetField: name
30 valueTemplate: "transferJobs/{{value}}"
31 skipImport: true
32 # NOTE: this resource's import ID is inconsistent, as the underlying API does not support the
33 # traditional "projects/{{project}}/{{collection}}/{{id}} relative resource name format. The
34 # project is instead specified as a required query parameter on the GET request. See:
35 # https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/get
36 idTemplate: "{{project}}/{{name}}"
37 # importer is not using the regex format
38 idTemplateCanBeUsedToMatchResourceName: false
39 resourceAvailableInAssetInventory: false
40 containers:
41 - type: project
42 tfField: project
43 resourceReferences:
44 - tfField: transfer_spec.gcs_data_sink.bucket_name
45 key: bucketRef
46 gvk:
47 kind: StorageBucket
48 version: v1beta1
49 group: storage.cnrm.cloud.google.com
50 - tfField: transfer_spec.gcs_data_source.bucket_name
51 key: bucketRef
52 gvk:
53 kind: StorageBucket
54 version: v1beta1
55 group: storage.cnrm.cloud.google.com
56 - tfField: notification_config.pubsub_topic
57 key: topicRef
58 gvk:
59 kind: PubSubTopic
60 version: v1beta1
61 group: pubsub.cnrm.cloud.google.com
62 description: |-
63 The PubSubTopic to which to publish notifications.
64 valueTemplate: "projects/{{project}}/topics/{{value}}"
View as plain text