1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. folder
  5. IAMMember
Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi

gcp.folder.IAMMember

Explore with Pulumi AI

Four different resources help you manage your IAM policy for a folder. Each of these resources serves a different use case:

  • gcp.folder.IAMPolicy: Authoritative. Sets the IAM policy for the folder and replaces any existing policy already attached.
  • gcp.folder.IAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the folder are preserved.
  • gcp.folder.IAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the folder are preserved.
  • gcp.folder.IamAuditConfig: Authoritative for a given service. Updates the IAM policy to enable audit logging for the given service.

Note: gcp.folder.IAMPolicy cannot be used in conjunction with gcp.folder.IAMBinding, gcp.folder.IAMMember, or gcp.folder.IamAuditConfig or they will fight over what your policy should be.

Note: gcp.folder.IAMBinding resources can be used in conjunction with gcp.folder.IAMMember resources only if they do not grant privilege to the same role.

Note: The underlying API method projects.setIamPolicy has constraints which are documented here. In addition to these constraints, IAM Conditions cannot be used with Basic Roles such as Owner. Violating these constraints will result in the API returning a 400 error code so please review these if you encounter errors with this resource.

gcp.folder.IAMPolicy

!> Be careful! You can accidentally lock yourself out of your folder using this resource. Deleting a gcp.folder.IAMPolicy removes access from anyone without permissions on its parent folder/organization. Proceed with caution. It’s not recommended to use gcp.folder.IAMPolicy with your provider folder to avoid locking yourself out, and it should generally only be used with folders fully managed by this provider. If you do use this resource, it is recommended to import the policy before applying the change.

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

const admin = gcp.organizations.getIAMPolicy({
    bindings: [{
        role: "roles/editor",
        members: ["user:jane@example.com"],
    }],
});
const folder = new gcp.folder.IAMPolicy("folder", {
    folder: "folders/1234567",
    policyData: admin.then(admin => admin.policyData),
});
Copy
import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(bindings=[{
    "role": "roles/editor",
    "members": ["user:jane@example.com"],
}])
folder = gcp.folder.IAMPolicy("folder",
    folder="folders/1234567",
    policy_data=admin.policy_data)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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/editor",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
			Folder:     pulumi.String("folders/1234567"),
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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/editor",
                Members = new[]
                {
                    "user:jane@example.com",
                },
            },
        },
    });

    var folder = new Gcp.Folder.IAMPolicy("folder", new()
    {
        Folder = "folders/1234567",
        PolicyData = admin.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
    });

});
Copy
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.folder.IAMPolicy;
import com.pulumi.gcp.folder.IAMPolicyArgs;
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/editor")
                .members("user:jane@example.com")
                .build())
            .build());

        var folder = new IAMPolicy("folder", IAMPolicyArgs.builder()
            .folder("folders/1234567")
            .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData()))
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMPolicy
    properties:
      folder: folders/1234567
      policyData: ${admin.policyData}
variables:
  admin:
    fn::invoke:
      function: gcp:organizations:getIAMPolicy
      arguments:
        bindings:
          - role: roles/editor
            members:
              - user:jane@example.com
Copy

With IAM Conditions:

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

const admin = gcp.organizations.getIAMPolicy({
    bindings: [{
        role: "roles/compute.admin",
        members: ["user:jane@example.com"],
        condition: {
            title: "expires_after_2019_12_31",
            description: "Expiring at midnight of 2019-12-31",
            expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    }],
});
const folder = new gcp.folder.IAMPolicy("folder", {
    folder: "folders/1234567",
    policyData: admin.then(admin => admin.policyData),
});
Copy
import pulumi
import pulumi_gcp as gcp

admin = gcp.organizations.get_iam_policy(bindings=[{
    "role": "roles/compute.admin",
    "members": ["user:jane@example.com"],
    "condition": {
        "title": "expires_after_2019_12_31",
        "description": "Expiring at midnight of 2019-12-31",
        "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    },
}])
folder = gcp.folder.IAMPolicy("folder",
    folder="folders/1234567",
    policy_data=admin.policy_data)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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/compute.admin",
					Members: []string{
						"user:jane@example.com",
					},
					Condition: {
						Title:       "expires_after_2019_12_31",
						Description: pulumi.StringRef("Expiring at midnight of 2019-12-31"),
						Expression:  "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
			Folder:     pulumi.String("folders/1234567"),
			PolicyData: pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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/compute.admin",
                Members = new[]
                {
                    "user:jane@example.com",
                },
                Condition = new Gcp.Organizations.Inputs.GetIAMPolicyBindingConditionInputArgs
                {
                    Title = "expires_after_2019_12_31",
                    Description = "Expiring at midnight of 2019-12-31",
                    Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
                },
            },
        },
    });

    var folder = new Gcp.Folder.IAMPolicy("folder", new()
    {
        Folder = "folders/1234567",
        PolicyData = admin.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
    });

});
Copy
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.folder.IAMPolicy;
import com.pulumi.gcp.folder.IAMPolicyArgs;
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/compute.admin")
                .members("user:jane@example.com")
                .condition(GetIAMPolicyBindingConditionArgs.builder()
                    .title("expires_after_2019_12_31")
                    .description("Expiring at midnight of 2019-12-31")
                    .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
                    .build())
                .build())
            .build());

        var folder = new IAMPolicy("folder", IAMPolicyArgs.builder()
            .folder("folders/1234567")
            .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData()))
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMPolicy
    properties:
      folder: folders/1234567
      policyData: ${admin.policyData}
