@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
141 lines (140 loc) • 4.51 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway Database DocumentDB Users.
* For more information, see [the documentation](https://www.scaleway.com/en/developers/api/document_db/).
*
* ## 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.DocumentdbUser("dbAdmin", {
* instanceId: "11111111-1111-1111-1111-111111111111",
* 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/documentdbUser:DocumentdbUser admin fr-par/11111111-1111-1111-1111-111111111111/admin
* ```
*/
export declare class DocumentdbUser extends pulumi.CustomResource {
/**
* Get an existing DocumentdbUser 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?: DocumentdbUserState, opts?: pulumi.CustomResourceOptions): DocumentdbUser;
/**
* Returns true if the given object is an instance of DocumentdbUser. 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 DocumentdbUser;
/**
* UUID of the documentDB 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 Username.
*
* > **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 DocumentdbUser 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: DocumentdbUserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DocumentdbUser resources.
*/
export interface DocumentdbUserState {
/**
* UUID of the documentDB 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 Username.
*
* > **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 DocumentdbUser resource.
*/
export interface DocumentdbUserArgs {
/**
* UUID of the documentDB 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 Username.
*
* > **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>;
}