...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings/spanner.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: spanner.cnrm.cloud.google.com
    19  namespace: cnrm-system
    20spec:
    21  name: Spanner
    22  version: v1beta1
    23  serviceHostName: "spanner.googleapis.com"
    24  resources:
    25    - name: google_spanner_database
    26      kind: SpannerDatabase
    27      metadataMapping:
    28        name: name
    29      resourceID:
    30        targetField: name
    31      resourceReferences:
    32        - tfField: instance
    33          description: |-
    34            The instance to create the database on.
    35          key: instanceRef
    36          parent: true
    37          gvk:
    38            kind: SpannerInstance
    39            version: v1beta1
    40            group: spanner.cnrm.cloud.google.com
    41        - tfField: encryption_config.kms_key_name
    42          description: |-
    43            Fully qualified name of the KMS key to use to encrypt this database. This key
    44            must exist in the same location as the Spanner Database.
    45          key: kmsKeyRef
    46          gvk:
    47            kind: KMSCryptoKey
    48            version: v1beta1
    49            group: kms.cnrm.cloud.google.com
    50          targetField: self_link
    51      iamConfig:
    52        policyName: google_spanner_database_iam_policy
    53        policyMemberName: google_spanner_database_iam_member
    54        referenceField:
    55          name: database
    56          type: name
    57      idTemplate: "projects/{{project}}/instances/{{instance}}/databases/{{name}}"
    58      idTemplateCanBeUsedToMatchResourceName: true
    59      resourceAvailableInAssetInventory: true
    60      ignoredFields:
    61        - deletion_protection
    62      mutableButUnreadableFields:
    63        - ddl
    64      containers:
    65        - type: project
    66          tfField: project
    67    - name: google_spanner_instance
    68      kind: SpannerInstance
    69      metadataMapping:
    70        name: name
    71        labels: labels
    72      resourceID:
    73        targetField: name
    74      idTemplate: "projects/{{project}}/instances/{{name}}"
    75      idTemplateCanBeUsedToMatchResourceName: true
    76      resourceAvailableInAssetInventory: true
    77      iamConfig:
    78        policyName: google_spanner_instance_iam_policy
    79        policyMemberName: google_spanner_instance_iam_member
    80        referenceField:
    81          name: instance
    82          type: name
    83      directives:
    84        - force_destroy
    85      containers:
    86        - type: project
    87          tfField: project

View as plain text