Manage GCP Dataplex Zone IAM Permissions

The gcp:dataplex/zoneIamMember:ZoneIamMember resource, part of the Pulumi GCP provider, manages IAM permissions for Dataplex zones by granting roles to individual members. This guide focuses on two capabilities: authoritative policy replacement and incremental member grants.

IAM resources reference existing Dataplex zones and IAM principals. ZoneIamPolicy replaces the entire policy and cannot be combined with ZoneIamBinding or ZoneIamMember. The examples are intentionally small. Combine them with your own zone infrastructure and access requirements.

Replace the entire IAM policy for a zone

When you need complete control over zone access, you can set the entire IAM policy at once, replacing any existing permissions.

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.ZoneIamPolicy("policy", {
    project: example.project,
    location: example.location,
    lake: example.lake,
    dataplexZone: example.name,
    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.ZoneIamPolicy("policy",
    project=example["project"],
    location=example["location"],
    lake=example["lake"],
    dataplex_zone=example["name"],
    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.NewZoneIamPolicy(ctx, "policy", &dataplex.ZoneIamPolicyArgs{
			Project:      pulumi.Any(example.Project),
			Location:     pulumi.Any(example.Location),
			Lake:         pulumi.Any(example.Lake),
			DataplexZone: pulumi.Any(example.Name),
			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.ZoneIamPolicy("policy", new()
    {
        Project = example.Project,
        Location = example.Location,
        Lake = example.Lake,
        DataplexZone = example.Name,
        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.ZoneIamPolicy;
import com.pulumi.gcp.dataplex.ZoneIamPolicyArgs;
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 ZoneIamPolicy("policy", ZoneIamPolicyArgs.builder()
            .project(example.project())
            .location(example.location())
            .lake(example.lake())
            .dataplexZone(example.name())
            .policyData(admin.policyData())
            .build());

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

The ZoneIamPolicy resource sets the complete IAM policy for the zone. The policyData comes from getIAMPolicy, which defines bindings between roles and members. This approach is authoritative: it replaces any existing policy, so you cannot use it alongside ZoneIamBinding or ZoneIamMember resources.

Grant a role to a single member incrementally

Most access grants happen one member at a time, preserving existing permissions for other members with the same role.

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

const member = new gcp.dataplex.ZoneIamMember("member", {
    project: example.project,
    location: example.location,
    lake: example.lake,
    dataplexZone: example.name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});
import pulumi
import pulumi_gcp as gcp

member = gcp.dataplex.ZoneIamMember("member",
    project=example["project"],
    location=example["location"],
    lake=example["lake"],
    dataplex_zone=example["name"],
    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.NewZoneIamMember(ctx, "member", &dataplex.ZoneIamMemberArgs{
			Project:      pulumi.Any(example.Project),
			Location:     pulumi.Any(example.Location),
			Lake:         pulumi.Any(example.Lake),
			DataplexZone: pulumi.Any(example.Name),
			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.ZoneIamMember("member", new()
    {
        Project = example.Project,
        Location = example.Location,
        Lake = example.Lake,
        DataplexZone = example.Name,
        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.ZoneIamMember;
import com.pulumi.gcp.dataplex.ZoneIamMemberArgs;
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 ZoneIamMember("member", ZoneIamMemberArgs.builder()
            .project(example.project())
            .location(example.location())
            .lake(example.lake())
            .dataplexZone(example.name())
            .role("roles/viewer")
            .member("user:jane@example.com")
            .build());

    }
}
resources:
  member:
    type: gcp:dataplex:ZoneIamMember
    properties:
      project: ${example.project}
      location: ${example.location}
      lake: ${example.lake}
      dataplexZone: ${example.name}
      role: roles/viewer
      member: user:jane@example.com

The ZoneIamMember resource grants a single role to one member without affecting other members who have the same role. The member property accepts various identity formats: user emails, service accounts, groups, domains, or federated identities. This non-authoritative approach lets you manage permissions incrementally; you can combine it with ZoneIamBinding as long as they don’t grant the same role.

Beyond these examples

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

The examples reference pre-existing infrastructure such as Dataplex zones within lakes and IAM principals (users, service accounts, groups). They focus on configuring IAM permissions rather than provisioning the zones themselves.

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

  • Conditional IAM bindings (condition property)
  • ZoneIamBinding for role-level authorization
  • Custom role definitions

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

Let's manage GCP Dataplex Zone IAM Permissions

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
Can I use ZoneIamPolicy with ZoneIamBinding or ZoneIamMember?
No, gcp.dataplex.ZoneIamPolicy cannot be used together with gcp.dataplex.ZoneIamBinding or gcp.dataplex.ZoneIamMember as they will conflict over the policy configuration.
Can I use ZoneIamBinding and ZoneIamMember together?
Yes, but only if they don’t grant privileges to the same role. Using both resources for the same role will cause conflicts.
Which IAM resource should I use for managing Dataplex Zone permissions?

Choose based on your needs:

  • ZoneIamPolicy: Authoritative control, replaces the entire IAM policy
  • ZoneIamBinding: Authoritative for a specific role, manages all members for that role
  • ZoneIamMember: Non-authoritative, adds individual members without affecting others
Configuration & Identity Formats
What member identity formats are supported?

The member property supports multiple formats:

  • allUsers or allAuthenticatedUsers for broad access
  • user:{email}, serviceAccount:{email}, or group:{email} for specific identities
  • domain:{domain} for G Suite domains
  • projectOwner:projectid, projectEditor:projectid, or projectViewer:projectid for project roles
  • Federated identities like principal://iam.googleapis.com/locations/global/workforcePools/...
How do I specify custom IAM roles?
Custom roles must use the format [projects|organizations]/{parent-name}/roles/{role-name}, for example projects/my-project/roles/customRole.
Immutability & Lifecycle
What properties can't be changed after creating a ZoneIamMember?
All key properties are immutable: dataplexZone, lake, location, member, role, and project. Changing any of these requires recreating the resource.

Using a different cloud?

Explore security guides for other cloud providers: