IAMCustomRole

Example Usage

This snippet creates a customized IAM role.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.IAMCustomRole;
import com.pulumi.gcp.projects.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")
.permissions(
"iam.roles.list",
"iam.roles.create",
"iam.roles.delete")
.roleId("myCustomRole")
.title("My Custom Role")
.build());
}
}

Import

Custom Roles can be imported using any of these accepted formats

$ pulumi import gcp:projects/iAMCustomRole:IAMCustomRole default projects/{{project}}/roles/{{role_id}}
$ pulumi import gcp:projects/iAMCustomRole:IAMCustomRole default {{project}}/{{role_id}}
$ pulumi import gcp:projects/iAMCustomRole:IAMCustomRole default {{role_id}}

Properties

Link copied to clipboard
val deleted: Output<Boolean>

(Optional) The current deleted state of the role.

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

A human-readable description for the role.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the role in the format projects/{{project}}/roles/{{role_id}}. Like id, this field can be used as a reference in other resources such as IAM role bindings.

Link copied to clipboard
val permissions: Output<List<String>>

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 project: Output<String>

The project that the service account will be created in. Defaults to the provider project configuration.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleId: Output<String>

The camel case role id to use for this role. Cannot contain - characters.

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

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

Link copied to clipboard
val title: Output<String>

A human-readable title for the role.

Link copied to clipboard
val urn: Output<String>