Manage GCP Dataplex Glossary IAM Bindings

The gcp:dataplex/glossaryIamBinding:GlossaryIamBinding resource, part of the Pulumi GCP provider, manages IAM access control for Dataplex glossaries by binding roles to members. This guide focuses on three approaches: authoritative role binding for multiple members, incremental member addition, and complete policy replacement.

Three related resources manage glossary IAM: GlossaryIamPolicy (replaces entire policy), GlossaryIamBinding (authoritative for one role), and GlossaryIamMember (non-authoritative, adds individual members). GlossaryIamPolicy cannot be used with the other two; they will conflict. The examples are intentionally small. Combine them with your own glossary references and access requirements.

Grant a role to multiple members at once

When you need to grant the same role to multiple users or service accounts, GlossaryIamBinding manages all members for that role as a single unit.

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 role property specifies which permission set to grant (e.g., “roles/viewer”). The members array lists all identities that receive this role; GlossaryIamBinding authoritatively controls this list, removing any members not included. The glossaryId, location, and project properties identify which glossary to configure.

Add a single member to a role incrementally

To grant access to one user without affecting other members of the same role, use GlossaryIamMember for non-authoritative updates.

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 member property specifies a single identity to add. Unlike GlossaryIamBinding, this resource doesn’t replace the member list; it adds one member while preserving others. You can safely use multiple GlossaryIamMember resources for the same role, or combine them with GlossaryIamBinding resources for different roles.

Replace the entire IAM policy with a new definition

When you need complete control over all IAM bindings, GlossaryIamPolicy replaces the entire policy in one operation.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    bindings: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.dataplex.GlossaryIamPolicy("policy", {
    project: glossaryTestId.project,
    location: glossaryTestId.location,
    glossaryId: glossaryTestId.glossaryId,
    policyData: admin.then(admin => admin.policyData),
});
import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(bindings=[{
    "role": "roles/viewer",
    "members": ["user:jane@example.com"],
}])
policy = gcp.dataplex.GlossaryIamPolicy("policy",
    project=glossary_test_id["project"],
    location=glossary_test_id["location"],
    glossary_id=glossary_test_id["glossaryId"],
    policy_data=admin.policy_data)
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/dataplex"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = dataplex.NewGlossaryIamPolicy(ctx, "policy", &dataplex.GlossaryIamPolicyArgs{
			Project:    pulumi.Any(glossaryTestId.Project),
			Location:   pulumi.Any(glossaryTestId.Location),
			GlossaryId: pulumi.Any(glossaryTestId.GlossaryId),
			PolicyData: pulumi.String(admin.PolicyData),
		})
		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 admin = Gcp.Organizations.GetIAMPolicy.Invoke(new()
    {
        Bindings = new[]
        {
            new Gcp.Organizations.Inputs.GetIAMPolicyBindingInputArgs
            {
                Role = "roles/viewer",
                Members = new[]
                {
                    "user:jane@example.com",
                },
            },
        },
    });

    var policy = new Gcp.DataPlex.GlossaryIamPolicy("policy", new()
    {
        Project = glossaryTestId.Project,
        Location = glossaryTestId.Location,
        GlossaryId = glossaryTestId.GlossaryId,
        PolicyData = admin.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs;
import com.pulumi.gcp.dataplex.GlossaryIamPolicy;
import com.pulumi.gcp.dataplex.GlossaryIamPolicyArgs;
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) {
        final var admin = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder()
            .bindings(GetIAMPolicyBindingArgs.builder()
                .role("roles/viewer")
                .members("user:jane@example.com")
                .build())
            .build());

        var policy = new GlossaryIamPolicy("policy", GlossaryIamPolicyArgs.builder()
            .project(glossaryTestId.project())
            .location(glossaryTestId.location())
            .glossaryId(glossaryTestId.glossaryId())
            .policyData(admin.policyData())
            .build());

    }
}
resources:
  policy:
    type: gcp:dataplex:GlossaryIamPolicy
    properties:
      project: ${glossaryTestId.project}
      location: ${glossaryTestId.location}
      glossaryId: ${glossaryTestId.glossaryId}
      policyData: ${admin.policyData}
variables:
  admin:
    fn::invoke:
      function: gcp:organizations:getIAMPolicy
      arguments:
        bindings:
          - role: roles/viewer
            members:
              - user:jane@example.com

The policyData property accepts output from getIAMPolicy, which defines all role bindings in a single structure. This resource is authoritative for the entire policy; it removes any bindings not included in policyData. GlossaryIamPolicy cannot coexist with GlossaryIamBinding or GlossaryIamMember; they will conflict over policy state.

Beyond these examples

These snippets focus on specific IAM management features: authoritative role binding, incremental member addition, and complete policy replacement. They’re intentionally minimal rather than full access control configurations.

The examples reference pre-existing infrastructure such as a Dataplex glossary (glossaryId reference) and a GCP project and location. They focus on IAM binding configuration rather than glossary provisioning.

To keep things focused, common IAM patterns are omitted, including:

  • Conditional IAM bindings (condition property)
  • Custom role definitions
  • Policy retrieval via data source
  • Combined use of Policy with Binding/Member resources

These omissions are intentional: the goal is to illustrate how each IAM resource type is wired, not provide drop-in access control modules. See the Dataplex 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 FREE

Frequently Asked Questions

Resource Selection & Compatibility
Can I use multiple IAM resources together for the same glossary?
gcp.dataplex.GlossaryIamPolicy cannot be used with gcp.dataplex.GlossaryIamBinding or gcp.dataplex.GlossaryIamMember, as they will conflict. However, gcp.dataplex.GlossaryIamBinding and gcp.dataplex.GlossaryIamMember can be used together only if they don’t manage the same role.
Which IAM resource should I use for managing Dataplex Glossary permissions?

Choose based on your needs:

  • gcp.dataplex.GlossaryIamPolicy: Authoritative control of the entire IAM policy (replaces existing policy)
  • gcp.dataplex.GlossaryIamBinding: Authoritative control of all members for a specific role (preserves other roles)
  • gcp.dataplex.GlossaryIamMember: Non-authoritative addition of individual members (preserves other members for the role)
Configuration & Syntax
What member identity formats are supported?
Supported formats include allUsers, allAuthenticatedUsers, user:{email}, serviceAccount:{email}, group:{email}, domain:{domain}, projectOwner:{projectid}, projectEditor:{projectid}, projectViewer:{projectid}, and federated identities like principal://iam.googleapis.com/....
How do I specify a custom IAM role?
Custom roles must use the format [projects|organizations]/{parent-name}/roles/{role-name}.
What formats can I use when importing a glossary IAM resource?
You can use any of these formats: projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}, {{project}}/{{location}}/{{glossary_id}}, {{location}}/{{glossary_id}}, or {{glossary_id}}. Variables not provided in the import command are taken from the provider configuration.

Using a different cloud?

Explore security guides for other cloud providers: