Skip to content

Latest commit

 

History

History
289 lines (222 loc) · 10.3 KB

data_fusion_instance.html.markdown

File metadata and controls

289 lines (222 loc) · 10.3 KB
subcategory page_title description
Cloud Data Fusion
Google: google_data_fusion_instance
Represents a Data Fusion instance.

google_data_fusion_instance

Represents a Data Fusion instance.

To get more information about Instance, see:

## Example Usage - Data Fusion Instance Basic
resource "google_data_fusion_instance" "basic_instance" {
  name = "my-instance"
  region = "us-central1"
  type = "BASIC"
  # Mark for testing to avoid service networking connection usage that is not cleaned up
  options = {
    prober_test_run = "true"
  }
}
## Example Usage - Data Fusion Instance Full
resource "google_data_fusion_instance" "extended_instance" {
  name = "my-instance"
  description = "My Data Fusion instance"
  region = "us-central1"
  type = "BASIC"
  enable_stackdriver_logging = true
  enable_stackdriver_monitoring = true
  labels = {
    example_key = "example_value"
  }
  private_instance = true
  network_config {
    network = "default"
    ip_allocation = "10.89.48.0/22"
  }
  version = "6.3.0"
  dataproc_service_account = data.google_app_engine_default_service_account.default.email
  # Mark for testing to avoid service networking connection usage that is not cleaned up
  options = {
    prober_test_run = "true"
  }
}

data "google_app_engine_default_service_account" "default" {
}
## Example Usage - Data Fusion Instance Cmek
resource "google_data_fusion_instance" "basic_cmek" {
  name   = "my-instance"
  region = "us-central1"
  type   = "BASIC"

  crypto_key_config {
    key_reference = google_kms_crypto_key.crypto_key.id
  }

  depends_on = [google_kms_crypto_key_iam_binding.crypto_key_binding]
}

resource "google_kms_crypto_key" "crypto_key" {
  name     = "my-instance"
  key_ring = google_kms_key_ring.key_ring.id
}

resource "google_kms_key_ring" "key_ring" {
  name     = "my-instance"
  location = "us-central1"
}

resource "google_kms_crypto_key_iam_binding" "crypto_key_binding" {
  crypto_key_id = google_kms_crypto_key.crypto_key.id
  role          = "roles/cloudkms.cryptoKeyEncrypterDecrypter"

  members = [
    "serviceAccount:service-${data.google_project.project.number}@gcp-sa-datafusion.iam.gserviceaccount.com"
  ]
}

data "google_project" "project" {}

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.

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

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

  • 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.

  • private_instance - (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.

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

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

  • crypto_key_config - (Optional) The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. 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 network_config block supports:

  • ip_allocation - (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 crypto_key_config block supports:

  • key_reference - (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/.

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}}

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

  • update_time - 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
  • state_message - Additional information about the current state of this Data Fusion instance if available.

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

  • service_account - (Beta) Deprecated. Use tenant_project_id instead to extract the tenant project ID.

  • tenant_project_id - The name of the tenant project.

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

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 60 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.