...
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: serviceusage.cnrm.cloud.google.com
19 namespace: cnrm-system
20spec:
21 name: ServiceUsage
22 version: v1beta1
23 serviceHostName: "serviceusage.googleapis.com"
24 resources:
25 - name: google_project_service
26 kind: Service
27 idTemplate: "{{project}}/{{service}}"
28 idTemplateCanBeUsedToMatchResourceName: true
29 resourceAvailableInAssetInventory: true
30 reconciliationIntervalInSeconds: 3600
31 metadataMapping:
32 name: service
33 resourceID:
34 targetField: service
35 containers:
36 - type: project
37 tfField: project
38 ignoredFields:
39 - disable_on_destroy
40 directives:
41 - disable_on_destroy
42 - disable_dependent_services
43 resourceReferences:
44 - tfField: project
45 key: projectRef
46 description: |-
47 The project that this resource belongs to.
48 gvk:
49 kind: Project
50 version: v1beta1
51 group: resourcemanager.cnrm.cloud.google.com
52 hierarchicalReferences:
53 - type: project
54 key: projectRef
55 - name: google_project_service_identity
56 kind: ServiceIdentity
57 idTemplate: "projects/{{project}}/services/{{service}}"
58 # doesn't have a url to fetch this resource
59 idTemplateCanBeUsedToMatchResourceName: false
60 skipImport: true
61 unreadable: true
62 reconciliationIntervalInSeconds: 0
63 metadataMapping:
64 name: service
65 resourceID:
66 targetField: service
67 iamMemberReferenceConfig:
68 targetField: email
69 valueTemplate: "serviceAccount:{{value}}"
70 resourceReferences:
71 - tfField: project
72 key: projectRef
73 description: |-
74 The project that this resource belongs to.
75 gvk:
76 kind: Project
77 version: v1beta1
78 group: resourcemanager.cnrm.cloud.google.com
79 hierarchicalReferences:
80 - type: project
81 key: projectRef
View as plain text