IAMBindingArgs

data class IAMBindingArgs(val condition: Output<IAMBindingConditionArgs>? = null, val members: Output<List<String>>? = null, val orgId: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<IAMBindingArgs>

Allows creation and management of a single binding within IAM policy for an existing Google Cloud Platform Organization.

Note: This resource must not be used in conjunction with gcp.organizations.IAMMember for the same role or they will fight over what your policy should be. Note: On create, this resource will overwrite members of any existing roles. Use pulumi import and inspect the `output to ensure your existing members are preserved.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.IAMBinding;
import com.pulumi.gcp.organizations.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 binding = new IAMBinding("binding", IAMBindingArgs.builder()
.members("user:alice@gmail.com")
.orgId("123456789")
.role("roles/browser")
.build());
}
}

Import

IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the org_id and role, e.g.

$ pulumi import gcp:organizations/iAMBinding:IAMBinding my_org "your-org-id roles/viewer"

->Custom RolesIf you're importing a IAM resource with a custom role, make sure to use the full name of the custom role, e.g. [projects/my-project|organizations/my-org]/roles/my-custom-role.

Constructors

Link copied to clipboard
constructor(condition: Output<IAMBindingConditionArgs>? = null, members: Output<List<String>>? = null, orgId: Output<String>? = null, role: Output<String>? = null)

Properties

Link copied to clipboard
val condition: Output<IAMBindingConditionArgs>? = null
Link copied to clipboard
val members: Output<List<String>>? = null

A list of users that the role should apply to. For more details on format and restrictions see https://cloud.google.com/billing/reference/rest/v1/Policy#Binding

Link copied to clipboard
val orgId: Output<String>? = null

The numeric ID of the organization in which you want to create a custom role.

Link copied to clipboard
val role: Output<String>? = null

The role that should be applied. Only one gcp.organizations.IAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

Functions

Link copied to clipboard
open override fun toJava(): IAMBindingArgs