Manage GCP Runtime Config IAM Bindings

The gcp:runtimeconfig/configIamBinding:ConfigIamBinding resource, part of the Pulumi GCP provider, manages IAM role bindings for Runtime Configurator configs. This guide focuses on two capabilities: authoritative role grants to multiple members and non-authoritative single-member additions.

IAM bindings reference existing Runtime Configurator configs and require appropriate permissions in your GCP project. The examples are intentionally small. Combine them with your own config resources and identity management.

Grant a role to multiple members

Teams managing Runtime Configurator access often grant the same role to multiple users or service accounts at once, such as giving viewer access to an operations team.

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

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

binding = gcp.runtimeconfig.ConfigIamBinding("binding",
    project=config["project"],
    config=config["name"],
    role="roles/viewer",
    members=["user:jane@example.com"])
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := runtimeconfig.NewConfigIamBinding(ctx, "binding", &runtimeconfig.ConfigIamBindingArgs{
			Project: pulumi.Any(config.Project),
			Config:  pulumi.Any(config.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.RuntimeConfig.ConfigIamBinding("binding", new()
    {
        Project = config.Project,
        Config = config.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.runtimeconfig.ConfigIamBinding;
import com.pulumi.gcp.runtimeconfig.ConfigIamBindingArgs;
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 ConfigIamBinding("binding", ConfigIamBindingArgs.builder()
            .project(config.project())
            .config(config.name())
            .role("roles/viewer")
            .members("user:jane@example.com")
            .build());

    }
}
resources:
  binding:
    type: gcp:runtimeconfig:ConfigIamBinding
    properties:
      project: ${config.project}
      config: ${config.name}
      role: roles/viewer
      members:
        - user:jane@example.com

The binding resource is authoritative for the specified role: it replaces all members for that role on the config. The members array accepts various identity formats including user emails, service accounts, groups, and special identifiers like allUsers. The role property specifies which permission set to grant, and config identifies the Runtime Configurator resource.

Add a single member to a role

When onboarding individual users or granting access to specific service accounts, use non-authoritative member grants that preserve existing role assignments.

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

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

member = gcp.runtimeconfig.ConfigIamMember("member",
    project=config["project"],
    config=config["name"],
    role="roles/viewer",
    member="user:jane@example.com")
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := runtimeconfig.NewConfigIamMember(ctx, "member", &runtimeconfig.ConfigIamMemberArgs{
			Project: pulumi.Any(config.Project),
			Config:  pulumi.Any(config.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.RuntimeConfig.ConfigIamMember("member", new()
    {
        Project = config.Project,
        Config = config.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.runtimeconfig.ConfigIamMember;
import com.pulumi.gcp.runtimeconfig.ConfigIamMemberArgs;
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 ConfigIamMember("member", ConfigIamMemberArgs.builder()
            .project(config.project())
            .config(config.name())
            .role("roles/viewer")
            .member("user:jane@example.com")
            .build());

    }
}
resources:
  member:
    type: gcp:runtimeconfig:ConfigIamMember
    properties:
      project: ${config.project}
      config: ${config.name}
      role: roles/viewer
      member: user:jane@example.com

ConfigIamMember adds a single identity to a role without affecting other members already assigned to that role. This is non-authoritative: multiple ConfigIamMember resources can target the same role, and each adds its member to the list. Use this when you need incremental grants or when multiple teams manage access independently.

Beyond these examples

These snippets focus on specific IAM binding features: role-based access control and authoritative vs non-authoritative grants. They’re intentionally minimal rather than full access management solutions.

The examples reference pre-existing infrastructure such as Runtime Configurator configs and a GCP project with appropriate permissions. They focus on configuring IAM bindings rather than provisioning the underlying configs.

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

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

These omissions are intentional: the goal is to illustrate how IAM bindings are wired, not provide drop-in access control modules. See the Runtime Config IAM Binding resource reference for all available configuration options.

Let's manage GCP Runtime Config 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 Conflicts & Compatibility
Can I use ConfigIamPolicy together with ConfigIamBinding or ConfigIamMember?
No, gcp.runtimeconfig.ConfigIamPolicy cannot be used with gcp.runtimeconfig.ConfigIamBinding or gcp.runtimeconfig.ConfigIamMember because they will conflict over the IAM policy. Choose one approach: either use ConfigIamPolicy (authoritative) or use ConfigIamBinding/ConfigIamMember (non-authoritative).
Can I use ConfigIamBinding and ConfigIamMember together?
Yes, but only if they don’t grant privileges to the same role. gcp.runtimeconfig.ConfigIamBinding and gcp.runtimeconfig.ConfigIamMember can coexist as long as they manage different roles.
Resource Selection & Configuration
Which IAM resource should I use for managing Runtime Config permissions?

Choose based on your needs:

  • gcp.runtimeconfig.ConfigIamPolicy: Authoritative, replaces the entire IAM policy
  • gcp.runtimeconfig.ConfigIamBinding: Authoritative for a specific role, preserves other roles
  • gcp.runtimeconfig.ConfigIamMember: Non-authoritative, adds a single member to a role while preserving other members
What member identity formats are supported?
The members property supports multiple formats: 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 custom roles?
Custom roles must use the full path 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.
Immutability & Constraints
What properties can't I change after creating a ConfigIamBinding?
The config, project, role, and condition properties are immutable and cannot be changed after creation. You must recreate the resource to modify these values.
Can I have multiple ConfigIamBinding resources for the same role?
No, only one gcp.runtimeconfig.ConfigIamBinding can be used per role. If you need to manage multiple members for the same role, include them all in the members list of a single binding, or use gcp.runtimeconfig.ConfigIamMember instead.

Using a different cloud?

Explore security guides for other cloud providers: