import * as pulumi from "@pulumi/pulumi"; /** * The ``mysql.User`` resource creates and manages a user on a MySQL * server. * * > **Note:** The password for the user is provided in plain text, and is * obscured by an unsalted hash in the state * [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html). * Care is required when using this resource, to avoid disclosing the password. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as mysql from "@pulumi/mysql"; * * const jdoe = new mysql.User("jdoe", { * user: "jdoe", * host: "example.com", * plaintextPassword: "password", * }); * ``` * * ### With An Authentication Plugin * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as mysql from "@pulumi/mysql"; * * const nologin = new mysql.User("nologin", { * user: "nologin", * host: "example.com", * authPlugin: "mysql_no_login", * }); * ``` */ 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, 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; /** * Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. */ readonly authPlugin: pulumi.Output; /** * The source host of the user. Defaults to "localhost". */ readonly host: pulumi.Output; /** * Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. * * @deprecated Please use plaintextPassword instead */ readonly password: pulumi.Output; /** * The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. */ readonly plaintextPassword: pulumi.Output; /** * An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. * * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html */ readonly tlsOption: pulumi.Output; /** * The name of the user. */ readonly user: pulumi.Output; /** * 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 { /** * Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. */ authPlugin?: pulumi.Input; /** * The source host of the user. Defaults to "localhost". */ host?: pulumi.Input; /** * Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. * * @deprecated Please use plaintextPassword instead */ password?: pulumi.Input; /** * The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. */ plaintextPassword?: pulumi.Input; /** * An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. * * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html */ tlsOption?: pulumi.Input; /** * The name of the user. */ user?: pulumi.Input; } /** * The set of arguments for constructing a User resource. */ export interface UserArgs { /** * Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. */ authPlugin?: pulumi.Input; /** * The source host of the user. Defaults to "localhost". */ host?: pulumi.Input; /** * Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. * * @deprecated Please use plaintextPassword instead */ password?: pulumi.Input; /** * The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. */ plaintextPassword?: pulumi.Input; /** * An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. * * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html */ tlsOption?: pulumi.Input; /** * The name of the user. */ user: pulumi.Input; } //# sourceMappingURL=user.d.ts.map