# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. apiVersion: core.cnrm.cloud.google.com/v1alpha1 kind: ServiceMapping metadata: name: dataflow.cnrm.cloud.google.com namespace: cnrm-system spec: name: Dataflow version: v1beta1 serviceHostName: "dataflow.googleapis.com" resources: - name: google_dataflow_flex_template_job kind: DataflowFlexTemplateJob metadataMapping: name: name ignoredFields: # TODO(b/254868598): Enable support for labels field - labels # TODO(b/288129227): Enable support for problematic dataflow fields. - additional_experiments - autoscaling_algorithm - enable_streaming_engine - ip_configuration - kms_key_name - launcher_machine_type - machine_type - max_workers - network - num_workers - sdk_container_image - service_account_email - staging_location - subnetwork - temp_location - transform_name_mapping serverGeneratedIDField: "job_id" idTemplate: "{{job_id}}" # doesn't have an importer idTemplateCanBeUsedToMatchResourceName: false resourceAvailableInAssetInventory: false skipImport: true directives: - on_delete - skip_wait_on_job_termination containers: - type: project tfField: project # resourceReferences: # - tfField: kms_key_name # key: kmsKeyNameRef # gvk: # kind: KMSCryptoKey # version: v1beta1 # group: kms.cnrm.cloud.google.com # description: |- # The name for the Cloud KMS key for the job. # targetField: self_link # - tfField: service_account_email # key: serviceAccountEmailRef # gvk: # kind: IAMServiceAccount # version: v1beta1 # group: iam.cnrm.cloud.google.com # targetField: email # - tfField: network # key: networkRef # gvk: # kind: ComputeNetwork # version: v1beta1 # group: compute.cnrm.cloud.google.com # targetField: self_link # - tfField: subnetwork # key: subnetworkRef # gvk: # kind: ComputeSubnetwork # version: v1beta1 # group: compute.cnrm.cloud.google.com # targetField: self_link mutableButUnreadableFields: - container_spec_gcs_path - parameters - name: google_dataflow_job kind: DataflowJob metadataMapping: name: name labels: labels resourceID: targetField: name idTemplate: "{{project}}/{{region?}}/{{name}}" # doesn't have an importer idTemplateCanBeUsedToMatchResourceName: false resourceAvailableInAssetInventory: true skipImport: true directives: - on_delete - skip_wait_on_job_termination containers: - type: project tfField: project resourceReferences: - tfField: service_account_email key: serviceAccountRef gvk: kind: IAMServiceAccount version: v1beta1 group: iam.cnrm.cloud.google.com targetField: email - tfField: network key: networkRef gvk: kind: ComputeNetwork version: v1beta1 group: compute.cnrm.cloud.google.com targetField: self_link - tfField: subnetwork key: subnetworkRef gvk: kind: ComputeSubnetwork version: v1beta1 group: compute.cnrm.cloud.google.com targetField: self_link - tfField: kms_key_name key: kmsKeyRef gvk: kind: KMSCryptoKey version: v1beta1 group: kms.cnrm.cloud.google.com description: |- The name for the Cloud KMS key for the job. targetField: self_link mutableButUnreadableFields: - parameters - ip_configuration