The gcp:dataplex/glossaryIamBinding:GlossaryIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for Dataplex glossaries by controlling which members have specific roles. 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 glossaries and require valid member identities such as users, service accounts, groups, or federated identities. The examples are intentionally small. Combine them with your own glossary resources and identity management.
Grant a role to multiple members at once
When managing glossary access, you 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.GlossaryIamBinding("binding", {
project: glossaryTestId.project,
location: glossaryTestId.location,
glossaryId: glossaryTestId.glossaryId,
role: "roles/viewer",
members: ["user:jane@example.com"],
});
import pulumi
import pulumi_gcp as gcp
binding = gcp.dataplex.GlossaryIamBinding("binding",
project=glossary_test_id["project"],
location=glossary_test_id["location"],
glossary_id=glossary_test_id["glossaryId"],
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.NewGlossaryIamBinding(ctx, "binding", &dataplex.GlossaryIamBindingArgs{
Project: pulumi.Any(glossaryTestId.Project),
Location: pulumi.Any(glossaryTestId.Location),
GlossaryId: pulumi.Any(glossaryTestId.GlossaryId),
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.GlossaryIamBinding("binding", new()
{
Project = glossaryTestId.Project,
Location = glossaryTestId.Location,
GlossaryId = glossaryTestId.GlossaryId,
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.GlossaryIamBinding;
import com.pulumi.gcp.dataplex.GlossaryIamBindingArgs;
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 GlossaryIamBinding("binding", GlossaryIamBindingArgs.builder()
.project(glossaryTestId.project())
.location(glossaryTestId.location())
.glossaryId(glossaryTestId.glossaryId())
.role("roles/viewer")
.members("user:jane@example.com")
.build());
}
}
resources:
binding:
type: gcp:dataplex:GlossaryIamBinding
properties:
project: ${glossaryTestId.project}
location: ${glossaryTestId.location}
glossaryId: ${glossaryTestId.glossaryId}
role: roles/viewer
members:
- user:jane@example.com
The GlossaryIamBinding resource is authoritative for the specified role: it replaces all existing members for that role with the members list you provide. The role property specifies which permission set to grant (e.g., “roles/viewer”), and members lists all identities that should have that role. Each member follows GCP’s identity format: “user:email”, “serviceAccount:email”, “group:email”, or special identifiers like “allUsers”.
Add a single member to a role incrementally
When you need to grant access to one user without affecting other members of the same role, use GlossaryIamMember for non-authoritative management.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.dataplex.GlossaryIamMember("member", {
project: glossaryTestId.project,
location: glossaryTestId.location,
glossaryId: glossaryTestId.glossaryId,
role: "roles/viewer",
member: "user:jane@example.com",
});
import pulumi
import pulumi_gcp as gcp
member = gcp.dataplex.GlossaryIamMember("member",
project=glossary_test_id["project"],
location=glossary_test_id["location"],
glossary_id=glossary_test_id["glossaryId"],
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.NewGlossaryIamMember(ctx, "member", &dataplex.GlossaryIamMemberArgs{
Project: pulumi.Any(glossaryTestId.Project),
Location: pulumi.Any(glossaryTestId.Location),
GlossaryId: pulumi.Any(glossaryTestId.GlossaryId),
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.GlossaryIamMember("member", new()
{
Project = glossaryTestId.Project,
Location = glossaryTestId.Location,
GlossaryId = glossaryTestId.GlossaryId,
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.GlossaryIamMember;
import com.pulumi.gcp.dataplex.GlossaryIamMemberArgs;
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 GlossaryIamMember("member", GlossaryIamMemberArgs.builder()
.project(glossaryTestId.project())
.location(glossaryTestId.location())
.glossaryId(glossaryTestId.glossaryId())
.role("roles/viewer")
.member("user:jane@example.com")
.build());
}
}
resources:
member:
type: gcp:dataplex:GlossaryIamMember
properties:
project: ${glossaryTestId.project}
location: ${glossaryTestId.location}
glossaryId: ${glossaryTestId.glossaryId}
role: roles/viewer
member: user:jane@example.com
The GlossaryIamMember resource adds a single member to a role without replacing existing members. This is useful when multiple teams manage access independently, or when you want to grant access incrementally. The member property (singular) specifies one identity, while the role property determines which permissions that identity receives.
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 systems.
The examples reference pre-existing infrastructure such as Dataplex glossaries (glossaryId references) and GCP projects and locations. They focus on configuring IAM bindings rather than provisioning glossaries or managing identity providers.
To keep things focused, common IAM patterns are omitted, including:
- Conditional IAM bindings (condition property)
- Policy-level management (GlossaryIamPolicy resource)
- Custom role definitions
- 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 Glossary IAM Binding resource reference for all available configuration options.
Let's manage GCP Dataplex Glossary 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 Compatibility & Conflicts
gcp.dataplex.GlossaryIamPolicy cannot be used with gcp.dataplex.GlossaryIamBinding or gcp.dataplex.GlossaryIamMember as they will conflict over policy control. Use Policy alone for full control, or use Binding/Member without Policy.Resource Selection & Usage
Choose based on your needs:
- GlossaryIamPolicy: Authoritative control of the entire IAM policy (replaces existing policy)
- GlossaryIamBinding: Authoritative control of all members for a specific role (preserves other roles)
- GlossaryIamMember: Non-authoritative addition of individual members (preserves other members for the role)
GlossaryIamPolicy and GlossaryIamBinding) replace existing configurations, while non-authoritative (GlossaryIamMember) adds to existing configurations without removing other entries.Configuration & Identity Formats
Supported formats include:
allUsersandallAuthenticatedUsersfor public/authenticated accessuser:{email},serviceAccount:{email},group:{email}for specific identitiesdomain:{domain}for G Suite domainsprojectOwner/Editor/Viewer:{projectid}for project-level roles- Federated identities like
principal://iam.googleapis.com/locations/global/workforcePools/...
[projects|organizations]/{parent-name}/roles/{role-name}, for example projects/my-project/roles/my-custom-role.Import & Resource Identification
Use space-delimited identifiers:
- Binding:
resource_id role(e.g.,projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}} roles/viewer) - Member:
resource_id role member_identity(e.g., adduser:jane@example.com) - Policy:
resource_idonly
Resource ID can be shortened to {{project}}/{{location}}/{{glossary_id}}, {{location}}/{{glossary_id}}, or just {{glossary_id}}.