Manage GCP Dataplex Glossary IAM Access

The gcp:dataplex/glossaryIamMember:GlossaryIamMember resource, part of the Pulumi GCP provider, grants IAM roles to members (users, service accounts, groups) for Dataplex Glossaries. This guide focuses on three capabilities: single-member role grants, multi-member role bindings, and full policy replacement.

All three IAM resources (GlossaryIamMember, GlossaryIamBinding, GlossaryIamPolicy) reference an existing Dataplex Glossary by ID. The examples are intentionally small. Combine them with your own glossary resources and member identities.

Grant a role to a single member

Most IAM configurations start by granting a specific role to one user or service account without affecting other members who already have the same role.

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 who receives access using formats like “user:jane@example.com” or “serviceAccount:app@project.iam.gserviceaccount.com”. The role property defines what they can do. GlossaryIamMember is non-authoritative: it adds this member without removing others who have the same role.

Grant a role to multiple members at once

When multiple users or service accounts need the same role, GlossaryIamBinding manages the complete member list in one resource.

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 members property takes a list of identities. Unlike GlossaryIamMember, this resource is authoritative for the specified role: it replaces all existing members for “roles/viewer” but leaves other roles untouched. Use this when you want to define the complete member list for a role.

Replace the entire IAM policy

Organizations with strict access control sometimes need to define the complete IAM policy from scratch.

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 comes from getIAMPolicy, which structures bindings as role-to-members mappings. GlossaryIamPolicy is fully authoritative: it removes any existing IAM bindings not defined in policyData. This is the most restrictive approach; use it only when you need complete policy control. Note that GlossaryIamPolicy cannot be used alongside GlossaryIamBinding or GlossaryIamMember, as they will conflict over policy state.

Beyond these examples

These snippets focus on specific IAM management features: single-member grants, multi-member role bindings, and full policy replacement. They’re intentionally minimal rather than complete access control solutions.

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

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

  • Conditional IAM bindings (condition property)
  • Custom role definitions
  • Service account creation
  • Glossary resource provisioning

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 Member resource reference for all available configuration options.

Let's manage GCP Dataplex Glossary IAM Access

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 & Conflicts
What's the difference between GlossaryIamPolicy, GlossaryIamBinding, and GlossaryIamMember?
GlossaryIamPolicy is authoritative and replaces the entire IAM policy. GlossaryIamBinding is authoritative for a specific role, preserving other roles. GlossaryIamMember is non-authoritative and adds a single member to a role without affecting other members.
Can I use GlossaryIamPolicy with GlossaryIamBinding or GlossaryIamMember?
No, GlossaryIamPolicy cannot be used with GlossaryIamBinding or GlossaryIamMember because they will conflict over the policy state.
Can I use GlossaryIamBinding and GlossaryIamMember together?
Yes, but only if they don’t grant privileges to the same role. Using both for the same role will cause conflicts.
Identity & Role Configuration
What identity formats can I use for the member property?
You can use allUsers, allAuthenticatedUsers, user:{email}, serviceAccount:{email}, group:{email}, domain:{domain}, projectOwner/Editor/Viewer:{projectid}, and federated identities like principal://iam.googleapis.com/....
How do I specify a custom role?
Custom roles must use the format [projects|organizations]/{parent-name}/roles/{role-name}.
Resource Properties
Which properties are immutable after creation?
All input properties are immutable: glossaryId, location, project, member, role, and condition.
What happens if I don't specify project or location?
If not specified, project and location are parsed from the parent resource identifier. If still unavailable, project defaults to the provider configuration.

Using a different cloud?

Explore security guides for other cloud providers: