IAMCustomRoleArgs

data class IAMCustomRoleArgs(val description: Output<String>? = null, val orgId: Output<String>? = null, val permissions: Output<List<String>>? = null, val roleId: Output<String>? = null, val stage: Output<String>? = null, val title: Output<String>? = null) : ConvertibleToJava<IAMCustomRoleArgs>

Allows management of a customized Cloud IAM organization role. For more information see the official documentation and API.

Warning: Note that custom roles in GCP have the concept of a soft-delete. There are two issues that may arise from this and how roles are propagated. 1) creating a role may involve undeleting and then updating a role with the same name, possibly causing confusing behavior between undelete and update. 2) A deleted role is permanently deleted after 7 days, but it can take up to 30 more days (i.e. between 7 and 37 days after deletion) before the role name is made available again. This means a deleted role that has been deleted for more than 7 days cannot be changed at all by the provider, and new roles cannot share that name.

Example Usage

This snippet creates a customized IAM organization role.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.IAMCustomRole;
import com.pulumi.gcp.organizations.IAMCustomRoleArgs;
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 my_custom_role = new IAMCustomRole("my-custom-role", IAMCustomRoleArgs.builder()
.description("A description")
.orgId("123456789")
.permissions(
"iam.roles.list",
"iam.roles.create",
"iam.roles.delete")
.roleId("myCustomRole")
.title("My Custom Role")
.build());
}
}

Import

Customized IAM organization role can be imported using their URI, e.g.

$ pulumi import gcp:organizations/iAMCustomRole:IAMCustomRole my-custom-role organizations/123456789/roles/myCustomRole

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, orgId: Output<String>? = null, permissions: Output<List<String>>? = null, roleId: Output<String>? = null, stage: Output<String>? = null, title: Output<String>? = null)

Properties

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

A human-readable description for the role.

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 permissions: Output<List<String>>? = null

The names of the permissions this role grants when bound in an IAM policy. At least one permission must be specified.

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

The role id to use for this role.

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

The current launch stage of the role. Defaults to GA. List of possible stages is here.

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

A human-readable title for the role.

Functions

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