@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
280 lines (279 loc) • 9.18 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages a V3 User resource within OpenStack Keystone.
*
* > **Note:** All arguments including the user password will be stored in the
* raw state as plain-text. Read more about sensitive data in
* state.
*
* > **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 project1 = new openstack.identity.Project("project_1", {name: "project_1"});
* const user1 = new openstack.identity.User("user_1", {
* defaultProjectId: project1.id,
* name: "user_1",
* description: "A user",
* password: "password123",
* ignoreChangePasswordUponFirstUse: true,
* multiFactorAuthEnabled: true,
* multiFactorAuthRules: [
* {
* rules: [
* "password",
* "totp",
* ],
* },
* {
* rules: ["password"],
* },
* ],
* extra: {
* email: "user_1@foobar.com",
* },
* });
* ```
*
* ## Import
*
* Users can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:identity/user:User user_1 89c60255-9bd6-460c-822a-e2b959ede9d2
* ```
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User 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?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. 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 User;
/**
* The default project this user belongs to.
*/
readonly defaultProjectId: pulumi.Output<string>;
/**
* A description of the user.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The domain this user belongs to.
*/
readonly domainId: pulumi.Output<string>;
/**
* Whether the user is enabled or disabled. Valid
* values are `true` and `false`.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* Free-form key/value pairs of extra information.
*/
readonly extra: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* User will not have to
* change their password upon first use. Valid values are `true` and `false`.
*/
readonly ignoreChangePasswordUponFirstUse: pulumi.Output<boolean | undefined>;
/**
* User will not have a failure
* lockout placed on their account. Valid values are `true` and `false`.
*/
readonly ignoreLockoutFailureAttempts: pulumi.Output<boolean | undefined>;
/**
* User's password will not expire.
* Valid values are `true` and `false`.
*/
readonly ignorePasswordExpiry: pulumi.Output<boolean | undefined>;
/**
* Whether to enable multi-factor
* authentication. Valid values are `true` and `false`.
*/
readonly multiFactorAuthEnabled: pulumi.Output<boolean | undefined>;
/**
* A multi-factor authentication rule.
* The structure is documented below. Please see the
* [Ocata release notes](https://docs.openstack.org/releasenotes/keystone/ocata.html)
* for more information on how to use mulit-factor rules.
*/
readonly multiFactorAuthRules: pulumi.Output<outputs.identity.UserMultiFactorAuthRule[] | undefined>;
/**
* The name of the user.
*/
readonly name: pulumi.Output<string>;
/**
* The password for the user.
*/
readonly password: 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 User.
*/
readonly region: pulumi.Output<string>;
/**
* Create a User 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?: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* The default project this user belongs to.
*/
defaultProjectId?: pulumi.Input<string>;
/**
* A description of the user.
*/
description?: pulumi.Input<string>;
/**
* The domain this user belongs to.
*/
domainId?: pulumi.Input<string>;
/**
* Whether the user is enabled or disabled. Valid
* values are `true` and `false`.
*/
enabled?: pulumi.Input<boolean>;
/**
* Free-form key/value pairs of extra information.
*/
extra?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* User will not have to
* change their password upon first use. Valid values are `true` and `false`.
*/
ignoreChangePasswordUponFirstUse?: pulumi.Input<boolean>;
/**
* User will not have a failure
* lockout placed on their account. Valid values are `true` and `false`.
*/
ignoreLockoutFailureAttempts?: pulumi.Input<boolean>;
/**
* User's password will not expire.
* Valid values are `true` and `false`.
*/
ignorePasswordExpiry?: pulumi.Input<boolean>;
/**
* Whether to enable multi-factor
* authentication. Valid values are `true` and `false`.
*/
multiFactorAuthEnabled?: pulumi.Input<boolean>;
/**
* A multi-factor authentication rule.
* The structure is documented below. Please see the
* [Ocata release notes](https://docs.openstack.org/releasenotes/keystone/ocata.html)
* for more information on how to use mulit-factor rules.
*/
multiFactorAuthRules?: pulumi.Input<pulumi.Input<inputs.identity.UserMultiFactorAuthRule>[]>;
/**
* The name of the user.
*/
name?: pulumi.Input<string>;
/**
* The password for the user.
*/
password?: 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 User.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* The default project this user belongs to.
*/
defaultProjectId?: pulumi.Input<string>;
/**
* A description of the user.
*/
description?: pulumi.Input<string>;
/**
* The domain this user belongs to.
*/
domainId?: pulumi.Input<string>;
/**
* Whether the user is enabled or disabled. Valid
* values are `true` and `false`.
*/
enabled?: pulumi.Input<boolean>;
/**
* Free-form key/value pairs of extra information.
*/
extra?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* User will not have to
* change their password upon first use. Valid values are `true` and `false`.
*/
ignoreChangePasswordUponFirstUse?: pulumi.Input<boolean>;
/**
* User will not have a failure
* lockout placed on their account. Valid values are `true` and `false`.
*/
ignoreLockoutFailureAttempts?: pulumi.Input<boolean>;
/**
* User's password will not expire.
* Valid values are `true` and `false`.
*/
ignorePasswordExpiry?: pulumi.Input<boolean>;
/**
* Whether to enable multi-factor
* authentication. Valid values are `true` and `false`.
*/
multiFactorAuthEnabled?: pulumi.Input<boolean>;
/**
* A multi-factor authentication rule.
* The structure is documented below. Please see the
* [Ocata release notes](https://docs.openstack.org/releasenotes/keystone/ocata.html)
* for more information on how to use mulit-factor rules.
*/
multiFactorAuthRules?: pulumi.Input<pulumi.Input<inputs.identity.UserMultiFactorAuthRule>[]>;
/**
* The name of the user.
*/
name?: pulumi.Input<string>;
/**
* The password for the user.
*/
password?: 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 User.
*/
region?: pulumi.Input<string>;
}