variables:
  admin:
    fn::invoke:
      function: gcp:organizations:getIAMPolicy
      arguments:
        bindings:
          - role: roles/compute.admin
            members:
              - user:jane@example.com
            condition:
              title: expires_after_2019_12_31
              description: Expiring at midnight of 2019-12-31
              expression: request.time < timestamp("2020-01-01T00:00:00Z")
Copy

gcp.folder.IAMBinding

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

const folder = new gcp.folder.IAMBinding("folder", {
    folder: "folders/1234567",
    role: "roles/editor",
    members: ["user:jane@example.com"],
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMBinding("folder",
    folder="folders/1234567",
    role="roles/editor",
    members=["user:jane@example.com"])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/editor"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMBinding("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/editor",
        Members = new[]
        {
            "user:jane@example.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMBinding;
import com.pulumi.gcp.folder.IAMBindingArgs;
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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
            .folder("folders/1234567")
            .role("roles/editor")
            .members("user:jane@example.com")
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMBinding
    properties:
      folder: folders/1234567
      role: roles/editor
      members:
        - user:jane@example.com
Copy

With IAM Conditions:

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

const folder = new gcp.folder.IAMBinding("folder", {
    folder: "folders/1234567",
    role: "roles/container.admin",
    members: ["user:jane@example.com"],
    condition: {
        title: "expires_after_2019_12_31",
        description: "Expiring at midnight of 2019-12-31",
        expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMBinding("folder",
    folder="folders/1234567",
    role="roles/container.admin",
    members=["user:jane@example.com"],
    condition={
        "title": "expires_after_2019_12_31",
        "description": "Expiring at midnight of 2019-12-31",
        "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/container.admin"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
			Condition: &folder.IAMBindingConditionArgs{
				Title:       pulumi.String("expires_after_2019_12_31"),
				Description: pulumi.String("Expiring at midnight of 2019-12-31"),
				Expression:  pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMBinding("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/container.admin",
        Members = new[]
        {
            "user:jane@example.com",
        },
        Condition = new Gcp.Folder.Inputs.IAMBindingConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMBinding;
import com.pulumi.gcp.folder.IAMBindingArgs;
import com.pulumi.gcp.folder.inputs.IAMBindingConditionArgs;
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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
            .folder("folders/1234567")
            .role("roles/container.admin")
            .members("user:jane@example.com")
            .condition(IAMBindingConditionArgs.builder()
                .title("expires_after_2019_12_31")
                .description("Expiring at midnight of 2019-12-31")
                .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
                .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMBinding
    properties:
      folder: folders/1234567
      role: roles/container.admin
      members:
        - user:jane@example.com
      condition:
        title: expires_after_2019_12_31
        description: Expiring at midnight of 2019-12-31
        expression: request.time < timestamp("2020-01-01T00:00:00Z")
Copy

gcp.folder.IAMMember

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

const folder = new gcp.folder.IAMMember("folder", {
    folder: "folders/1234567",
    role: "roles/editor",
    member: "user:jane@example.com",
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMMember("folder",
    folder="folders/1234567",
    role="roles/editor",
    member="user:jane@example.com")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/editor"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMMember("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/editor",
        Member = "user:jane@example.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMMember;
import com.pulumi.gcp.folder.IAMMemberArgs;
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 folder = new IAMMember("folder", IAMMemberArgs.builder()
            .folder("folders/1234567")
            .role("roles/editor")
            .member("user:jane@example.com")
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMMember
    properties:
      folder: folders/1234567
      role: roles/editor
      member: user:jane@example.com
Copy

With IAM Conditions:

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

const folder = new gcp.folder.IAMMember("folder", {
    folder: "folders/1234567",
    role: "roles/firebase.admin",
    member: "user:jane@example.com",
    condition: {
        title: "expires_after_2019_12_31",
        description: "Expiring at midnight of 2019-12-31",
        expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMMember("folder",
    folder="folders/1234567",
    role="roles/firebase.admin",
    member="user:jane@example.com",
    condition={
        "title": "expires_after_2019_12_31",
        "description": "Expiring at midnight of 2019-12-31",
        "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/firebase.admin"),
			Member: pulumi.String("user:jane@example.com"),
			Condition: &folder.IAMMemberConditionArgs{
				Title:       pulumi.String("expires_after_2019_12_31"),
				Description: pulumi.String("Expiring at midnight of 2019-12-31"),
				Expression:  pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMMember("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/firebase.admin",
        Member = "user:jane@example.com",
        Condition = new Gcp.Folder.Inputs.IAMMemberConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMMember;
import com.pulumi.gcp.folder.IAMMemberArgs;
import com.pulumi.gcp.folder.inputs.IAMMemberConditionArgs;
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 folder = new IAMMember("folder", IAMMemberArgs.builder()
            .folder("folders/1234567")
            .role("roles/firebase.admin")
            .member("user:jane@example.com")
            .condition(IAMMemberConditionArgs.builder()
                .title("expires_after_2019_12_31")
                .description("Expiring at midnight of 2019-12-31")
                .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
                .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMMember
    properties:
      folder: folders/1234567
      role: roles/firebase.admin
      member: user:jane@example.com
      condition:
        title: expires_after_2019_12_31
        description: Expiring at midnight of 2019-12-31
        expression: request.time < timestamp("2020-01-01T00:00:00Z")
Copy

gcp.folder.IamAuditConfig

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

const folder = new gcp.folder.IamAuditConfig("folder", {
    folder: "folders/1234567",
    service: "allServices",
    auditLogConfigs: [
        {
            logType: "ADMIN_READ",
        },
        {
            logType: "DATA_READ",
            exemptedMembers: ["user:joebloggs@example.com"],
        },
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IamAuditConfig("folder",
    folder="folders/1234567",
    service="allServices",
    audit_log_configs=[
        {
            "log_type": "ADMIN_READ",
        },
        {
            "log_type": "DATA_READ",
            "exempted_members": ["user:joebloggs@example.com"],
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIamAuditConfig(ctx, "folder", &folder.IamAuditConfigArgs{
			Folder:  pulumi.String("folders/1234567"),
			Service: pulumi.String("allServices"),
			AuditLogConfigs: folder.IamAuditConfigAuditLogConfigArray{
				&folder.IamAuditConfigAuditLogConfigArgs{
					LogType: pulumi.String("ADMIN_READ"),
				},
				&folder.IamAuditConfigAuditLogConfigArgs{
					LogType: pulumi.String("DATA_READ"),
					ExemptedMembers: pulumi.StringArray{
						pulumi.String("user:joebloggs@example.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IamAuditConfig("folder", new()
    {
        Folder = "folders/1234567",
        Service = "allServices",
        AuditLogConfigs = new[]
        {
            new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
            {
                LogType = "ADMIN_READ",
            },
            new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
            {
                LogType = "DATA_READ",
                ExemptedMembers = new[]
                {
                    "user:joebloggs@example.com",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IamAuditConfig;
import com.pulumi.gcp.folder.IamAuditConfigArgs;
import com.pulumi.gcp.folder.inputs.IamAuditConfigAuditLogConfigArgs;
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 folder = new IamAuditConfig("folder", IamAuditConfigArgs.builder()
            .folder("folders/1234567")
            .service("allServices")
            .auditLogConfigs(            
                IamAuditConfigAuditLogConfigArgs.builder()
                    .logType("ADMIN_READ")
                    .build(),
                IamAuditConfigAuditLogConfigArgs.builder()
                    .logType("DATA_READ")
                    .exemptedMembers("user:joebloggs@example.com")
                    .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IamAuditConfig
    properties:
      folder: folders/1234567
      service: allServices
      auditLogConfigs:
        - logType: ADMIN_READ
        - logType: DATA_READ
          exemptedMembers:
            - user:joebloggs@example.com
Copy

gcp.folder.IAMBinding

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

const folder = new gcp.folder.IAMBinding("folder", {
    folder: "folders/1234567",
    role: "roles/editor",
    members: ["user:jane@example.com"],
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMBinding("folder",
    folder="folders/1234567",
    role="roles/editor",
    members=["user:jane@example.com"])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/editor"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMBinding("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/editor",
        Members = new[]
        {
            "user:jane@example.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMBinding;
import com.pulumi.gcp.folder.IAMBindingArgs;
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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
            .folder("folders/1234567")
            .role("roles/editor")
            .members("user:jane@example.com")
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMBinding
    properties:
      folder: folders/1234567
      role: roles/editor
      members:
        - user:jane@example.com
Copy

With IAM Conditions:

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

const folder = new gcp.folder.IAMBinding("folder", {
    folder: "folders/1234567",
    role: "roles/container.admin",
    members: ["user:jane@example.com"],
    condition: {
        title: "expires_after_2019_12_31",
        description: "Expiring at midnight of 2019-12-31",
        expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMBinding("folder",
    folder="folders/1234567",
    role="roles/container.admin",
    members=["user:jane@example.com"],
    condition={
        "title": "expires_after_2019_12_31",
        "description": "Expiring at midnight of 2019-12-31",
        "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/container.admin"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
			Condition: &folder.IAMBindingConditionArgs{
				Title:       pulumi.String("expires_after_2019_12_31"),
				Description: pulumi.String("Expiring at midnight of 2019-12-31"),
				Expression:  pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMBinding("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/container.admin",
        Members = new[]
        {
            "user:jane@example.com",
        },
        Condition = new Gcp.Folder.Inputs.IAMBindingConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMBinding;
import com.pulumi.gcp.folder.IAMBindingArgs;
import com.pulumi.gcp.folder.inputs.IAMBindingConditionArgs;
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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
            .folder("folders/1234567")
            .role("roles/container.admin")
            .members("user:jane@example.com")
            .condition(IAMBindingConditionArgs.builder()
                .title("expires_after_2019_12_31")
                .description("Expiring at midnight of 2019-12-31")
                .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
                .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMBinding
    properties:
      folder: folders/1234567
      role: roles/container.admin
      members:
        - user:jane@example.com
      condition:
        title: expires_after_2019_12_31
        description: Expiring at midnight of 2019-12-31
        expression: request.time < timestamp("2020-01-01T00:00:00Z")
Copy

gcp.folder.IAMMember

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

const folder = new gcp.folder.IAMMember("folder", {
    folder: "folders/1234567",
    role: "roles/editor",
    member: "user:jane@example.com",
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMMember("folder",
    folder="folders/1234567",
    role="roles/editor",
    member="user:jane@example.com")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/editor"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMMember("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/editor",
        Member = "user:jane@example.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMMember;
import com.pulumi.gcp.folder.IAMMemberArgs;
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 folder = new IAMMember("folder", IAMMemberArgs.builder()
            .folder("folders/1234567")
            .role("roles/editor")
            .member("user:jane@example.com")
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMMember
    properties:
      folder: folders/1234567
      role: roles/editor
      member: user:jane@example.com
Copy

With IAM Conditions:

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

const folder = new gcp.folder.IAMMember("folder", {
    folder: "folders/1234567",
    role: "roles/firebase.admin",
    member: "user:jane@example.com",
    condition: {
        title: "expires_after_2019_12_31",
        description: "Expiring at midnight of 2019-12-31",
        expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IAMMember("folder",
    folder="folders/1234567",
    role="roles/firebase.admin",
    member="user:jane@example.com",
    condition={
        "title": "expires_after_2019_12_31",
        "description": "Expiring at midnight of 2019-12-31",
        "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
			Folder: pulumi.String("folders/1234567"),
			Role:   pulumi.String("roles/firebase.admin"),
			Member: pulumi.String("user:jane@example.com"),
			Condition: &folder.IAMMemberConditionArgs{
				Title:       pulumi.String("expires_after_2019_12_31"),
				Description: pulumi.String("Expiring at midnight of 2019-12-31"),
				Expression:  pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IAMMember("folder", new()
    {
        Folder = "folders/1234567",
        Role = "roles/firebase.admin",
        Member = "user:jane@example.com",
        Condition = new Gcp.Folder.Inputs.IAMMemberConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IAMMember;
import com.pulumi.gcp.folder.IAMMemberArgs;
import com.pulumi.gcp.folder.inputs.IAMMemberConditionArgs;
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 folder = new IAMMember("folder", IAMMemberArgs.builder()
            .folder("folders/1234567")
            .role("roles/firebase.admin")
            .member("user:jane@example.com")
            .condition(IAMMemberConditionArgs.builder()
                .title("expires_after_2019_12_31")
                .description("Expiring at midnight of 2019-12-31")
                .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
                .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IAMMember
    properties:
      folder: folders/1234567
      role: roles/firebase.admin
      member: user:jane@example.com
      condition:
        title: expires_after_2019_12_31
        description: Expiring at midnight of 2019-12-31
        expression: request.time < timestamp("2020-01-01T00:00:00Z")
Copy

gcp.folder.IamAuditConfig

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

const folder = new gcp.folder.IamAuditConfig("folder", {
    folder: "folders/1234567",
    service: "allServices",
    auditLogConfigs: [
        {
            logType: "ADMIN_READ",
        },
        {
            logType: "DATA_READ",
            exemptedMembers: ["user:joebloggs@example.com"],
        },
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

folder = gcp.folder.IamAuditConfig("folder",
    folder="folders/1234567",
    service="allServices",
    audit_log_configs=[
        {
            "log_type": "ADMIN_READ",
        },
        {
            "log_type": "DATA_READ",
            "exempted_members": ["user:joebloggs@example.com"],
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewIamAuditConfig(ctx, "folder", &folder.IamAuditConfigArgs{
			Folder:  pulumi.String("folders/1234567"),
			Service: pulumi.String("allServices"),
			AuditLogConfigs: folder.IamAuditConfigAuditLogConfigArray{
				&folder.IamAuditConfigAuditLogConfigArgs{
					LogType: pulumi.String("ADMIN_READ"),
				},
				&folder.IamAuditConfigAuditLogConfigArgs{
					LogType: pulumi.String("DATA_READ"),
					ExemptedMembers: pulumi.StringArray{
						pulumi.String("user:joebloggs@example.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var folder = new Gcp.Folder.IamAuditConfig("folder", new()
    {
        Folder = "folders/1234567",
        Service = "allServices",
        AuditLogConfigs = new[]
        {
            new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
            {
                LogType = "ADMIN_READ",
            },
            new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
            {
                LogType = "DATA_READ",
                ExemptedMembers = new[]
                {
                    "user:joebloggs@example.com",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.IamAuditConfig;
import com.pulumi.gcp.folder.IamAuditConfigArgs;
import com.pulumi.gcp.folder.inputs.IamAuditConfigAuditLogConfigArgs;
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 folder = new IamAuditConfig("folder", IamAuditConfigArgs.builder()
            .folder("folders/1234567")
            .service("allServices")
            .auditLogConfigs(            
                IamAuditConfigAuditLogConfigArgs.builder()
                    .logType("ADMIN_READ")
                    .build(),
                IamAuditConfigAuditLogConfigArgs.builder()
                    .logType("DATA_READ")
                    .exemptedMembers("user:joebloggs@example.com")
                    .build())
            .build());

    }
}
Copy
resources:
  folder:
    type: gcp:folder:IamAuditConfig
    properties:
      folder: folders/1234567
      service: allServices
      auditLogConfigs:
        - logType: ADMIN_READ
        - logType: DATA_READ
          exemptedMembers:
            - user:joebloggs@example.com
Copy

Create IAMMember Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new IAMMember(name: string, args: IAMMemberArgs, opts?: CustomResourceOptions);
@overload
def IAMMember(resource_name: str,
              args: IAMMemberArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def IAMMember(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              folder: Optional[str] = None,
              member: Optional[str] = None,
              role: Optional[str] = None,
              condition: Optional[IAMMemberConditionArgs] = None)
func NewIAMMember(ctx *Context, name string, args IAMMemberArgs, opts ...ResourceOption) (*IAMMember, error)
public IAMMember(string name, IAMMemberArgs args, CustomResourceOptions? opts = null)
public IAMMember(String name, IAMMemberArgs args)
public IAMMember(String name, IAMMemberArgs args, CustomResourceOptions options)
type: gcp:folder:IAMMember
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IAMMemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IAMMemberArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IAMMemberArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IAMMemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IAMMemberArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var iammemberResource = new Gcp.Folder.IAMMember("iammemberResource", new()
{
    Folder = "string",
    Member = "string",
    Role = "string",
    Condition = new Gcp.Folder.Inputs.IAMMemberConditionArgs
    {
        Expression = "string",
        Title = "string",
        Description = "string",
    },
});
Copy
example, err := folder.NewIAMMember(ctx, "iammemberResource", &folder.IAMMemberArgs{
	Folder: pulumi.String("string"),
	Member: pulumi.String("string"),
	Role:   pulumi.String("string"),
	Condition: &folder.IAMMemberConditionArgs{
		Expression:  pulumi.String("string"),
		Title:       pulumi.String("string"),
		Description: pulumi.String("string"),
	},
})
Copy
var iammemberResource = new IAMMember("iammemberResource", IAMMemberArgs.builder()
    .folder("string")
    .member("string")
    .role("string")
    .condition(IAMMemberConditionArgs.builder()
        .expression("string")
        .title("string")
        .description("string")
        .build())
    .build());
Copy
iammember_resource = gcp.folder.IAMMember("iammemberResource",
    folder="string",
    member="string",
    role="string",
    condition={
        "expression": "string",
        "title": "string",
        "description": "string",
    })
Copy
const iammemberResource = new gcp.folder.IAMMember("iammemberResource", {
    folder: "string",
    member: "string",
    role: "string",
    condition: {
        expression: "string",
        title: "string",
        description: "string",
    },
});
Copy
type: gcp:folder:IAMMember
properties:
    condition:
        description: string
        expression: string
        title: string
    folder: string
    member: string
    role: string
Copy

IAMMember Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The IAMMember resource accepts the following input properties:

Folder
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Member
This property is required.
Changes to this property will trigger replacement.
string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Role
This property is required.
Changes to this property will trigger replacement.
string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
Condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
Folder
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Member
This property is required.
Changes to this property will trigger replacement.
string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Role
This property is required.
Changes to this property will trigger replacement.
string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
Condition Changes to this property will trigger replacement. IAMMemberConditionArgs
An IAM Condition for a given binding. Structure is documented below.
folder
This property is required.
Changes to this property will trigger replacement.
String
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member
This property is required.
Changes to this property will trigger replacement.
String
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role
This property is required.
Changes to this property will trigger replacement.
String
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
folder
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member
This property is required.
Changes to this property will trigger replacement.
string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role
This property is required.
Changes to this property will trigger replacement.
string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
folder
This property is required.
Changes to this property will trigger replacement.
str
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member
This property is required.
Changes to this property will trigger replacement.
str
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role
This property is required.
Changes to this property will trigger replacement.
str
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberConditionArgs
An IAM Condition for a given binding. Structure is documented below.
folder
This property is required.
Changes to this property will trigger replacement.
String
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member
This property is required.
Changes to this property will trigger replacement.
String
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role
This property is required.
Changes to this property will trigger replacement.
String
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. Property Map
An IAM Condition for a given binding. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the IAMMember resource produces the following output properties:

Etag string
(Computed) The etag of the folder's IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
Etag string
(Computed) The etag of the folder's IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
etag String
(Computed) The etag of the folder's IAM policy.
id String
The provider-assigned unique ID for this managed resource.
etag string
(Computed) The etag of the folder's IAM policy.
id string
The provider-assigned unique ID for this managed resource.
etag str
(Computed) The etag of the folder's IAM policy.
id str
The provider-assigned unique ID for this managed resource.
etag String
(Computed) The etag of the folder's IAM policy.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing IAMMember Resource

Get an existing IAMMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: IAMMemberState, opts?: CustomResourceOptions): IAMMember
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        condition: Optional[IAMMemberConditionArgs] = None,
        etag: Optional[str] = None,
        folder: Optional[str] = None,
        member: Optional[str] = None,
        role: Optional[str] = None) -> IAMMember
func GetIAMMember(ctx *Context, name string, id IDInput, state *IAMMemberState, opts ...ResourceOption) (*IAMMember, error)
public static IAMMember Get(string name, Input<string> id, IAMMemberState? state, CustomResourceOptions? opts = null)
public static IAMMember get(String name, Output<String> id, IAMMemberState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
Etag string
(Computed) The etag of the folder's IAM policy.
Folder Changes to this property will trigger replacement. string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Member Changes to this property will trigger replacement. string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Role Changes to this property will trigger replacement. string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
Condition Changes to this property will trigger replacement. IAMMemberConditionArgs
An IAM Condition for a given binding. Structure is documented below.
Etag string
(Computed) The etag of the folder's IAM policy.
Folder Changes to this property will trigger replacement. string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Member Changes to this property will trigger replacement. string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Role Changes to this property will trigger replacement. string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
etag String
(Computed) The etag of the folder's IAM policy.
folder Changes to this property will trigger replacement. String
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member Changes to this property will trigger replacement. String
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role Changes to this property will trigger replacement. String
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberCondition
An IAM Condition for a given binding. Structure is documented below.
etag string
(Computed) The etag of the folder's IAM policy.
folder Changes to this property will trigger replacement. string
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member Changes to this property will trigger replacement. string
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role Changes to this property will trigger replacement. string
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. IAMMemberConditionArgs
An IAM Condition for a given binding. Structure is documented below.
etag str
(Computed) The etag of the folder's IAM policy.
folder Changes to this property will trigger replacement. str
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member Changes to this property will trigger replacement. str
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role Changes to this property will trigger replacement. str
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.
condition Changes to this property will trigger replacement. Property Map
An IAM Condition for a given binding. Structure is documented below.
etag String
(Computed) The etag of the folder's IAM policy.
folder Changes to this property will trigger replacement. String
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
member Changes to this property will trigger replacement. String
Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
role Changes to this property will trigger replacement. String
The role that should be applied. Only one gcp.folder.IAMBinding can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}.

Supporting Types

IAMMemberCondition
, IAMMemberConditionArgs

Expression
This property is required.
Changes to this property will trigger replacement.
string
Textual representation of an expression in Common Expression Language syntax.
Title
This property is required.
Changes to this property will trigger replacement.
string
A title for the expression, i.e. a short string describing its purpose.
Description Changes to this property will trigger replacement. string

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

Expression
This property is required.
Changes to this property will trigger replacement.
string
Textual representation of an expression in Common Expression Language syntax.
Title
This property is required.
Changes to this property will trigger replacement.
string
A title for the expression, i.e. a short string describing its purpose.
Description Changes to this property will trigger replacement. string

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

expression
This property is required.
Changes to this property will trigger replacement.
String
Textual representation of an expression in Common Expression Language syntax.
title
This property is required.
Changes to this property will trigger replacement.
String
A title for the expression, i.e. a short string describing its purpose.
description Changes to this property will trigger replacement. String

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

expression
This property is required.
Changes to this property will trigger replacement.
string
Textual representation of an expression in Common Expression Language syntax.
title
This property is required.
Changes to this property will trigger replacement.
string
A title for the expression, i.e. a short string describing its purpose.
description Changes to this property will trigger replacement. string

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

expression
This property is required.
Changes to this property will trigger replacement.
str
Textual representation of an expression in Common Expression Language syntax.
title
This property is required.
Changes to this property will trigger replacement.
str
A title for the expression, i.e. a short string describing its purpose.
description Changes to this property will trigger replacement. str

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

expression
This property is required.
Changes to this property will trigger replacement.
String
Textual representation of an expression in Common Expression Language syntax.
title
This property is required.
Changes to this property will trigger replacement.
String
A title for the expression, i.e. a short string describing its purpose.
description Changes to this property will trigger replacement. String

An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Warning: This provider considers the role and condition contents (title+description+expression) as the identifier for the binding. This means that if any part of the condition is changed out-of-band, the provider will consider it to be an entirely different resource and will treat it as such.

Import

Importing Audit Configs

An audit config can be imported into a google_folder_iam_audit_config resource using the resource’s folder_id and the service, e.g:

  • "folder/{{folder_id}} foo.googleapis.com"

An import block (Terraform v1.5.0 and later) can be used to import audit configs:

tf

import {

id = “folder/{{folder_id}} foo.googleapis.com”

to = google_folder_iam_audit_config.default

}

The pulumi import command can also be used:

$ pulumi import gcp:folder/iAMMember:IAMMember default "folder/{{folder_id}} foo.googleapis.com"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.