The gcp:dataplex/entryTypeIamBinding:EntryTypeIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for Dataplex EntryType resources. It controls which members can access specific EntryTypes by granting roles to lists of users, service accounts, or groups. This guide focuses on two capabilities: granting roles to multiple members and adding individual members to roles.
IAM bindings reference existing EntryType resources and require project, location, and entryTypeId identifiers. The examples are intentionally small. Combine them with your own EntryType resources and access control requirements.
Grant a role to multiple members at once
Teams managing EntryType access often grant the same role to multiple users or service accounts simultaneously, such as giving viewer access to an entire team.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.dataplex.EntryTypeIamBinding("binding", {
project: testEntryTypeBasic.project,
location: testEntryTypeBasic.location,
entryTypeId: testEntryTypeBasic.entryTypeId,
role: "roles/viewer",
members: ["user:jane@example.com"],
});
import pulumi
import pulumi_gcp as gcp
binding = gcp.dataplex.EntryTypeIamBinding("binding",
project=test_entry_type_basic["project"],
location=test_entry_type_basic["location"],
entry_type_id=test_entry_type_basic["entryTypeId"],
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.NewEntryTypeIamBinding(ctx, "binding", &dataplex.EntryTypeIamBindingArgs{
Project: pulumi.Any(testEntryTypeBasic.Project),
Location: pulumi.Any(testEntryTypeBasic.Location),
EntryTypeId: pulumi.Any(testEntryTypeBasic.EntryTypeId),
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.EntryTypeIamBinding("binding", new()
{
Project = testEntryTypeBasic.Project,
Location = testEntryTypeBasic.Location,
EntryTypeId = testEntryTypeBasic.EntryTypeId,
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.EntryTypeIamBinding;
import com.pulumi.gcp.dataplex.EntryTypeIamBindingArgs;
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 EntryTypeIamBinding("binding", EntryTypeIamBindingArgs.builder()
.project(testEntryTypeBasic.project())
.location(testEntryTypeBasic.location())
.entryTypeId(testEntryTypeBasic.entryTypeId())
.role("roles/viewer")
.members("user:jane@example.com")
.build());
}
}
resources:
binding:
type: gcp:dataplex:EntryTypeIamBinding
properties:
project: ${testEntryTypeBasic.project}
location: ${testEntryTypeBasic.location}
entryTypeId: ${testEntryTypeBasic.entryTypeId}
role: roles/viewer
members:
- user:jane@example.com
The EntryTypeIamBinding resource is authoritative for the specified role: it replaces the entire member list for that role while preserving other roles on the EntryType. The members array accepts various identity formats including user emails, service accounts, groups, and domains. The role property specifies which permission set to grant, and entryTypeId, location, and project identify the target EntryType.
Add a single member to a role incrementally
When onboarding individual users or service accounts, teams add them one at a time without affecting existing role assignments.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.dataplex.EntryTypeIamMember("member", {
project: testEntryTypeBasic.project,
location: testEntryTypeBasic.location,
entryTypeId: testEntryTypeBasic.entryTypeId,
role: "roles/viewer",
member: "user:jane@example.com",
});
import pulumi
import pulumi_gcp as gcp
member = gcp.dataplex.EntryTypeIamMember("member",
project=test_entry_type_basic["project"],
location=test_entry_type_basic["location"],
entry_type_id=test_entry_type_basic["entryTypeId"],
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.NewEntryTypeIamMember(ctx, "member", &dataplex.EntryTypeIamMemberArgs{
Project: pulumi.Any(testEntryTypeBasic.Project),
Location: pulumi.Any(testEntryTypeBasic.Location),
EntryTypeId: pulumi.Any(testEntryTypeBasic.EntryTypeId),
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.EntryTypeIamMember("member", new()
{
Project = testEntryTypeBasic.Project,
Location = testEntryTypeBasic.Location,
EntryTypeId = testEntryTypeBasic.EntryTypeId,
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.EntryTypeIamMember;
import com.pulumi.gcp.dataplex.EntryTypeIamMemberArgs;
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 EntryTypeIamMember("member", EntryTypeIamMemberArgs.builder()
.project(testEntryTypeBasic.project())
.location(testEntryTypeBasic.location())
.entryTypeId(testEntryTypeBasic.entryTypeId())
.role("roles/viewer")
.member("user:jane@example.com")
.build());
}
}
resources:
member:
type: gcp:dataplex:EntryTypeIamMember
properties:
project: ${testEntryTypeBasic.project}
location: ${testEntryTypeBasic.location}
entryTypeId: ${testEntryTypeBasic.entryTypeId}
role: roles/viewer
member: user:jane@example.com
The EntryTypeIamMember resource adds a single member to a role non-authoritatively: other members with the same role remain unchanged. Use member (singular) instead of members (plural) to specify one identity. This approach works well for incremental access grants where you don’t want to manage the complete member list.
Beyond these examples
These snippets focus on specific IAM binding features: role-based access control and member and binding management. They’re intentionally minimal rather than full access control policies.
The examples reference pre-existing infrastructure such as Dataplex EntryType resources and a Google Cloud project with Dataplex enabled. They focus on configuring IAM bindings rather than provisioning EntryTypes themselves.
To keep things focused, common IAM patterns are omitted, including:
- Conditional IAM bindings (condition property)
- Policy-level management (EntryTypeIamPolicy resource)
- Custom role definitions
- Federated identity configuration details
These omissions are intentional: the goal is to illustrate how IAM bindings are wired to EntryTypes, not provide drop-in access control modules. See the EntryTypeIamBinding resource reference for all available configuration options.
Let's manage GCP Dataplex Entry Type 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 Conflicts & Compatibility
EntryTypeIamPolicy cannot be used with EntryTypeIamBinding or EntryTypeIamMember because they manage the same policy in conflicting ways. Choose one approach: use EntryTypeIamPolicy for full policy control, or use EntryTypeIamBinding/EntryTypeIamMember for granular role management.EntryTypeIamBinding or EntryTypeIamMember resources, not both.Resource Selection & Usage
EntryTypeIamPolicy is authoritative and replaces the entire IAM policy. EntryTypeIamBinding is authoritative for a single role, managing all members for that role while preserving other roles. EntryTypeIamMember is non-authoritative, adding individual members without affecting other members for the same role.EntryTypeIamBinding with the members array containing all users, service accounts, or groups that need the role.EntryTypeIamMember with a single member value. This preserves other members already assigned to that role.Custom Roles & Formatting
[projects|organizations]/{parent-name}/roles/{role-name}, for example projects/my-project/roles/customRole or organizations/my-org/roles/customRole.