Skip to content

googleDataFusionInstance

Represents a Data Fusion instance.

To get more information about Instance, see:

Example Usage - Data Fusion Instance Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataFusionInstance.DataFusionInstance(this, "basic_instance", {
  name: "my-instance",
  region: "us-central1",
  type: "BASIC",
});

Example Usage - Data Fusion Instance Full

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleComputeNetworkNetwork = new google.computeNetwork.ComputeNetwork(
  this,
  "network",
  {
    name: "datafusion-full-network",
  }
);
const dataGoogleAppEngineDefaultServiceAccountDefault =
  new google.dataGoogleAppEngineDefaultServiceAccount.DataGoogleAppEngineDefaultServiceAccount(
    this,
    "default",
    {}
  );
const googleComputeGlobalAddressPrivateIpAlloc =
  new google.computeGlobalAddress.ComputeGlobalAddress(
    this,
    "private_ip_alloc",
    {
      address_type: "INTERNAL",
      name: "datafusion-ip-alloc",
      network: googleComputeNetworkNetwork.id,
      prefix_length: 22,
      purpose: "VPC_PEERING",
    }
  );
new google.dataFusionInstance.DataFusionInstance(this, "extended_instance", {
  accelerators: [
    {
      accelerator_type: "CDC",
      state: "ENABLED",
    },
  ],
  dataproc_service_account:
    dataGoogleAppEngineDefaultServiceAccountDefault.email,
  description: "My Data Fusion instance",
  display_name: "My Data Fusion instance",
  enable_stackdriver_logging: true,
  enable_stackdriver_monitoring: true,
  labels: [
    {
      example_key: "example_value",
    },
  ],
  name: "my-instance",
  network_config: [
    {
      ip_allocation: `\${${googleComputeGlobalAddressPrivateIpAlloc.address}}/\${${googleComputeGlobalAddressPrivateIpAlloc.prefixLength}}`,
      network: "default",
    },
  ],
  private_instance: true,
  region: "us-central1",
  type: "BASIC",
});

Example Usage - Data Fusion Instance Cmek

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleKmsKeyRingKeyRing = new google.kmsKeyRing.KmsKeyRing(
  this,
  "key_ring",
  {
    location: "us-central1",
    name: "my-instance",
  }
);
const dataGoogleProjectProject = new google.dataGoogleProject.DataGoogleProject(
  this,
  "project",
  {}
);
const googleKmsCryptoKeyCryptoKey = new google.kmsCryptoKey.KmsCryptoKey(
  this,
  "crypto_key",
  {
    key_ring: googleKmsKeyRingKeyRing.id,
    name: "my-instance",
  }
);
const googleKmsCryptoKeyIamBindingCryptoKeyBinding =
  new google.kmsCryptoKeyIamBinding.KmsCryptoKeyIamBinding(
    this,
    "crypto_key_binding",
    {
      crypto_key_id: googleKmsCryptoKeyCryptoKey.id,
      members: [
        `serviceAccount:service-\${${dataGoogleProjectProject.number}}@gcp-sa-datafusion.iam.gserviceaccount.com`,
      ],
      role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
    }
  );
new google.dataFusionInstance.DataFusionInstance(this, "cmek", {
  crypto_key_config: [
    {
      key_reference: googleKmsCryptoKeyCryptoKey.id,
    },
  ],
  depends_on: [`\${${googleKmsCryptoKeyIamBindingCryptoKeyBinding.fqn}}`],
  name: "my-instance",
  region: "us-central1",
  type: "BASIC",
});

Example Usage - Data Fusion Instance Enterprise

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataFusionInstance.DataFusionInstance(this, "enterprise_instance", {
  enable_rbac: true,
  name: "my-instance",
  region: "us-central1",
  type: "ENTERPRISE",
});

