The gcp:dataplex/entryGroupIamBinding:EntryGroupIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for Dataplex EntryGroups by granting a specific role to a list of members. This guide focuses on two capabilities: granting roles to multiple members and adding individual members incrementally.
This resource is authoritative for a given role, meaning it replaces all members for that role. It’s one of three IAM resources for EntryGroups; EntryGroupIamPolicy cannot be used alongside Binding or Member resources, as they will conflict. The examples are intentionally small. Combine them with your own EntryGroup resources and access requirements.
Grant a role to multiple members at once
Teams managing EntryGroup access often need to assign 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.EntryGroupIamBinding("binding", {
project: testEntryGroupBasic.project,
location: testEntryGroupBasic.location,
entryGroupId: testEntryGroupBasic.entryGroupId,
role: "roles/viewer",
members: ["user:jane@example.com"],
});
import pulumi
import pulumi_gcp as gcp
binding = gcp.dataplex.EntryGroupIamBinding("binding",
project=test_entry_group_basic["project"],
location=test_entry_group_basic["location"],
entry_group_id=test_entry_group_basic["entryGroupId"],
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.NewEntryGroupIamBinding(ctx, "binding", &dataplex.EntryGroupIamBindingArgs{
Project: pulumi.Any(testEntryGroupBasic.Project),
Location: pulumi.Any(testEntryGroupBasic.Location),
EntryGroupId: pulumi.Any(testEntryGroupBasic.EntryGroupId),
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.EntryGroupIamBinding("binding", new()
{
Project = testEntryGroupBasic.Project,
Location = testEntryGroupBasic.Location,
EntryGroupId = testEntryGroupBasic.EntryGroupId,
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.EntryGroupIamBinding;
import com.pulumi.gcp.dataplex.EntryGroupIamBindingArgs;
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 EntryGroupIamBinding("binding", EntryGroupIamBindingArgs.builder()
.project(testEntryGroupBasic.project())
.location(testEntryGroupBasic.location())
.entryGroupId(testEntryGroupBasic.entryGroupId())
.role("roles/viewer")
.members("user:jane@example.com")
.build());
}
}
resources:
binding:
type: gcp:dataplex:EntryGroupIamBinding
properties:
project: ${testEntryGroupBasic.project}
location: ${testEntryGroupBasic.location}
entryGroupId: ${testEntryGroupBasic.entryGroupId}
role: roles/viewer
members:
- user:jane@example.com
The role property specifies which IAM role to grant (e.g., “roles/viewer”). The members array lists all identities that receive this role; each entry uses a specific format like “user:jane@example.com” for individual users or “serviceAccount:app@project.iam.gserviceaccount.com” for service accounts. This binding is authoritative: it replaces any existing members for this role on the EntryGroup.
Add a single member to a role incrementally
When onboarding individual users or service accounts, you can add them one at a time without affecting other members who already have access.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.dataplex.EntryGroupIamMember("member", {
project: testEntryGroupBasic.project,
location: testEntryGroupBasic.location,
entryGroupId: testEntryGroupBasic.entryGroupId,
role: "roles/viewer",
member: "user:jane@example.com",
});
import pulumi
import pulumi_gcp as gcp
member = gcp.dataplex.EntryGroupIamMember("member",
project=test_entry_group_basic["project"],
location=test_entry_group_basic["location"],
entry_group_id=test_entry_group_basic["entryGroupId"],
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.NewEntryGroupIamMember(ctx, "member", &dataplex.EntryGroupIamMemberArgs{
Project: pulumi.Any(testEntryGroupBasic.Project),
Location: pulumi.Any(testEntryGroupBasic.Location),
EntryGroupId: pulumi.Any(testEntryGroupBasic.EntryGroupId),
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.EntryGroupIamMember("member", new()
{
Project = testEntryGroupBasic.Project,
Location = testEntryGroupBasic.Location,
EntryGroupId = testEntryGroupBasic.EntryGroupId,
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.EntryGroupIamMember;
import com.pulumi.gcp.dataplex.EntryGroupIamMemberArgs;
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 EntryGroupIamMember("member", EntryGroupIamMemberArgs.builder()
.project(testEntryGroupBasic.project())
.location(testEntryGroupBasic.location())
.entryGroupId(testEntryGroupBasic.entryGroupId())
.role("roles/viewer")
.member("user:jane@example.com")
.build());
}
}
resources:
member:
type: gcp:dataplex:EntryGroupIamMember
properties:
project: ${testEntryGroupBasic.project}
location: ${testEntryGroupBasic.location}
entryGroupId: ${testEntryGroupBasic.entryGroupId}
role: roles/viewer
member: user:jane@example.com
The member property (singular) specifies one identity to add to the role. Unlike EntryGroupIamBinding, this resource is non-authoritative: it preserves other members already assigned to the role. Use this when you need to grant access incrementally without managing the complete member list.
Beyond these examples
These snippets focus on specific IAM binding features: role-based access control and bulk and incremental member assignment. They’re intentionally minimal rather than full access management solutions.
The examples reference pre-existing infrastructure such as Dataplex EntryGroup resources and a GCP project with Dataplex API enabled. They focus on configuring IAM bindings rather than provisioning EntryGroups themselves.
To keep things focused, common IAM patterns are omitted, including:
- Conditional IAM bindings (condition property)
- Policy-level management (EntryGroupIamPolicy resource)
- Custom role definitions
- Federated identity configuration details
These omissions are intentional: the goal is to illustrate how IAM bindings are wired, not provide drop-in access control modules. See the EntryGroupIamBinding resource reference for all available configuration options.
Let's manage GCP Dataplex Entry Group 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
EntryGroupIamPolicy cannot be used with EntryGroupIamBinding or EntryGroupIamMember because they will fight over the policy. Use either EntryGroupIamPolicy alone (authoritative) or use EntryGroupIamBinding/EntryGroupIamMember together.Resource Selection
EntryGroupIamPolicy is authoritative and replaces the entire IAM policy. EntryGroupIamBinding is authoritative for a specific role, preserving other roles. EntryGroupIamMember is non-authoritative, adding a single member while preserving other members for that role.Configuration & Syntax
members property accepts: allUsers, allAuthenticatedUsers, user:{email}, serviceAccount:{email}, group:{email}, domain:{domain}, projectOwner:projectid, projectEditor:projectid, projectViewer:projectid, and federated identities like principal://iam.googleapis.com/....[projects|organizations]/{parent-name}/roles/{role-name}, for example projects/my-project/roles/my-custom-role.Import & Management
EntryGroupIamMember requires space-delimited “resource role member”, EntryGroupIamBinding requires “resource role”, and EntryGroupIamPolicy requires just the resource identifier. Custom roles need their full name during import.