published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Warning:
gcp.dataplex.DataAssetis deprecated and will be removed in a future major release. Please usegcp.dataplex.DataProductDataAssetresource instead.
A data asset resource that can be packaged and shared via a data product.
Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.
To get more information about DataAsset, see:
- API documentation
- How-to Guides
Example Usage
Dataplex Data Asset Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.dataplex.DataProduct("example", {
project: "my-project-name",
location: "us-central1",
dataProductId: "tf-test-dp-_34962",
displayName: "Parent Data Product",
ownerEmails: ["gterraformtestuser@gmail.com"],
accessGroups: [{
id: "analyst",
groupId: "analyst",
displayName: "Data Analyst",
principal: {
googleGroup: "tf-test-analysts-_74000@example.com",
},
}],
});
const exampleDataset = new gcp.bigquery.Dataset("example", {
project: "my-project-name",
datasetId: "tf_test_dataset__75125",
location: "us-central1",
});
const exampleDataAsset = new gcp.dataplex.DataAsset("example", {
project: "my-project-name",
location: "us-central1",
dataProductId: example.dataProductId,
dataAssetId: "data-asset",
resource: pulumi.interpolate`//bigquery.googleapis.com/projects/${exampleDataset.project}/datasets/${exampleDataset.datasetId}`,
});
import pulumi
import pulumi_gcp as gcp
example = gcp.dataplex.DataProduct("example",
project="my-project-name",
location="us-central1",
data_product_id="tf-test-dp-_34962",
display_name="Parent Data Product",
owner_emails=["gterraformtestuser@gmail.com"],
access_groups=[{
"id": "analyst",
"group_id": "analyst",
"display_name": "Data Analyst",
"principal": {
"google_group": "tf-test-analysts-_74000@example.com",
},
}])
example_dataset = gcp.bigquery.Dataset("example",
project="my-project-name",
dataset_id="tf_test_dataset__75125",
location="us-central1")
example_data_asset = gcp.dataplex.DataAsset("example",
project="my-project-name",
location="us-central1",
data_product_id=example.data_product_id,
data_asset_id="data-asset",
resource=pulumi.Output.all(
project=example_dataset.project,
dataset_id=example_dataset.dataset_id
).apply(lambda resolved_outputs: f"//bigquery.googleapis.com/projects/{resolved_outputs['project']}/datasets/{resolved_outputs['dataset_id']}")
)
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/dataplex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := dataplex.NewDataProduct(ctx, "example", &dataplex.DataProductArgs{
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
DataProductId: pulumi.String("tf-test-dp-_34962"),
DisplayName: pulumi.String("Parent Data Product"),
OwnerEmails: pulumi.StringArray{
pulumi.String("gterraformtestuser@gmail.com"),
},
AccessGroups: dataplex.DataProductAccessGroupArray{
&dataplex.DataProductAccessGroupArgs{
Id: pulumi.String("analyst"),
GroupId: pulumi.String("analyst"),
DisplayName: pulumi.String("Data Analyst"),
Principal: &dataplex.DataProductAccessGroupPrincipalArgs{
GoogleGroup: pulumi.String("tf-test-analysts-_74000@example.com"),
},
},
},
})
if err != nil {
return err
}
exampleDataset, err := bigquery.NewDataset(ctx, "example", &bigquery.DatasetArgs{
Project: pulumi.String("my-project-name"),
DatasetId: pulumi.String("tf_test_dataset__75125"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
_, err = dataplex.NewDataAsset(ctx, "example", &dataplex.DataAssetArgs{
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
DataProductId: example.DataProductId,
DataAssetId: pulumi.String("data-asset"),
Resource: pulumi.All(exampleDataset.Project, exampleDataset.DatasetId).ApplyT(func(_args []interface{}) (string, error) {
project := _args[0].(string)
datasetId := _args[1].(string)
return fmt.Sprintf("//bigquery.googleapis.com/projects/%v/datasets/%v", project, datasetId), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.DataPlex.DataProduct("example", new()
{
Project = "my-project-name",
Location = "us-central1",
DataProductId = "tf-test-dp-_34962",
DisplayName = "Parent Data Product",
OwnerEmails = new[]
{
"gterraformtestuser@gmail.com",
},
AccessGroups = new[]
{
new Gcp.DataPlex.Inputs.DataProductAccessGroupArgs
{
Id = "analyst",
GroupId = "analyst",
DisplayName = "Data Analyst",
Principal = new Gcp.DataPlex.Inputs.DataProductAccessGroupPrincipalArgs
{
GoogleGroup = "tf-test-analysts-_74000@example.com",
},
},
},
});
var exampleDataset = new Gcp.BigQuery.Dataset("example", new()
{
Project = "my-project-name",
DatasetId = "tf_test_dataset__75125",
Location = "us-central1",
});
var exampleDataAsset = new Gcp.DataPlex.DataAsset("example", new()
{
Project = "my-project-name",
Location = "us-central1",
DataProductId = example.DataProductId,
DataAssetId = "data-asset",
Resource = Output.Tuple(exampleDataset.Project, exampleDataset.DatasetId).Apply(values =>
{
var project = values.Item1;
var datasetId = values.Item2;
return $"//bigquery.googleapis.com/projects/{project}/datasets/{datasetId}";
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.DataProduct;
import com.pulumi.gcp.dataplex.DataProductArgs;
import com.pulumi.gcp.dataplex.inputs.DataProductAccessGroupArgs;
import com.pulumi.gcp.dataplex.inputs.DataProductAccessGroupPrincipalArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.dataplex.DataAsset;
import com.pulumi.gcp.dataplex.DataAssetArgs;
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 example = new DataProduct("example", DataProductArgs.builder()
.project("my-project-name")
.location("us-central1")
.dataProductId("tf-test-dp-_34962")
.displayName("Parent Data Product")
.ownerEmails("gterraformtestuser@gmail.com")
.accessGroups(DataProductAccessGroupArgs.builder()
.id("analyst")
.groupId("analyst")
.displayName("Data Analyst")
.principal(DataProductAccessGroupPrincipalArgs.builder()
.googleGroup("tf-test-analysts-_74000@example.com")
.build())
.build())
.build());
var exampleDataset = new Dataset("exampleDataset", DatasetArgs.builder()
.project("my-project-name")
.datasetId("tf_test_dataset__75125")
.location("us-central1")
.build());
var exampleDataAsset = new DataAsset("exampleDataAsset", DataAssetArgs.builder()
.project("my-project-name")
.location("us-central1")
.dataProductId(example.dataProductId())
.dataAssetId("data-asset")
.resource(Output.tuple(exampleDataset.project(), exampleDataset.datasetId()).applyValue(values -> {
var project = values.t1;
var datasetId = values.t2;
return String.format("//bigquery.googleapis.com/projects/%s/datasets/%s", project,datasetId);
}))
.build());
}
}
resources:
example:
type: gcp:dataplex:DataProduct
properties:
project: my-project-name
location: us-central1
dataProductId: tf-test-dp-_34962
displayName: Parent Data Product
ownerEmails:
- gterraformtestuser@gmail.com
accessGroups:
- id: analyst
groupId: analyst
displayName: Data Analyst
principal:
googleGroup: tf-test-analysts-_74000@example.com
exampleDataset:
type: gcp:bigquery:Dataset
name: example
properties:
project: my-project-name
datasetId: tf_test_dataset__75125
location: us-central1
exampleDataAsset:
type: gcp:dataplex:DataAsset
name: example
properties:
project: my-project-name
location: us-central1
dataProductId: ${example.dataProductId}
dataAssetId: data-asset
resource: //bigquery.googleapis.com/projects/${exampleDataset.project}/datasets/${exampleDataset.datasetId}
Dataplex Data Asset Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.dataplex.DataProduct("example", {
project: "my-project-name",
location: "us-central1",
dataProductId: "tf-test-dp-_88722",
displayName: "Full Example Parent DP",
ownerEmails: ["gterraformtestuser@gmail.com"],
accessGroups: [
{
id: "analyst",
groupId: "analyst",
displayName: "Data Analyst",
principal: {
googleGroup: "dataproduct-terraform-examples@google.com",
},
},
{
id: "scientist",
groupId: "scientist",
displayName: "Data Scientist",
principal: {
googleGroup: "dataproduct-terraform-examples-2@google.com",
},
},
],
});
const exampleDataset = new gcp.bigquery.Dataset("example", {
project: "my-project-name",
datasetId: "tf_test_dataset__39249",
location: "us-central1",
});
const exampleDataAsset = new gcp.dataplex.DataAsset("example", {
project: "my-project-name",
location: "us-central1",
dataProductId: example.dataProductId,
dataAssetId: "data-asset",
resource: pulumi.interpolate`//bigquery.googleapis.com/projects/${exampleDataset.project}/datasets/${exampleDataset.datasetId}`,
labels: {
env: "prod",
critical: "true",
},
accessGroupConfigs: [
{
accessGroup: "analyst",
iamRoles: ["roles/bigquery.dataViewer"],
},
{
accessGroup: "scientist",
iamRoles: ["roles/bigquery.dataEditor"],
},
],
});
import pulumi
import pulumi_gcp as gcp
example = gcp.dataplex.DataProduct("example",
project="my-project-name",
location="us-central1",
data_product_id="tf-test-dp-_88722",
display_name="Full Example Parent DP",
owner_emails=["gterraformtestuser@gmail.com"],
access_groups=[
{
"id": "analyst",
"group_id": "analyst",
"display_name": "Data Analyst",
"principal": {
"google_group": "dataproduct-terraform-examples@google.com",
},
},
{
"id": "scientist",
"group_id": "scientist",
"display_name": "Data Scientist",
"principal": {
"google_group": "dataproduct-terraform-examples-2@google.com",
},
},
])
example_dataset = gcp.bigquery.Dataset("example",
project="my-project-name",
dataset_id="tf_test_dataset__39249",
location="us-central1")
example_data_asset = gcp.dataplex.DataAsset("example",
project="my-project-name",
location="us-central1",
data_product_id=example.data_product_id,
data_asset_id="data-asset",
resource=pulumi.Output.all(
project=example_dataset.project,
dataset_id=example_dataset.dataset_id
).apply(lambda resolved_outputs: f"//bigquery.googleapis.com/projects/{resolved_outputs['project']}/datasets/{resolved_outputs['dataset_id']}")
,
labels={
"env": "prod",
"critical": "true",
},
access_group_configs=[
{
"access_group": "analyst",
"iam_roles": ["roles/bigquery.dataViewer"],
},
{
"access_group": "scientist",
"iam_roles": ["roles/bigquery.dataEditor"],
},
])
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/dataplex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := dataplex.NewDataProduct(ctx, "example", &dataplex.DataProductArgs{
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
DataProductId: pulumi.String("tf-test-dp-_88722"),
DisplayName: pulumi.String("Full Example Parent DP"),
OwnerEmails: pulumi.StringArray{
pulumi.String("gterraformtestuser@gmail.com"),
},
AccessGroups: dataplex.DataProductAccessGroupArray{
&dataplex.DataProductAccessGroupArgs{
Id: pulumi.String("analyst"),
GroupId: pulumi.String("analyst"),
DisplayName: pulumi.String("Data Analyst"),
Principal: &dataplex.DataProductAccessGroupPrincipalArgs{
GoogleGroup: pulumi.String("dataproduct-terraform-examples@google.com"),
},
},
&dataplex.DataProductAccessGroupArgs{
Id: pulumi.String("scientist"),
GroupId: pulumi.String("scientist"),
DisplayName: pulumi.String("Data Scientist"),
Principal: &dataplex.DataProductAccessGroupPrincipalArgs{
GoogleGroup: pulumi.String("dataproduct-terraform-examples-2@google.com"),
},
},
},
})
if err != nil {
return err
}
exampleDataset, err := bigquery.NewDataset(ctx, "example", &bigquery.DatasetArgs{
Project: pulumi.String("my-project-name"),
DatasetId: pulumi.String("tf_test_dataset__39249"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
_, err = dataplex.NewDataAsset(ctx, "example", &dataplex.DataAssetArgs{
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
DataProductId: example.DataProductId,
DataAssetId: pulumi.String("data-asset"),
Resource: pulumi.All(exampleDataset.Project, exampleDataset.DatasetId).ApplyT(func(_args []interface{}) (string, error) {
project := _args[0].(string)
datasetId := _args[1].(string)
return fmt.Sprintf("//bigquery.googleapis.com/projects/%v/datasets/%v", project, datasetId), nil
}).(pulumi.StringOutput),
Labels: pulumi.StringMap{
"env": pulumi.String("prod"),
"critical": pulumi.String("true"),
},
AccessGroupConfigs: dataplex.DataAssetAccessGroupConfigArray{
&dataplex.DataAssetAccessGroupConfigArgs{
AccessGroup: pulumi.String("analyst"),
IamRoles: pulumi.StringArray{
pulumi.String("roles/bigquery.dataViewer"),
},
},
&dataplex.DataAssetAccessGroupConfigArgs{
AccessGroup: pulumi.String("scientist"),
IamRoles: pulumi.StringArray{
pulumi.String("roles/bigquery.dataEditor"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.DataPlex.DataProduct("example", new()
{
Project = "my-project-name",
Location = "us-central1",
DataProductId = "tf-test-dp-_88722",
DisplayName = "Full Example Parent DP",
OwnerEmails = new[]
{
"gterraformtestuser@gmail.com",
},
AccessGroups = new[]
{
new Gcp.DataPlex.Inputs.DataProductAccessGroupArgs
{
Id = "analyst",
GroupId = "analyst",
DisplayName = "Data Analyst",
Principal = new Gcp.DataPlex.Inputs.DataProductAccessGroupPrincipalArgs
{
GoogleGroup = "dataproduct-terraform-examples@google.com",
},
},
new Gcp.DataPlex.Inputs.DataProductAccessGroupArgs
{
Id = "scientist",
GroupId = "scientist",
DisplayName = "Data Scientist",
Principal = new Gcp.DataPlex.Inputs.DataProductAccessGroupPrincipalArgs
{
GoogleGroup = "dataproduct-terraform-examples-2@google.com",
},
},
},
});
var exampleDataset = new Gcp.BigQuery.Dataset("example", new()
{
Project = "my-project-name",
DatasetId = "tf_test_dataset__39249",
Location = "us-central1",
});
var exampleDataAsset = new Gcp.DataPlex.DataAsset("example", new()
{
Project = "my-project-name",
Location = "us-central1",
DataProductId = example.DataProductId,
DataAssetId = "data-asset",
Resource = Output.Tuple(exampleDataset.Project, exampleDataset.DatasetId).Apply(values =>
{
var project = values.Item1;
var datasetId = values.Item2;
return $"//bigquery.googleapis.com/projects/{project}/datasets/{datasetId}";
}),
Labels =
{
{ "env", "prod" },
{ "critical", "true" },
},
AccessGroupConfigs = new[]
{
new Gcp.DataPlex.Inputs.DataAssetAccessGroupConfigArgs
{
AccessGroup = "analyst",
IamRoles = new[]
{
"roles/bigquery.dataViewer",
},
},
new Gcp.DataPlex.Inputs.DataAssetAccessGroupConfigArgs
{
AccessGroup = "scientist",
IamRoles = new[]
{
"roles/bigquery.dataEditor",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.DataProduct;
import com.pulumi.gcp.dataplex.DataProductArgs;
import com.pulumi.gcp.dataplex.inputs.DataProductAccessGroupArgs;
import com.pulumi.gcp.dataplex.inputs.DataProductAccessGroupPrincipalArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.dataplex.DataAsset;
import com.pulumi.gcp.dataplex.DataAssetArgs;
import com.pulumi.gcp.dataplex.inputs.DataAssetAccessGroupConfigArgs;
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 example = new DataProduct("example", DataProductArgs.builder()
.project("my-project-name")
.location("us-central1")
.dataProductId("tf-test-dp-_88722")
.displayName("Full Example Parent DP")
.ownerEmails("gterraformtestuser@gmail.com")
.accessGroups(
DataProductAccessGroupArgs.builder()
.id("analyst")
.groupId("analyst")
.displayName("Data Analyst")
.principal(DataProductAccessGroupPrincipalArgs.builder()
.googleGroup("dataproduct-terraform-examples@google.com")
.build())
.build(),
DataProductAccessGroupArgs.builder()
.id("scientist")
.groupId("scientist")
.displayName("Data Scientist")
.principal(DataProductAccessGroupPrincipalArgs.builder()
.googleGroup("dataproduct-terraform-examples-2@google.com")
.build())
.build())
.build());
var exampleDataset = new Dataset("exampleDataset", DatasetArgs.builder()
.project("my-project-name")
.datasetId("tf_test_dataset__39249")
.location("us-central1")
.build());
var exampleDataAsset = new DataAsset("exampleDataAsset", DataAssetArgs.builder()
.project("my-project-name")
.location("us-central1")
.dataProductId(example.dataProductId())
.dataAssetId("data-asset")
.resource(Output.tuple(exampleDataset.project(), exampleDataset.datasetId()).applyValue(values -> {
var project = values.t1;
var datasetId = values.t2;
return String.format("//bigquery.googleapis.com/projects/%s/datasets/%s", project,datasetId);
}))
.labels(Map.ofEntries(
Map.entry("env", "prod"),
Map.entry("critical", "true")
))
.accessGroupConfigs(
DataAssetAccessGroupConfigArgs.builder()
.accessGroup("analyst")
.iamRoles("roles/bigquery.dataViewer")
.build(),
DataAssetAccessGroupConfigArgs.builder()
.accessGroup("scientist")
.iamRoles("roles/bigquery.dataEditor")
.build())
.build());
}
}
resources:
example:
type: gcp:dataplex:DataProduct
properties:
project: my-project-name
location: us-central1
dataProductId: tf-test-dp-_88722
displayName: Full Example Parent DP
ownerEmails:
- gterraformtestuser@gmail.com
accessGroups:
- id: analyst
groupId: analyst
displayName: Data Analyst
principal:
googleGroup: dataproduct-terraform-examples@google.com
- id: scientist
groupId: scientist
displayName: Data Scientist
principal:
googleGroup: dataproduct-terraform-examples-2@google.com
exampleDataset:
type: gcp:bigquery:Dataset
name: example
properties:
project: my-project-name
datasetId: tf_test_dataset__39249
location: us-central1
exampleDataAsset:
type: gcp:dataplex:DataAsset
name: example
properties:
project: my-project-name
location: us-central1
dataProductId: ${example.dataProductId}
dataAssetId: data-asset
resource: //bigquery.googleapis.com/projects/${exampleDataset.project}/datasets/${exampleDataset.datasetId}
labels:
env: prod
critical: 'true'
accessGroupConfigs:
- accessGroup: analyst
iamRoles:
- roles/bigquery.dataViewer
- accessGroup: scientist
iamRoles:
- roles/bigquery.dataEditor
Create DataAsset Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DataAsset(name: string, args: DataAssetArgs, opts?: CustomResourceOptions);@overload
def DataAsset(resource_name: str,
args: DataAssetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DataAsset(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_asset_id: Optional[str] = None,
data_product_id: Optional[str] = None,
location: Optional[str] = None,
resource: Optional[str] = None,
access_group_configs: Optional[Sequence[DataAssetAccessGroupConfigArgs]] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None)func NewDataAsset(ctx *Context, name string, args DataAssetArgs, opts ...ResourceOption) (*DataAsset, error)public DataAsset(string name, DataAssetArgs args, CustomResourceOptions? opts = null)
public DataAsset(String name, DataAssetArgs args)
public DataAsset(String name, DataAssetArgs args, CustomResourceOptions options)
type: gcp:dataplex:DataAsset
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DataAssetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DataAssetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DataAssetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataAssetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataAssetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dataAssetResource = new Gcp.DataPlex.DataAsset("dataAssetResource", new()
{
DataAssetId = "string",
DataProductId = "string",
Location = "string",
Resource = "string",
AccessGroupConfigs = new[]
{
new Gcp.DataPlex.Inputs.DataAssetAccessGroupConfigArgs
{
AccessGroup = "string",
IamRoles = new[]
{
"string",
},
},
},
Labels =
{
{ "string", "string" },
},
Project = "string",
});
example, err := dataplex.NewDataAsset(ctx, "dataAssetResource", &dataplex.DataAssetArgs{
DataAssetId: pulumi.String("string"),
DataProductId: pulumi.String("string"),
Location: pulumi.String("string"),
Resource: pulumi.String("string"),
AccessGroupConfigs: dataplex.DataAssetAccessGroupConfigArray{
&dataplex.DataAssetAccessGroupConfigArgs{
AccessGroup: pulumi.String("string"),
IamRoles: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
})
var dataAssetResource = new DataAsset("dataAssetResource", DataAssetArgs.builder()
.dataAssetId("string")
.dataProductId("string")
.location("string")
.resource("string")
.accessGroupConfigs(DataAssetAccessGroupConfigArgs.builder()
.accessGroup("string")
.iamRoles("string")
.build())
.labels(Map.of("string", "string"))
.project("string")
.build());
data_asset_resource = gcp.dataplex.DataAsset("dataAssetResource",
data_asset_id="string",
data_product_id="string",
location="string",
resource="string",
access_group_configs=[{
"access_group": "string",
"iam_roles": ["string"],
}],
labels={
"string": "string",
},
project="string")
const dataAssetResource = new gcp.dataplex.DataAsset("dataAssetResource", {
dataAssetId: "string",
dataProductId: "string",
location: "string",
resource: "string",
accessGroupConfigs: [{
accessGroup: "string",
iamRoles: ["string"],
}],
labels: {
string: "string",
},
project: "string",
});
type: gcp:dataplex:DataAsset
properties:
accessGroupConfigs:
- accessGroup: string
iamRoles:
- string
dataAssetId: string
dataProductId: string
labels:
string: string
location: string
project: string
resource: string
DataAsset Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DataAsset resource accepts the following input properties:
- Data
Asset stringId - The ID of the data asset.
- Data
Product stringId - The ID of the parent data product.
- Location string
- The location for the data asset.
- Resource string
- Full resource name of the cloud resource.
- Access
Group List<DataConfigs Asset Access Group Config> - Access groups configurations. Structure is documented below.
- Labels Dictionary<string, string>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Data
Asset stringId - The ID of the data asset.
- Data
Product stringId - The ID of the parent data product.
- Location string
- The location for the data asset.
- Resource string
- Full resource name of the cloud resource.
- Access
Group []DataConfigs Asset Access Group Config Args - Access groups configurations. Structure is documented below.
- Labels map[string]string
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- data
Asset StringId - The ID of the data asset.
- data
Product StringId - The ID of the parent data product.
- location String
- The location for the data asset.
- resource String
- Full resource name of the cloud resource.
- access
Group List<DataConfigs Asset Access Group Config> - Access groups configurations. Structure is documented below.
- labels Map<String,String>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- data
Asset stringId - The ID of the data asset.
- data
Product stringId - The ID of the parent data product.
- location string
- The location for the data asset.
- resource string
- Full resource name of the cloud resource.
- access
Group DataConfigs Asset Access Group Config[] - Access groups configurations. Structure is documented below.
- labels {[key: string]: string}
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- data_
asset_ strid - The ID of the data asset.
- data_
product_ strid - The ID of the parent data product.
- location str
- The location for the data asset.
- resource str
- Full resource name of the cloud resource.
- access_
group_ Sequence[Dataconfigs Asset Access Group Config Args] - Access groups configurations. Structure is documented below.
- labels Mapping[str, str]
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- data
Asset StringId - The ID of the data asset.
- data
Product StringId - The ID of the parent data product.
- location String
- The location for the data asset.
- resource String
- Full resource name of the cloud resource.
- access
Group List<Property Map>Configs - Access groups configurations. Structure is documented below.
- labels Map<String>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataAsset resource produces the following output properties:
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Uid string
- System generated unique ID.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Uid string
- System generated unique ID.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid String
- System generated unique ID.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid string
- System generated unique ID.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid str
- System generated unique ID.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid String
- System generated unique ID.
Look up Existing DataAsset Resource
Get an existing DataAsset resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DataAssetState, opts?: CustomResourceOptions): DataAsset@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_group_configs: Optional[Sequence[DataAssetAccessGroupConfigArgs]] = None,
data_asset_id: Optional[str] = None,
data_product_id: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
resource: Optional[str] = None,
uid: Optional[str] = None) -> DataAssetfunc GetDataAsset(ctx *Context, name string, id IDInput, state *DataAssetState, opts ...ResourceOption) (*DataAsset, error)public static DataAsset Get(string name, Input<string> id, DataAssetState? state, CustomResourceOptions? opts = null)public static DataAsset get(String name, Output<String> id, DataAssetState state, CustomResourceOptions options)resources: _: type: gcp:dataplex:DataAsset get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Group List<DataConfigs Asset Access Group Config> - Access groups configurations. Structure is documented below.
- Data
Asset stringId - The ID of the data asset.
- Data
Product stringId - The ID of the parent data product.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Location string
- The location for the data asset.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Resource string
- Full resource name of the cloud resource.
- Uid string
- System generated unique ID.
- Access
Group []DataConfigs Asset Access Group Config Args - Access groups configurations. Structure is documented below.
- Data
Asset stringId - The ID of the data asset.
- Data
Product stringId - The ID of the parent data product.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Location string
- The location for the data asset.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Resource string
- Full resource name of the cloud resource.
- Uid string
- System generated unique ID.
- access
Group List<DataConfigs Asset Access Group Config> - Access groups configurations. Structure is documented below.
- data
Asset StringId - The ID of the data asset.
- data
Product StringId - The ID of the parent data product.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location String
- The location for the data asset.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource String
- Full resource name of the cloud resource.
- uid String
- System generated unique ID.
- access
Group DataConfigs Asset Access Group Config[] - Access groups configurations. Structure is documented below.
- data
Asset stringId - The ID of the data asset.
- data
Product stringId - The ID of the parent data product.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location string
- The location for the data asset.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource string
- Full resource name of the cloud resource.
- uid string
- System generated unique ID.
- access_
group_ Sequence[Dataconfigs Asset Access Group Config Args] - Access groups configurations. Structure is documented below.
- data_
asset_ strid - The ID of the data asset.
- data_
product_ strid - The ID of the parent data product.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location str
- The location for the data asset.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource str
- Full resource name of the cloud resource.
- uid str
- System generated unique ID.
- access
Group List<Property Map>Configs - Access groups configurations. Structure is documented below.
- data
Asset StringId - The ID of the data asset.
- data
Product StringId - The ID of the parent data product.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
- User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location String
- The location for the data asset.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource String
- Full resource name of the cloud resource.
- uid String
- System generated unique ID.
Supporting Types
DataAssetAccessGroupConfig, DataAssetAccessGroupConfigArgs
- Access
Group string - The identifier for this object. Format specified above.
- Iam
Roles List<string> - IAM roles granted on the resource.
- Access
Group string - The identifier for this object. Format specified above.
- Iam
Roles []string - IAM roles granted on the resource.
- access
Group String - The identifier for this object. Format specified above.
- iam
Roles List<String> - IAM roles granted on the resource.
- access
Group string - The identifier for this object. Format specified above.
- iam
Roles string[] - IAM roles granted on the resource.
- access_
group str - The identifier for this object. Format specified above.
- iam_
roles Sequence[str] - IAM roles granted on the resource.
- access
Group String - The identifier for this object. Format specified above.
- iam
Roles List<String> - IAM roles granted on the resource.
Import
DataAsset can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/dataProducts/{{data_product_id}}/dataAssets/{{data_asset_id}}{{project}}/{{location}}/{{data_product_id}}/{{data_asset_id}}{{location}}/{{data_product_id}}/{{data_asset_id}}
When using the pulumi import command, DataAsset can be imported using one of the formats above. For example:
$ pulumi import gcp:dataplex/dataAsset:DataAsset default projects/{{project}}/locations/{{location}}/dataProducts/{{data_product_id}}/dataAssets/{{data_asset_id}}
$ pulumi import gcp:dataplex/dataAsset:DataAsset default {{project}}/{{location}}/{{data_product_id}}/{{data_asset_id}}
$ pulumi import gcp:dataplex/dataAsset:DataAsset default {{location}}/{{data_product_id}}/{{data_asset_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Thursday, Mar 12, 2026 by Pulumi
