Zone
The Dataplex Zone resource
Example Usage
Basic_zone
A basic example of a dataplex zone
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = new gcp.dataplex.Lake("basic", {
location: "us-west1",
name: "lake",
description: "Lake for DCL",
displayName: "Lake for DCL",
project: "my-project-name",
labels: {
"my-lake": "exists",
},
});
const primary = new gcp.dataplex.Zone("primary", {
discoverySpec: {
enabled: false,
},
lake: basic.name,
location: "us-west1",
name: "zone",
resourceSpec: {
locationType: "MULTI_REGION",
},
type: "RAW",
description: "Zone for DCL",
displayName: "Zone for DCL",
project: "my-project-name",
labels: {},
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.dataplex.Lake("basic",
location="us-west1",
name="lake",
description="Lake for DCL",
display_name="Lake for DCL",
project="my-project-name",
labels={
"my-lake": "exists",
})
primary = gcp.dataplex.Zone("primary",
discovery_spec={
"enabled": False,
},
lake=basic.name,
location="us-west1",
name="zone",
resource_spec={
"location_type": "MULTI_REGION",
},
type="RAW",
description="Zone for DCL",
display_name="Zone for DCL",
project="my-project-name",
labels={})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basic = new Gcp.DataPlex.Lake("basic", new()
{
Location = "us-west1",
Name = "lake",
Description = "Lake for DCL",
DisplayName = "Lake for DCL",
Project = "my-project-name",
Labels =
{
{ "my-lake", "exists" },
},
});
var primary = new Gcp.DataPlex.Zone("primary", new()
{
DiscoverySpec = new Gcp.DataPlex.Inputs.ZoneDiscoverySpecArgs
{
Enabled = false,
},
Lake = basic.Name,
Location = "us-west1",
Name = "zone",
ResourceSpec = new Gcp.DataPlex.Inputs.ZoneResourceSpecArgs
{
LocationType = "MULTI_REGION",
},
Type = "RAW",
Description = "Zone for DCL",
DisplayName = "Zone for DCL",
Project = "my-project-name",
Labels = null,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dataplex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
basic, err := dataplex.NewLake(ctx, "basic", &dataplex.LakeArgs{
Location: pulumi.String("us-west1"),
Name: pulumi.String("lake"),
Description: pulumi.String("Lake for DCL"),
DisplayName: pulumi.String("Lake for DCL"),
Project: pulumi.String("my-project-name"),
Labels: pulumi.StringMap{
"my-lake": pulumi.String("exists"),
},
})
if err != nil {
return err
}
_, err = dataplex.NewZone(ctx, "primary", &dataplex.ZoneArgs{
DiscoverySpec: &dataplex.ZoneDiscoverySpecArgs{
Enabled: pulumi.Bool(false),
},
Lake: basic.Name,
Location: pulumi.String("us-west1"),
Name: pulumi.String("zone"),
ResourceSpec: &dataplex.ZoneResourceSpecArgs{
LocationType: pulumi.String("MULTI_REGION"),
},
Type: pulumi.String("RAW"),
Description: pulumi.String("Zone for DCL"),
DisplayName: pulumi.String("Zone for DCL"),
Project: pulumi.String("my-project-name"),
Labels: pulumi.StringMap{},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.Lake;
import com.pulumi.gcp.dataplex.LakeArgs;
import com.pulumi.gcp.dataplex.Zone;
import com.pulumi.gcp.dataplex.ZoneArgs;
import com.pulumi.gcp.dataplex.inputs.ZoneDiscoverySpecArgs;
import com.pulumi.gcp.dataplex.inputs.ZoneResourceSpecArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var basic = new Lake("basic", LakeArgs.builder()
.location("us-west1")
.name("lake")
.description("Lake for DCL")
.displayName("Lake for DCL")
.project("my-project-name")
.labels(Map.of("my-lake", "exists"))
.build());
var primary = new Zone("primary", ZoneArgs.builder()
.discoverySpec(ZoneDiscoverySpecArgs.builder()
.enabled(false)
.build())
.lake(basic.name())
.location("us-west1")
.name("zone")
.resourceSpec(ZoneResourceSpecArgs.builder()
.locationType("MULTI_REGION")
.build())
.type("RAW")
.description("Zone for DCL")
.displayName("Zone for DCL")
.project("my-project-name")
.labels(Map.ofEntries(
))
.build());
}
}
resources:
primary:
type: gcp:dataplex:Zone
properties:
discoverySpec:
enabled: false
lake: ${basic.name}
location: us-west1
name: zone
resourceSpec:
locationType: MULTI_REGION
type: RAW
description: Zone for DCL
displayName: Zone for DCL
project: my-project-name
labels: {}
basic:
type: gcp:dataplex:Lake
properties:
location: us-west1
name: lake
description: Lake for DCL
displayName: Lake for DCL
project: my-project-name
labels:
my-lake: exists
Import
Zone can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}
{{project}}/{{location}}/{{lake}}/{{name}}
{{location}}/{{lake}}/{{name}}
When using thepulumi import
command, Zone can be imported using one of the formats above. For example:
$ pulumi import gcp:dataplex/zone:Zone default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}
$ pulumi import gcp:dataplex/zone:Zone default {{project}}/{{location}}/{{lake}}/{{name}}
$ pulumi import gcp:dataplex/zone:Zone default {{location}}/{{lake}}/{{name}}
Properties
Output only. Aggregated status of the underlying assets of the zone.
Output only. The time when the zone was created.
Optional. Description of the zone.
Required. Specification of the discovery feature applied to data in this zone.
Optional. User friendly display name.
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
The combination of labels configured directly on the resource and default labels configured on the provider.
Required. Immutable. Specification of the resources that are referenced by the assets within this zone.
Output only. The time when the zone was last updated.