...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings/logging.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings

     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: logging.cnrm.cloud.google.com
    19  namespace: cnrm-system
    20spec:
    21  name: Logging
    22  version: v1beta1
    23  serviceHostName: "logging.googleapis.com"
    24  resources:
    25    - name: google_logging_log_sink
    26      kind: LoggingLogSink
    27      # Due to this being a custom KCC-only resource, the ID template is
    28      # in a non-standard format to more easily allow for TF resource
    29      # multiplexing.
    30      idTemplate: "{{project?}}#{{folder?}}#{{org_id?}}#{{name}}"
    31      # This TF resource has a custom crafted import ID that has an arbitrary format that is not able to be mapped
    32      # cleanly to a URI, due to being a combination of multiple underlying resources.
    33      idTemplateCanBeUsedToMatchResourceName: false
    34      resourceAvailableInAssetInventory: true
    35      metadataMapping:
    36        name: name
    37      resourceID:
    38        targetField: name
    39      iamMemberReferenceConfig:
    40        targetField: writer_identity
    41      resourceReferences:
    42        - tfField: project
    43          key: projectRef
    44          description: |-
    45            The project in which to create the sink. Only one of projectRef,
    46            folderRef, or organizationRef may be specified.
    47          gvk:
    48            kind: Project
    49            version: v1beta1
    50            group: resourcemanager.cnrm.cloud.google.com
    51          parent: true
    52        - tfField: folder
    53          key: folderRef
    54          description: |-
    55            The folder in which to create the sink. Only one of projectRef,
    56            folderRef, or organizationRef may be specified.
    57          gvk:
    58            group: resourcemanager.cnrm.cloud.google.com
    59            version: v1beta1
    60            kind: Folder
    61          parent: true
    62          targetField: folder_id
    63        - tfField: org_id
    64          key: organizationRef
    65          description: |-
    66            The organization in which to create the sink. Only one of projectRef,
    67            folderRef, or organizationRef may be specified.
    68          gvk:
    69            group: resourcemanager.cnrm.cloud.google.com
    70            version: v1beta1
    71            kind: Organization
    72          parent: true
    73        - tfField: destination
    74          types:
    75            - key: storageBucketRef
    76              gvk:
    77                kind: StorageBucket
    78                version: v1beta1
    79                group: storage.cnrm.cloud.google.com
    80              valueTemplate: "storage.googleapis.com/{{value}}"
    81            - key: bigQueryDatasetRef
    82              gvk:
    83                kind: BigQueryDataset
    84                version: v1beta1
    85                group: bigquery.cnrm.cloud.google.com
    86              valueTemplate: "bigquery.googleapis.com/projects/{{project}}/datasets/{{value}}"
    87            - key: pubSubTopicRef
    88              gvk:
    89                kind: PubSubTopic
    90                version: v1beta1
    91                group: pubsub.cnrm.cloud.google.com
    92              valueTemplate: "pubsub.googleapis.com/projects/{{project}}/topics/{{value}}"
    93            - key: loggingLogBucketRef
    94              gvk:
    95                kind: LoggingLogBucket
    96                version: v1beta1
    97                group: logging.cnrm.cloud.google.com
    98              valueTemplate: "logging.googleapis.com/projects/{{project}}/locations/{{location}}/buckets/{{value}}"

View as plain text