Skip to content

googleDataplexZone

The Dataplex Zone resource

Example Usage - basic_zone

A basic example of a dataplex 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.*/
const googleDataplexLakeBasic = new google.dataplexLake.DataplexLake(
  this,
  "basic",
  {
    description: "Lake for DCL",
    display_name: "Lake for DCL",
    labels: [
      {
        "my-lake": "exists",
      },
    ],
    location: "us-west1",
    name: "lake",
    project: "my-project-name",
  }
);
new google.dataplexZone.DataplexZone(this, "primary", {
  description: "Zone for DCL",
  discovery_spec: [
    {
      enabled: false,
    },
  ],
  display_name: "Zone for DCL",
  labels: [{}],
  lake: googleDataplexLakeBasic.name,
  location: "us-west1",
  name: "zone",
  project: "my-project-name",
  resource_spec: [
    {
      location_type: "MULTI_REGION",
    },
  ],
  type: "RAW",
});

Argument Reference

The following arguments are supported:

  • discoverySpec - (Required) Required. Specification of the discovery feature applied to data in this zone.

  • lake - (Required) The lake for the resource

  • location - (Required) The location for the resource

  • name - (Required) The name of the zone.

  • resourceSpec - (Required) Required. Immutable. Specification of the resources that are referenced by the assets within this zone.

  • type - (Required) Required. Immutable. The type of the zone. Possible values: TYPE_UNSPECIFIED, RAW, CURATED

The discoverySpec block supports:

  • csvOptions - (Optional) Optional. Configuration for CSV data.

  • enabled - (Required) Required. Whether discovery is enabled.

  • excludePatterns - (Optional) Optional. The list of patterns to apply for selecting data to exclude during discovery. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.

  • includePatterns - (Optional) Optional. The list of patterns to apply for selecting data to include during discovery if only a subset of the data should considered. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.

  • jsonOptions - (Optional) Optional. Configuration for Json data.

  • schedule - (Optional) Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running discovery periodically. Successive discovery runs must be scheduled at least 60 minutes apart. The default value is to run discovery every 60 minutes. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * *".

The resourceSpec block supports:

  • locationType - (Required) Required. Immutable. The location type of the resources that are allowed to be attached to the assets within this zone. Possible values: LOCATION_TYPE_UNSPECIFIED, SINGLE_REGION, MULTI_REGION

  • description - (Optional) Optional. Description of the zone.

  • displayName - (Optional) Optional. User friendly display name.

  • labels - (Optional) Optional. User defined labels for the zone.

  • project - (Optional) The project for the resource

The csvOptions block supports:

  • delimiter - (Optional) Optional. The delimiter being used to separate values. This defaults to ','.

  • disableTypeInference - (Optional) Optional. Whether to disable the inference of data type for CSV data. If true, all columns will be registered as strings.

  • encoding - (Optional) Optional. The character encoding of the data. The default is UTF-8.

  • headerRows - (Optional) Optional. The number of rows to interpret as header rows that should be skipped when reading data rows.

The jsonOptions block supports:

  • disableTypeInference - (Optional) Optional. Whether to disable the inference of data type for Json data. If true, all columns will be registered as their primitive types (strings, number or boolean).

  • encoding - (Optional) Optional. The character encoding of the data. The default is UTF-8.

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/{{location}}/lakes/{{lake}}/zones/{{name}}

  • assetStatus - Output only. Aggregated status of the underlying assets of the zone.

  • createTime - Output only. The time when the zone was created.

  • state - Output only. Current state of the zone. Possible values: STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING, ACTION_REQUIRED

  • uid - Output only. System generated globally unique ID for the zone. This ID will be different if the zone is deleted and re-created with the same name.

  • updateTime - Output only. The time when the zone was last updated.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Zone can be imported using any of these accepted formats:

$ terraform import google_dataplex_zone.default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}
$ terraform import google_dataplex_zone.default {{project}}/{{location}}/{{lake}}/{{name}}
$ terraform import google_dataplex_zone.default {{location}}/{{lake}}/{{name}}