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
new RoleAssignment(name: string, args: RoleAssignmentArgs, opts?: CustomResourceOptions);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);func NewRoleAssignment(ctx *Context, name string, args RoleAssignmentArgs, opts ...ResourceOption) (*RoleAssignment, error)public RoleAssignment(string name, RoleAssignmentArgs args, CustomResourceOptions? opts = null)- 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:
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssignment resource produces the following output properties:
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): RoleAssignmentstatic 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:
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.