Module iam

@pulumi/gcp > iam

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

function getRule

getRule(args: GetRuleArgs, opts?: pulumi.InvokeOptions): Promise<GetRuleResult> & GetRuleResult

Use this data source to get information about a Google IAM Role.

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

const roleinfo = pulumi.output(gcp.iam.getRule({
    name: "roles/compute.viewer",
}));

export const theRolePermissions = roleinfo.includedPermissions;

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/d/iam_role.html.markdown.

interface GetRuleArgs

A collection of arguments for invoking getRule.

property name

name: string;

The name of the Role to lookup in the form roles/{ROLE_NAME}, organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME} or projects/{PROJECT_ID}/roles/{ROLE_NAME}

interface GetRuleResult

A collection of values returned by getRule.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property includedPermissions

includedPermissions: string[];

specifies the list of one or more permissions to include in the custom role, such as - iam.roles.get

property name

name: string;

property stage

stage: string;

indicates the stage of a role in the launch lifecycle, such as GA, BETA or ALPHA.

property title

title: string;

is a friendly title for the role, such as “Role Viewer”