@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
45 lines • 1.78 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIamRoleOutput = exports.getIamRole = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Generates an [IAM] role document that may be referenced by and applied to
* other Yandex.Cloud Platform resources, such as the `yandex.ResourcemanagerFolder` resource. For more information, see
* [the official documentation](https://cloud.yandex.com/docs/iam/concepts/access-control/roles).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const admin = pulumi.output(yandex.getIamRole({
* binding: [{
* members: ["userAccount:user_id_1"],
* role: "admin",
* }],
* }));
* ```
*
* This data source is used to define [IAM] roles in order to apply them to other resources.
* Currently, defining a role through a data source and referencing that role
* from another resource is the only way to apply an IAM role to a resource.
*/
function getIamRole(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("yandex:index/getIamRole:getIamRole", {
"description": args.description,
"roleId": args.roleId,
}, opts);
}
exports.getIamRole = getIamRole;
function getIamRoleOutput(args, opts) {
return pulumi.output(args).apply(a => getIamRole(a, opts));
}
exports.getIamRoleOutput = getIamRoleOutput;
//# sourceMappingURL=getIamRole.js.map