Example Usage - Data Fusion Instance Event

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googlePubsubTopicEvent = new google.pubsubTopic.PubsubTopic(
  this,
  "event",
  {
    name: "my-instance",
  }
);
const googleDataFusionInstanceEvent =
  new google.dataFusionInstance.DataFusionInstance(this, "event_1", {
    event_publish_config: [
      {
        enabled: true,
        topic: googlePubsubTopicEvent.id,
      },
    ],
    name: "my-instance",
    region: "us-central1",
    type: "BASIC",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleDataFusionInstanceEvent.overrideLogicalId("event");

Example Usage - Data Fusion Instance Zone

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataFusionInstance.DataFusionInstance(this, "zone", {
  name: "my-instance",
  region: "us-central1",
  type: "DEVELOPER",
  zone: "us-central1-a",
});

Argument Reference

The following arguments are supported:

  • name - (Required) The ID of the instance or a fully qualified identifier for the instance.

  • type - (Required) Represents the type of Data Fusion instance. Each type is configured with the default settings for processing and memory.

    • BASIC: Basic Data Fusion instance. In Basic type, the user will be able to create data pipelines using point and click UI. However, there are certain limitations, such as fewer number of concurrent pipelines, no support for streaming pipelines, etc.
    • ENTERPRISE: Enterprise Data Fusion instance. In Enterprise type, the user will have more features available, such as support for streaming pipelines, higher number of concurrent pipelines, etc.
    • DEVELOPER: Developer Data Fusion instance. In Developer type, the user will have all features available but with restrictive capabilities. This is to help enterprises design and develop their data ingestion and integration pipelines at low cost. Possible values are basic, enterprise, and developer.

  • description - (Optional) An optional description of the instance.

  • enableStackdriverLogging - (Optional) Option to enable Stackdriver Logging.

  • enableStackdriverMonitoring - (Optional) Option to enable Stackdriver Monitoring.

  • enableRbac - (Optional) Option to enable granular role-based access control.

  • labels - (Optional) The resource labels for instance to use to annotate any related underlying resources, such as Compute Engine VMs.

  • options - (Optional) Map of additional options used to configure the behavior of Data Fusion instance.

  • version - (Optional) Current version of the Data Fusion.

  • privateInstance - (Optional) Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet.

  • dataprocServiceAccount - (Optional) User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines.

  • networkConfig - (Optional) Network configuration options. These are required when a private Data Fusion instance is to be created. Structure is documented below.

  • zone - (Optional) Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field.

  • displayName - (Optional) Display name for an instance.

  • cryptoKeyConfig - (Optional) The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. Structure is documented below.

  • eventPublishConfig - (Optional) Option to enable and pass metadata for event publishing. Structure is documented below.

  • accelerators - (Optional) List of accelerators enabled for this CDF instance. If accelerators are enabled it is possible a permadiff will be created with the Options field. Users will need to either manually update their state file to include these diffed options, or include the field in a lifecycle ignore changes block. Structure is documented below.

  • region - (Optional) The region of the Data Fusion instance.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

The networkConfig block supports:

  • ipAllocation - (Required) The IP range in CIDR notation to use for the managed Data Fusion instance nodes. This range must not overlap with any other ranges used in the Data Fusion instance network.

  • network - (Required) Name of the network in the project with which the tenant project will be peered for executing pipelines. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}

The cryptoKeyConfig block supports:

  • keyReference - (Required) The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of projects//locations//keyRings//cryptoKeys/.

The eventPublishConfig block supports:

  • enabled - (Required) Option to enable Event Publishing.

  • topic - (Required) The resource name of the Pub/Sub topic. Format: projects/{projectId}/topics/{topic_id}

The accelerators block supports:

  • acceleratorType - (Required) The type of an accelator for a CDF instance. Possible values are cdc, healthcare, and ccaiInsights.

  • state - (Required) The type of an accelator for a CDF instance. Possible values are enabled and disabled.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/{{region}}/instances/{{name}}

  • createTime - The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds.

  • updateTime - The time the instance was last updated in RFC3339 UTC "Zulu" format, accurate to nanoseconds.

  • state - The current state of this Data Fusion instance.

    • CREATING: Instance is being created
    • RUNNING: Instance is running and ready for requests
    • FAILED: Instance creation failed
    • DELETING: Instance is being deleted
    • UPGRADING: Instance is being upgraded
    • RESTARTING: Instance is being restarted
  • stateMessage - Additional information about the current state of this Data Fusion instance if available.

  • serviceEndpoint - Endpoint on which the Data Fusion UI and REST APIs are accessible.

  • serviceAccount - (Beta) Deprecated. Use tenantProjectId instead to extract the tenant project ID.

  • tenantProjectId - The name of the tenant project.

  • gcsBucket - Cloud Storage bucket generated by Data Fusion in the customer project.

  • apiEndpoint - Endpoint on which the REST APIs is accessible.

  • p4ServiceAccount - P4 service account for the customer project.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 90 minutes.
  • update - Default is 25 minutes.
  • delete - Default is 50 minutes.

Import

Instance can be imported using any of these accepted formats:

$ terraform import google_data_fusion_instance.default projects/{{project}}/locations/{{region}}/instances/{{name}}
$ terraform import google_data_fusion_instance.default {{project}}/{{region}}/{{name}}
$ terraform import google_data_fusion_instance.default {{region}}/{{name}}
$ terraform import google_data_fusion_instance.default {{name}}

User Project Overrides

This resource supports User Project Overrides.