User
Manages a V3 User resource 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,
Description = "A user",
Extra =
{
{ "email", "user_1@foobar.com" },
},
IgnoreChangePasswordUponFirstUse = true,
MultiFactorAuthEnabled = true,
MultiFactorAuthRules =
{
new OpenStack.Identity.Inputs.UserMultiFactorAuthRuleArgs
{
Rule =
{
"password",
"totp",
},
},
new OpenStack.Identity.Inputs.UserMultiFactorAuthRuleArgs
{
Rule =
{
"password",
},
},
},
Password = "password123",
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
project1 = openstack.identity.Project("project1")
user1 = openstack.identity.User("user1",
default_project_id=project1.id,
description="A user",
extra={
"email": "user_1@foobar.com",
},
ignore_change_password_upon_first_use=True,
multi_factor_auth_enabled=True,
multi_factor_auth_rules=[
{
"rule": [
"password",
"totp",
],
},
{
"rule": ["password"],
},
],
password="password123")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,
description: "A user",
extra: {
email: "user_1@foobar.com",
},
ignoreChangePasswordUponFirstUse: true,
multiFactorAuthEnabled: true,
multiFactorAuthRules: [
{
rules: [
"password",
"totp",
],
},
{
rules: ["password"],
},
],
password: "password123",
});Create a User Resource
new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);def User(resource_name, opts=None, default_project_id=None, description=None, domain_id=None, enabled=None, extra=None, ignore_change_password_upon_first_use=None, ignore_lockout_failure_attempts=None, ignore_password_expiry=None, multi_factor_auth_enabled=None, multi_factor_auth_rules=None, name=None, password=None, region=None, __props__=None);public User(string name, UserArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
User Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The User resource accepts the following input properties:
- Default
Project stringId The default project this user belongs to.
- Description string
A description of the user.
- Domain
Id string The domain this user belongs to.
- Enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- Extra Dictionary<string, object>
Free-form key/value pairs of extra information.
- Ignore
Change boolPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- Ignore
Lockout boolFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- Ignore
Password boolExpiry User’s password will not expire. Valid values are
trueandfalse.- Multi
Factor boolAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- Multi
Factor List<Pulumi.Auth Rules Open Stack. Identity. Inputs. User Multi Factor Auth Rule Args> A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- Name string
The name of the user.
- Password string
The password for the user.
- Region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- Default
Project stringId The default project this user belongs to.
- Description string
A description of the user.
- Domain
Id string The domain this user belongs to.
- Enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- Extra map[string]interface{}
Free-form key/value pairs of extra information.
- Ignore
Change boolPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- Ignore
Lockout boolFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- Ignore
Password boolExpiry User’s password will not expire. Valid values are
trueandfalse.- Multi
Factor boolAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- Multi
Factor []UserAuth Rules Multi Factor Auth Rule A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- Name string
The name of the user.
- Password string
The password for the user.
- Region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- default
Project stringId The default project this user belongs to.
- description string
A description of the user.
- domain
Id string The domain this user belongs to.
- enabled boolean
Whether the user is enabled or disabled. Valid values are
trueandfalse.- extra {[key: string]: any}
Free-form key/value pairs of extra information.
- ignore
Change booleanPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- ignore
Lockout booleanFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- ignore
Password booleanExpiry User’s password will not expire. Valid values are
trueandfalse.- multi
Factor booleanAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- multi
Factor UserAuth Rules Multi Factor Auth Rule[] A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- name string
The name of the user.
- password string
The password for the user.
- region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- default_
project_ strid The default project this user belongs to.
- description str
A description of the user.
- domain_
id str The domain this user belongs to.
- enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- extra Dict[str, Any]
Free-form key/value pairs of extra information.
- ignore_
change_ boolpassword_ upon_ first_ use User will not have to change their password upon first use. Valid values are
trueandfalse.- ignore_
lockout_ boolfailure_ attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- ignore_
password_ boolexpiry User’s password will not expire. Valid values are
trueandfalse.- multi_
factor_ boolauth_ enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- multi_
factor_ List[Userauth_ rules Multi Factor Auth Rule] A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- name str
The name of the user.
- password str
The password for the user.
- region str
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
Look up an Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): Userstatic get(resource_name, id, opts=None, default_project_id=None, description=None, domain_id=None, enabled=None, extra=None, ignore_change_password_upon_first_use=None, ignore_lockout_failure_attempts=None, ignore_password_expiry=None, multi_factor_auth_enabled=None, multi_factor_auth_rules=None, name=None, password=None, region=None, __props__=None);public static User Get(string name, Input<string> id, UserState? 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:
- Default
Project stringId The default project this user belongs to.
- Description string
A description of the user.
- Domain
Id string The domain this user belongs to.
- Enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- Extra Dictionary<string, object>
Free-form key/value pairs of extra information.
- Ignore
Change boolPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- Ignore
Lockout boolFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- Ignore
Password boolExpiry User’s password will not expire. Valid values are
trueandfalse.- Multi
Factor boolAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- Multi
Factor List<Pulumi.Auth Rules Open Stack. Identity. Inputs. User Multi Factor Auth Rule Args> A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- Name string
The name of the user.
- Password string
The password for the user.
- Region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- Default
Project stringId The default project this user belongs to.
- Description string
A description of the user.
- Domain
Id string The domain this user belongs to.
- Enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- Extra map[string]interface{}
Free-form key/value pairs of extra information.
- Ignore
Change boolPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- Ignore
Lockout boolFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- Ignore
Password boolExpiry User’s password will not expire. Valid values are
trueandfalse.- Multi
Factor boolAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- Multi
Factor []UserAuth Rules Multi Factor Auth Rule A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- Name string
The name of the user.
- Password string
The password for the user.
- Region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- default
Project stringId The default project this user belongs to.
- description string
A description of the user.
- domain
Id string The domain this user belongs to.
- enabled boolean
Whether the user is enabled or disabled. Valid values are
trueandfalse.- extra {[key: string]: any}
Free-form key/value pairs of extra information.
- ignore
Change booleanPassword Upon First Use User will not have to change their password upon first use. Valid values are
trueandfalse.- ignore
Lockout booleanFailure Attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- ignore
Password booleanExpiry User’s password will not expire. Valid values are
trueandfalse.- multi
Factor booleanAuth Enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- multi
Factor UserAuth Rules Multi Factor Auth Rule[] A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- name string
The name of the user.
- password string
The password for the user.
- region string
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
- default_
project_ strid The default project this user belongs to.
- description str
A description of the user.
- domain_
id str The domain this user belongs to.
- enabled bool
Whether the user is enabled or disabled. Valid values are
trueandfalse.- extra Dict[str, Any]
Free-form key/value pairs of extra information.
- ignore_
change_ boolpassword_ upon_ first_ use User will not have to change their password upon first use. Valid values are
trueandfalse.- ignore_
lockout_ boolfailure_ attempts User will not have a failure lockout placed on their account. Valid values are
trueandfalse.- ignore_
password_ boolexpiry User’s password will not expire. Valid values are
trueandfalse.- multi_
factor_ boolauth_ enabled Whether to enable multi-factor authentication. Valid values are
trueandfalse.- multi_
factor_ List[Userauth_ rules Multi Factor Auth Rule] A multi-factor authentication rule. The structure is documented below. Please see the Ocata release notes for more information on how to use mulit-factor rules.
- name str
The name of the user.
- password str
The password for the user.
- region str
The region in which to obtain the V3 Keystone client. If omitted, the
regionargument of the provider is used. Changing this creates a new User.
Supporting Types
UserMultiFactorAuthRule
- Rules List<string>
A list of authentication plugins that the user must authenticate with.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.