...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings/dns.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: dns.cnrm.cloud.google.com
    19  namespace: cnrm-system
    20spec:
    21  name: DNS
    22  version: v1beta1
    23  serviceHostName: "dns.googleapis.com"
    24  resources:
    25    - name: google_dns_managed_zone
    26      kind: DNSManagedZone
    27      metadataMapping:
    28        name: name
    29        labels: labels
    30      resourceID:
    31        targetField: name
    32      idTemplate: "projects/{{project}}/managedZones/{{name}}"
    33      idTemplateCanBeUsedToMatchResourceName: true
    34      resourceAvailableInAssetInventory: true
    35      directives:
    36      - force_destroy
    37      iamConfig:
    38        policyName: google_dns_managed_zone_iam_policy
    39        policyMemberName: google_dns_managed_zone_iam_member
    40        referenceField:
    41          name: managed_zone
    42          type: name
    43        supportsConditions: false
    44      resourceReferences:
    45        - tfField: private_visibility_config.networks.network_url
    46          description: |-
    47            VPC network to bind to.
    48          key: networkRef
    49          gvk:
    50            kind: ComputeNetwork
    51            version: v1beta1
    52            group: compute.cnrm.cloud.google.com
    53          targetField: self_link
    54        - tfField: peering_config.target_network.network_url
    55          description: |-
    56            VPC network to forward queries to.
    57          key: networkRef
    58          gvk:
    59            kind: ComputeNetwork
    60            version: v1beta1
    61            group: compute.cnrm.cloud.google.com
    62          targetField: self_link
    63        - tfField: private_visibility_config.gke_clusters.gke_cluster_name
    64          description: |-
    65            The resource name of the cluster to bind this ManagedZone to.
    66            This should be specified in the format like
    67            'projects/*/locations/*/clusters/*'.
    68          key: gkeClusterNameRef
    69          gvk:
    70            kind: ContainerCluster
    71            version: v1beta1
    72            group: container.cnrm.cloud.google.com
    73          targetField: self_link
    74      containers:
    75        - type: project
    76          tfField: project
    77    - name: google_dns_policy
    78      kind: DNSPolicy
    79      metadataMapping:
    80        name: name
    81      resourceID:
    82        targetField: name
    83      idTemplate: "projects/{{project}}/policies/{{name}}"
    84      idTemplateCanBeUsedToMatchResourceName: true
    85      resourceAvailableInAssetInventory: true
    86      resourceReferences:
    87        - tfField: networks.network_url
    88          description: |-
    89            VPC network to bind to.
    90          key: networkRef
    91          gvk:
    92            kind: ComputeNetwork
    93            version: v1beta1
    94            group: compute.cnrm.cloud.google.com
    95          targetField: self_link
    96      containers:
    97        - type: project
    98          tfField: project
    99    - name: google_dns_record_set
   100      kind: DNSRecordSet
   101      resourceReferences:
   102      - tfField: managed_zone
   103        key: managedZoneRef
   104        gvk:
   105          kind: DNSManagedZone
   106          version: v1beta1
   107          group: dns.cnrm.cloud.google.com
   108      - tfField: rrdatas
   109        key: rrdatasRefs
   110        gvk:
   111          kind: ComputeAddress
   112          version: v1beta1
   113          group: compute.cnrm.cloud.google.com
   114        targetField: address
   115      idTemplate: "{{project}}/{{zone-name}}/{{record-name}}/{{type}}"
   116      # no actual URL, is a list operation for a dns managed zone
   117      idTemplateCanBeUsedToMatchResourceName: false
   118      resourceAvailableInAssetInventory: false
   119      # TODO(b/233267548): Ignore routing_policy because of complexity brought by rrdatas/rrdatasRefs
   120      ignoredFields:
   121        - routing_policy
   122      containers:
   123        - type: project
   124          tfField: project
   125

View as plain text