Manage GCP GKE Backup Plan IAM Bindings

The gcp:gkebackup/backupPlanIamBinding:BackupPlanIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for GKE backup plans 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 to roles.

This resource references existing backup plans and requires project and location identifiers. The examples are intentionally small. Combine them with your own backup plan infrastructure and identity management.

Grant a role to multiple members

Teams managing GKE backup plans often need to grant the same role to multiple users, service accounts, or groups.

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

const binding = new gcp.gkebackup.BackupPlanIamBinding("binding", {
    project: basic.project,
    location: basic.location,
    name: basic.name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});
import pulumi
import pulumi_gcp as gcp

binding = gcp.gkebackup.BackupPlanIamBinding("binding",
    project=basic["project"],
    location=basic["location"],
    name=basic["name"],
    role="roles/viewer",
    members=["user:jane@example.com"])
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gkebackup.NewBackupPlanIamBinding(ctx, "binding", &gkebackup.BackupPlanIamBindingArgs{
			Project:  pulumi.Any(basic.Project),
			Location: pulumi.Any(basic.Location),
			Name:     pulumi.Any(basic.Name),
			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.GkeBackup.BackupPlanIamBinding("binding", new()
    {
        Project = basic.Project,
        Location = basic.Location,
        Name = basic.Name,
        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.gkebackup.BackupPlanIamBinding;
import com.pulumi.gcp.gkebackup.BackupPlanIamBindingArgs;
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 BackupPlanIamBinding("binding", BackupPlanIamBindingArgs.builder()
            .project(basic.project())
            .location(basic.location())
            .name(basic.name())
            .role("roles/viewer")
            .members("user:jane@example.com")
            .build());

    }
}
resources:
  binding:
    type: gcp:gkebackup:BackupPlanIamBinding
    properties:
      project: ${basic.project}
      location: ${basic.location}
      name: ${basic.name}
      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. BackupPlanIamBinding is authoritative for the specified role: it replaces all members for that role while preserving other roles on the backup plan. The name, location, and project properties identify which backup plan to modify.

Add a single member to a role

When you need to grant access to one additional user without affecting existing members, BackupPlanIamMember works non-authoritatively.

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

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

member = gcp.gkebackup.BackupPlanIamMember("member",
    project=basic["project"],
    location=basic["location"],
    name=basic["name"],
    role="roles/viewer",
    member="user:jane@example.com")
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gkebackup.NewBackupPlanIamMember(ctx, "member", &gkebackup.BackupPlanIamMemberArgs{
			Project:  pulumi.Any(basic.Project),
			Location: pulumi.Any(basic.Location),
			Name:     pulumi.Any(basic.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.GkeBackup.BackupPlanIamMember("member", new()
    {
        Project = basic.Project,
        Location = basic.Location,
        Name = basic.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.gkebackup.BackupPlanIamMember;
import com.pulumi.gcp.gkebackup.BackupPlanIamMemberArgs;
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 BackupPlanIamMember("member", BackupPlanIamMemberArgs.builder()
            .project(basic.project())
            .location(basic.location())
            .name(basic.name())
            .role("roles/viewer")
            .member("user:jane@example.com")
            .build());

    }
}
resources:
  member:
    type: gcp:gkebackup:BackupPlanIamMember
    properties:
      project: ${basic.project}
      location: ${basic.location}
      name: ${basic.name}
      role: roles/viewer
      member: user:jane@example.com

The member property (singular) specifies one identity to add. Unlike BackupPlanIamBinding, this resource doesn’t replace existing members for the role. You can use multiple BackupPlanIamMember resources for the same role, or combine them with BackupPlanIamBinding resources for different roles.

Beyond these examples

These snippets focus on specific IAM binding features: role-based access control and member management (binding vs member resources). They’re intentionally minimal rather than full access control configurations.

The examples reference pre-existing infrastructure such as GKE backup plans and Google Cloud projects and locations. They focus on configuring IAM bindings rather than provisioning backup plans themselves.

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

  • Conditional IAM bindings (condition property)
  • Policy-level management (BackupPlanIamPolicy)
  • Custom role definitions
  • Federated identity configuration

These omissions are intentional: the goal is to illustrate how each IAM binding feature is wired, not provide drop-in access control modules. See the BackupPlanIamBinding resource reference for all available configuration options.

Let's manage GCP GKE Backup Plan 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 & Conflicts
Why am I getting IAM policy conflicts with my backup plan?
BackupPlanIamPolicy cannot be used with BackupPlanIamBinding or BackupPlanIamMember because they will conflict over the policy. Use either IamPolicy alone (authoritative) or use IamBinding/IamMember together (non-authoritative).
Can I use BackupPlanIamBinding and BackupPlanIamMember together?
Yes, but only if they grant different roles. Using both for the same role will cause conflicts.
What's the difference between IamPolicy, IamBinding, and IamMember?
BackupPlanIamPolicy is authoritative and replaces the entire IAM policy. BackupPlanIamBinding is authoritative for a specific role but preserves other roles. BackupPlanIamMember is non-authoritative and adds a single member without affecting other members for that role.
IAM Configuration
How do I specify a custom IAM role?
Custom roles must use the format [projects|organizations]/{parent-name}/roles/{role-name}. For example, projects/my-project/roles/my-custom-role or organizations/my-org/roles/my-custom-role.
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/....
Import & Migration
How do I import an existing backup plan IAM binding?
Use space-delimited identifiers with the resource path and role: pulumi import gcp:gkebackup/backupPlanIamBinding:BackupPlanIamBinding editor "projects/{{project}}/locations/{{location}}/backupPlans/{{backup_plan}} roles/viewer". For custom roles, use the full role name format.

Using a different cloud?

Explore security guides for other cloud providers: