RoleAssignment

Manages a V3 Role assignment within OpenStack Keystone.

Note: You must have admin privileges in your OpenStack cloud to use this resource.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var project1 = new OpenStack.Identity.Project("project1", new OpenStack.Identity.ProjectArgs
        {
        });
        var user1 = new OpenStack.Identity.User("user1", new OpenStack.Identity.UserArgs
        {
            DefaultProjectId = project1.Id,
        });
        var role1 = new OpenStack.Identity.Role("role1", new OpenStack.Identity.RoleArgs
        {
        });
        var roleAssignment1 = new OpenStack.Identity.RoleAssignment("roleAssignment1", new OpenStack.Identity.RoleAssignmentArgs
        {
            ProjectId = project1.Id,
            RoleId = role1.Id,
            UserId = user1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

project1 = openstack.identity.Project("project1")
user1 = openstack.identity.User("user1", default_project_id=project1.id)
role1 = openstack.identity.Role("role1")
role_assignment1 = openstack.identity.RoleAssignment("roleAssignment1",
    project_id=project1.id,
    role_id=role1.id,
    user_id=user1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const project1 = new openstack.identity.Project("project_1", {});
const user1 = new openstack.identity.User("user_1", {
    defaultProjectId: project1.id,
});
const role1 = new openstack.identity.Role("role_1", {});
const roleAssignment1 = new openstack.identity.RoleAssignment("role_assignment_1", {
    projectId: project1.id,
    roleId: role1.id,
    userId: user1.id,
});

Create a RoleAssignment Resource

def RoleAssignment(resource_name, opts=None, domain_id=None, group_id=None, project_id=None, region=None, role_id=None, user_id=None, __props__=None);
name string
The unique name of the resource.
args RoleAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RoleAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RoleAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RoleAssignment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The RoleAssignment resource accepts the following input properties:

RoleId string

The role to assign.

DomainId string

The domain to assign the role in.

GroupId string

The group to assign the role to.

ProjectId string

The project to assign the role in.

Region string
UserId string

The user to assign the role to.

RoleId string

The role to assign.

DomainId string

The domain to assign the role in.

GroupId string

The group to assign the role to.

ProjectId string

The project to assign the role in.

Region string
UserId string

The user to assign the role to.

roleId string

The role to assign.

domainId string

The domain to assign the role in.

groupId string

The group to assign the role to.

projectId string

The project to assign the role in.

region string
userId string

The user to assign the role to.

role_id str

The role to assign.

domain_id str

The domain to assign the role in.

group_id str

The group to assign the role to.

project_id str

The project to assign the role in.

region str
user_id str

The user to assign the role to.

Outputs

All input properties are implicitly available as output properties. Additionally, the RoleAssignment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing RoleAssignment Resource

Get an existing RoleAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RoleAssignmentState, opts?: CustomResourceOptions): RoleAssignment
static get(resource_name, id, opts=None, domain_id=None, group_id=None, project_id=None, region=None, role_id=None, user_id=None, __props__=None);
func GetRoleAssignment(ctx *Context, name string, id IDInput, state *RoleAssignmentState, opts ...ResourceOption) (*RoleAssignment, error)
public static RoleAssignment Get(string name, Input<string> id, RoleAssignmentState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DomainId string

The domain to assign the role in.

GroupId string

The group to assign the role to.

ProjectId string

The project to assign the role in.

Region string
RoleId string

The role to assign.

UserId string

The user to assign the role to.

DomainId string

The domain to assign the role in.

GroupId string

The group to assign the role to.

ProjectId string

The project to assign the role in.

Region string
RoleId string

The role to assign.

UserId string

The user to assign the role to.

domainId string

The domain to assign the role in.

groupId string

The group to assign the role to.

projectId string

The project to assign the role in.

region string
roleId string

The role to assign.

userId string

The user to assign the role to.

domain_id str

The domain to assign the role in.

group_id str

The group to assign the role to.

project_id str

The project to assign the role in.

region str
role_id str

The role to assign.

user_id str

The user to assign the role to.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.