UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

141 lines (140 loc) 4.44 kB
import * as pulumi from "@pulumi/pulumi"; /** * Creates and manages Scaleway Database Users. * For more information, see [the documentation](https://developers.scaleway.com/en/products/rdb/api). * * ## Examples * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as random from "@pulumi/random"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const dbPassword = new random.RandomPassword("dbPassword", { * length: 16, * special: true, * }); * const dbAdmin = new scaleway.DatabaseUser("dbAdmin", { * instanceId: scaleway_rdb_instance.main.id, * password: dbPassword.result, * isAdmin: true, * }); * ``` * * ## Import * * Database User can be imported using `{region}/{instance_id}/{user_name}`, e.g. bash * * ```sh * $ pulumi import scaleway:index/databaseUser:DatabaseUser admin fr-par/11111111-1111-1111-1111-111111111111/admin * ``` */ export declare class DatabaseUser extends pulumi.CustomResource { /** * Get an existing DatabaseUser 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?: DatabaseUserState, opts?: pulumi.CustomResourceOptions): DatabaseUser; /** * Returns true if the given object is an instance of DatabaseUser. 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 DatabaseUser; /** * UUID of the rdb instance. * * > **Important:** Updates to `instanceId` will recreate the Database User. */ readonly instanceId: pulumi.Output<string>; /** * Grant admin permissions to the Database User. */ readonly isAdmin: pulumi.Output<boolean | undefined>; /** * Database User name. * * > **Important:** Updates to `name` will recreate the Database User. */ readonly name: pulumi.Output<string>; /** * Database User password. */ readonly password: pulumi.Output<string>; /** * The Scaleway region this resource resides in. */ readonly region: pulumi.Output<string>; /** * Create a DatabaseUser 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: DatabaseUserArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DatabaseUser resources. */ export interface DatabaseUserState { /** * UUID of the rdb instance. * * > **Important:** Updates to `instanceId` will recreate the Database User. */ instanceId?: pulumi.Input<string>; /** * Grant admin permissions to the Database User. */ isAdmin?: pulumi.Input<boolean>; /** * Database User name. * * > **Important:** Updates to `name` will recreate the Database User. */ name?: pulumi.Input<string>; /** * Database User password. */ password?: pulumi.Input<string>; /** * The Scaleway region this resource resides in. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a DatabaseUser resource. */ export interface DatabaseUserArgs { /** * UUID of the rdb instance. * * > **Important:** Updates to `instanceId` will recreate the Database User. */ instanceId: pulumi.Input<string>; /** * Grant admin permissions to the Database User. */ isAdmin?: pulumi.Input<boolean>; /** * Database User name. * * > **Important:** Updates to `name` will recreate the Database User. */ name?: pulumi.Input<string>; /** * Database User password. */ password: pulumi.Input<string>; /** * The Scaleway region this resource resides in. */ region?: pulumi.Input<string>; }