The gcp:dataplex/assetIamBinding:AssetIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for Dataplex assets by granting a specific role to a list of members. This guide focuses on two capabilities: authoritative role binding (managing all members for one role) and non-authoritative member addition (adding one member at a time).
IAM bindings reference existing Dataplex assets within lakes and zones. The asset, lake, zone, and project must exist before you can bind IAM roles. The examples are intentionally small. Combine them with your own Dataplex infrastructure and identity management.
Grant a role to multiple members at once
Teams managing Dataplex assets often need to grant the same role to multiple users, service accounts, or groups simultaneously.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.dataplex.AssetIamBinding("binding", {
project: example.project,
location: example.location,
lake: example.lake,
dataplexZone: example.dataplexZone,
asset: example.name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});
import pulumi
import pulumi_gcp as gcp
binding = gcp.dataplex.AssetIamBinding("binding",
project=example["project"],
location=example["location"],
lake=example["lake"],
dataplex_zone=example["dataplexZone"],
asset=example["name"],
role="roles/viewer",
members=["user:jane@example.com"])
package main
import (
"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 {
_, err := dataplex.NewAssetIamBinding(ctx, "binding", &dataplex.AssetIamBindingArgs{
Project: pulumi.Any(example.Project),
Location: pulumi.Any(example.Location),
Lake: pulumi.Any(example.Lake),
DataplexZone: pulumi.Any(example.DataplexZone),
Asset: pulumi.Any(example.Name),
Role: pulumi.String("roles/viewer"),
Members: pulumi.StringArray{
pulumi.String("user:jane@example.com"),
},
})
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 binding = new Gcp.DataPlex.AssetIamBinding("binding", new()
{
Project = example.Project,
Location = example.Location,
Lake = example.Lake,
DataplexZone = example.DataplexZone,
Asset = example.Name,
Role = "roles/viewer",
Members = new[]
{
"user:jane@example.com",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.AssetIamBinding;
import com.pulumi.gcp.dataplex.AssetIamBindingArgs;
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 binding = new AssetIamBinding("binding", AssetIamBindingArgs.builder()
.project(example.project())
.location(example.location())
.lake(example.lake())
.dataplexZone(example.dataplexZone())
.asset(example.name())
.role("roles/viewer")
.members("user:jane@example.com")
.build());
}
}
resources:
binding:
type: gcp:dataplex:AssetIamBinding
properties:
project: ${example.project}
location: ${example.location}
lake: ${example.lake}
dataplexZone: ${example.dataplexZone}
asset: ${example.name}
role: roles/viewer
members:
- user:jane@example.com
AssetIamBinding is authoritative for the specified role: it replaces the entire member list for that role. The members array accepts user accounts, service accounts, groups, and special identifiers like allUsers. The asset, dataplexZone, lake, and location properties identify which Dataplex asset receives the binding. Other roles on the same asset remain unchanged.
Add a single member to a role incrementally
When multiple teams manage access to the same asset, AssetIamMember allows each team to grant access independently without coordinating on the full member list.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.dataplex.AssetIamMember("member", {
project: example.project,
location: example.location,
lake: example.lake,
dataplexZone: example.dataplexZone,
asset: example.name,
role: "roles/viewer",
member: "user:jane@example.com",
});
import pulumi
import pulumi_gcp as gcp
member = gcp.dataplex.AssetIamMember("member",
project=example["project"],
location=example["location"],
lake=example["lake"],
dataplex_zone=example["dataplexZone"],
asset=example["name"],
role="roles/viewer",
member="user:jane@example.com")
package main
import (
"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 {
_, err := dataplex.NewAssetIamMember(ctx, "member", &dataplex.AssetIamMemberArgs{
Project: pulumi.Any(example.Project),
Location: pulumi.Any(example.Location),
Lake: pulumi.Any(example.Lake),
DataplexZone: pulumi.Any(example.DataplexZone),
Asset: pulumi.Any(example.Name),
Role: pulumi.String("roles/viewer"),
Member: pulumi.String("user:jane@example.com"),
})
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 member = new Gcp.DataPlex.AssetIamMember("member", new()
{
Project = example.Project,
Location = example.Location,
Lake = example.Lake,
DataplexZone = example.DataplexZone,
Asset = example.Name,
Role = "roles/viewer",
Member = "user:jane@example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.AssetIamMember;
import com.pulumi.gcp.dataplex.AssetIamMemberArgs;
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 member = new AssetIamMember("member", AssetIamMemberArgs.builder()
.project(example.project())
.location(example.location())
.lake(example.lake())
.dataplexZone(example.dataplexZone())
.asset(example.name())
.role("roles/viewer")
.member("user:jane@example.com")
.build());
}
}
resources:
member:
type: gcp:dataplex:AssetIamMember
properties:
project: ${example.project}
location: ${example.location}
lake: ${example.lake}
dataplexZone: ${example.dataplexZone}
asset: ${example.name}
role: roles/viewer
member: user:jane@example.com
AssetIamMember is non-authoritative: it adds one member to a role without affecting other members already granted that role. The member property accepts a single identity in the same formats as the members array. You can use multiple AssetIamMember resources for the same role, and they won’t conflict with each other. However, mixing AssetIamBinding and AssetIamMember for the same role will cause conflicts, since AssetIamBinding replaces the entire member list.
Beyond these examples
These snippets focus on specific IAM binding features: role-based access control and authoritative vs non-authoritative member management. They’re intentionally minimal rather than full access control configurations.
The examples reference pre-existing infrastructure such as Dataplex assets (within lakes and zones), and GCP project, location, lake, and zone identifiers. They focus on configuring IAM bindings rather than provisioning the Dataplex resources themselves.
To keep things focused, common IAM patterns are omitted, including:
- Conditional IAM bindings (condition property)
- Full policy replacement (AssetIamPolicy resource)
- Custom role definitions and formatting
- Federated identity configuration
These omissions are intentional: the goal is to illustrate how each IAM binding approach is wired, not provide drop-in access control modules. See the Dataplex AssetIamBinding resource reference for all available configuration options.
Let's manage GCP Dataplex Asset IAM Bindings
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Resource Selection & Compatibility
AssetIamPolicy is authoritative and replaces the entire IAM policy. AssetIamBinding is authoritative for a specific role, preserving other roles. AssetIamMember is non-authoritative, preserving other members for the same role.AssetIamPolicy with AssetIamBinding or AssetIamMember, as they will conflict. You can use AssetIamBinding and AssetIamMember together only if they don’t grant the same role.IAM Configuration
[projects|organizations]/{parent-name}/roles/{role-name}.allUsers, allAuthenticatedUsers, user:{email}, serviceAccount:{email}, group:{email}, domain:{domain}, projectOwner:projectid, projectEditor:projectid, projectViewer:projectid, and federated identities (see Principal identifiers documentation).Resource Identification
asset, dataplexZone, lake, location, project, role, and condition properties are all immutable.