UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

163 lines (162 loc) 5.64 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a V3 Inherit Role assignment within OpenStack Keystone. This uses the * Openstack keystone `OS-INHERIT` api to created inherit roles within domains * and parent projects for users and groups. * * > **Note:** You _must_ have admin privileges in your OpenStack cloud to use * this resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const user1 = new openstack.identity.User("user_1", { * name: "user_1", * domainId: "default", * }); * const role1 = new openstack.identity.Role("role_1", { * name: "role_1", * domainId: "default", * }); * const roleAssignment1 = new openstack.identity.InheritRoleAssignment("role_assignment_1", { * userId: user1.id, * domainId: "default", * roleId: role1.id, * }); * ``` * * ## Import * * Inherit role assignments can be imported using a constructed id. The id should * have the form of `domainID/projectID/groupID/userID/roleID`. When something is * not used then leave blank. * * For example this will import the inherit role assignment for: * projectID: 014395cd-89fc-4c9b-96b7-13d1ee79dad2, * userID: 4142e64b-1b35-44a0-9b1e-5affc7af1106, * roleID: ea257959-eeb1-4c10-8d33-26f0409a755d * ( domainID and groupID are left blank) * * ```sh * $ pulumi import openstack:identity/inheritRoleAssignment:InheritRoleAssignment role_assignment_1 /014395cd-89fc-4c9b-96b7-13d1ee79dad2//4142e64b-1b35-44a0-9b1e-5affc7af1106/ea257959-eeb1-4c10-8d33-26f0409a755d * ``` */ export declare class InheritRoleAssignment extends pulumi.CustomResource { /** * Get an existing InheritRoleAssignment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InheritRoleAssignmentState, opts?: pulumi.CustomResourceOptions): InheritRoleAssignment; /** * Returns true if the given object is an instance of InheritRoleAssignment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is InheritRoleAssignment; /** * The domain to assign the role in. */ readonly domainId: pulumi.Output<string | undefined>; /** * The group to assign the role to. */ readonly groupId: pulumi.Output<string | undefined>; /** * The project to assign the role in. * The project should be able to containt child projects. */ readonly projectId: pulumi.Output<string | undefined>; /** * The region in which to obtain the V3 Keystone client. * If omitted, the `region` argument of the provider is used. Changing this * creates a new inherit role assignment. */ readonly region: pulumi.Output<string>; /** * The role to assign. */ readonly roleId: pulumi.Output<string>; /** * The user to assign the role to. */ readonly userId: pulumi.Output<string | undefined>; /** * Create a InheritRoleAssignment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InheritRoleAssignmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering InheritRoleAssignment resources. */ export interface InheritRoleAssignmentState { /** * The domain to assign the role in. */ domainId?: pulumi.Input<string>; /** * The group to assign the role to. */ groupId?: pulumi.Input<string>; /** * The project to assign the role in. * The project should be able to containt child projects. */ projectId?: pulumi.Input<string>; /** * The region in which to obtain the V3 Keystone client. * If omitted, the `region` argument of the provider is used. Changing this * creates a new inherit role assignment. */ region?: pulumi.Input<string>; /** * The role to assign. */ roleId?: pulumi.Input<string>; /** * The user to assign the role to. */ userId?: pulumi.Input<string>; } /** * The set of arguments for constructing a InheritRoleAssignment resource. */ export interface InheritRoleAssignmentArgs { /** * The domain to assign the role in. */ domainId?: pulumi.Input<string>; /** * The group to assign the role to. */ groupId?: pulumi.Input<string>; /** * The project to assign the role in. * The project should be able to containt child projects. */ projectId?: pulumi.Input<string>; /** * The region in which to obtain the V3 Keystone client. * If omitted, the `region` argument of the provider is used. Changing this * creates a new inherit role assignment. */ region?: pulumi.Input<string>; /** * The role to assign. */ roleId: pulumi.Input<string>; /** * The user to assign the role to. */ userId?: pulumi.Input<string>; }