import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
 * Creates and manages Scaleway Database Instances.
 * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/).
 *
 * > **Security Best Practice:**
 * For enhanced security, we recommend using the `passwordWo` write-only argument instead of the regular `password` argument. This ensures your sensitive credentials are never stored in Terraform state files, providing superior protection against accidental exposure. Write-Only arguments are supported in Terraform 1.11.0 and later.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as scaleway from "@pulumiverse/scaleway";
 *
 * //## Example Basic
 * const main = new scaleway.databases.Instance("main", {
 *     name: "test-rdb",
 *     nodeType: "DB-DEV-S",
 *     engine: "PostgreSQL-15",
 *     isHaCluster: true,
 *     disableBackup: true,
 *     userName: "my_initial_user",
 *     password: "thiZ_is_v&ry_s3cret",
 *     encryptionAtRest: true,
 * });
 * ```
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as scaleway from "@pulumiverse/scaleway";
 *
 * //## Example Engine Upgrade
 * // Initial creation with PostgreSQL 14
 * const main = new scaleway.databases.Instance("main", {
 *     name: "my-database",
 *     nodeType: "DB-DEV-S",
 *     engine: "PostgreSQL-14",
 *     isHaCluster: false,
 *     disableBackup: true,
 *     userName: "my_user",
 *     password: "thiZ_is_v&ry_s3cret",
 * });
 * export const upgradableVersions = main.upgradableVersions;
 * ```
 *
 * ## Import
 *
 * Database Instance can be imported using the `{region}/{id}`, e.g.
 *
 * ```sh
 * $ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 fr-par/11111111-1111-1111-1111-111111111111
 * ```
 *
 * @deprecated scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance
 */
export declare class DatabaseInstance extends pulumi.CustomResource {
    /**
     * Get an existing DatabaseInstance 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?: DatabaseInstanceState, opts?: pulumi.CustomResourceOptions): DatabaseInstance;
    /**
     * Returns true if the given object is an instance of DatabaseInstance.  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 DatabaseInstance;
    /**
     * Boolean to store logical backups in the same region as the database instance
     */
    readonly backupSameRegion: pulumi.Output<boolean>;
    /**
     * Backup schedule frequency in hours
     */
    readonly backupScheduleFrequency: pulumi.Output<number>;
    /**
     * Backup schedule retention in days
     */
    readonly backupScheduleRetention: pulumi.Output<number>;
    /**
     * Certificate of the Database Instance.
     */
    readonly certificate: pulumi.Output<string>;
    /**
     * Disable automated backup for the database instance
     */
    readonly disableBackup: pulumi.Output<boolean | undefined>;
    /**
     * Enable or disable encryption at rest for the Database Instance.
     */
    readonly encryptionAtRest: pulumi.Output<boolean | undefined>;
    /**
     * (Deprecated) The IP of the Database Instance. Please use the privateNetwork or the loadBalancer attribute.
     *
     * @deprecated Please use the privateNetwork or the loadBalancer attribute
     */
    readonly endpointIp: pulumi.Output<string>;
    /**
     * (Deprecated) The port of the Database Instance. Please use the privateNetwork or the loadBalancer attribute.
     *
     * @deprecated Please use the privateNetwork or the loadBalancer attribute
     */
    readonly endpointPort: pulumi.Output<number>;
    /**
     * Database Instance's engine version name (e.g. `PostgreSQL-16`, `MySQL-8`).
     *
     * > **Warning** Provider versions prior to `2.61.0` did not support engine upgrades. Changing the `engine` value in these versions would recreate the Database Instance **empty**, resulting in **data loss**. Ensure you are using provider version `>= 2.61.0` before upgrading your Database Instance engine version.
     *
     * > **Important** Updates to `engine` will perform a blue/green upgrade using `MajorUpgradeWorkflow`. This creates a new instance from a snapshot, migrates endpoints automatically, and updates the Terraform state with the new instance ID. The upgrade ensures minimal downtime but **any writes between the snapshot and the endpoint migration will be lost**. Use the `upgradableVersions` computed attribute to check available versions for upgrade.
     *
     * > **Note** The provider copies instance-level data managed outside `scaleway.databases.Instance`, such as ACL rules, to the upgraded instance during the engine upgrade. However, Terraform plans dependent resources before the blue/green upgrade returns the new instance ID. As a result, resources that reference the previous instance ID, such as `scaleway.databases.Acl`, may require a second `pulumi up` to fully reconcile their Terraform state with the upgraded instance.
     */
    readonly engine: pulumi.Output<string>;
    /**
     * Map of engine settings to be set at database initialisation.
     */
    readonly initSettings: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * Enable or disable high availability for the Database Instance.
     *
     * > **Important** Updates to `isHaCluster` will recreate the Database Instance.
     */
    readonly isHaCluster: pulumi.Output<boolean | undefined>;
    /**
     * List of Load Balancer endpoints of the Database Instance.
     */
    readonly loadBalancer: pulumi.Output<outputs.DatabaseInstanceLoadBalancer>;
    /**
     * Logs policy configuration
     */
    readonly logsPolicy: pulumi.Output<outputs.DatabaseInstanceLogsPolicy>;
    /**
     * List of scheduled maintenance events on the Database Instance.
     */
    readonly maintenances: pulumi.Output<outputs.DatabaseInstanceMaintenance[]>;
    /**
     * The name of the Database Instance.
     */
    readonly name: pulumi.Output<string>;
    /**
     * The type of Database Instance you want to create (e.g. `db-dev-s`).
     *
     * > **Important** Updates to `nodeType` will upgrade the Database Instance to the desired `nodeType` without any
     * interruption.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, if you are using `lssd` storage, you should upgrade the `nodeType`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
     */
    readonly nodeType: pulumi.Output<string>;
    /**
     * The organization ID the Database Instance is associated with.
     */
    readonly organizationId: pulumi.Output<string>;
    /**
     * Password for the first user of the Database Instance. Only one of `password` or `passwordWo` should be specified.
     */
    readonly password: pulumi.Output<string | undefined>;
    /**
     * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
     * Password for the first user of the Database Instance in write-only mode. Only one of `password` or `passwordWo` should be specified. `passwordWo` will not be set in the Terraform state. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    readonly passwordWo: pulumi.Output<string | undefined>;
    /**
     * The version of the write-only password. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    readonly passwordWoVersion: pulumi.Output<number | undefined>;
    /**
     * The private IPv4 address associated with the resource.
     */
    readonly privateIps: pulumi.Output<outputs.DatabaseInstancePrivateIp[]>;
    /**
     * List of Private Networks endpoints of the Database Instance.
     */
    readonly privateNetwork: pulumi.Output<outputs.DatabaseInstancePrivateNetwork | undefined>;
    /**
     * `projectId`) The ID of the project the Database
     * Instance is associated with.
     */
    readonly projectId: pulumi.Output<string>;
    /**
     * List of read replicas of the Database Instance.
     */
    readonly readReplicas: pulumi.Output<outputs.DatabaseInstanceReadReplica[]>;
    /**
     * `region`) The region
     * in which the Database Instance should be created.
     */
    readonly region: pulumi.Output<string | undefined>;
    /**
     * Map of engine settings to be set on a running instance.
     */
    readonly settings: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
     */
    readonly snapshotId: pulumi.Output<string | undefined>;
    /**
     * The tags associated with the Database Instance.
     */
    readonly tags: pulumi.Output<string[] | undefined>;
    /**
     * List of available engine versions for upgrade. Each version contains:
     */
    readonly upgradableVersions: pulumi.Output<outputs.DatabaseInstanceUpgradableVersion[]>;
    /**
     * Identifier for the first user of the Database Instance.
     *
     * > **Important** Updates to `userName` will recreate the Database Instance.
     */
    readonly userName: pulumi.Output<string>;
    /**
     * Volume size (in GB). Cannot be used when `volumeType` is set to `lssd`.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, you should increase the volume size before making any other change to your Database Instance.
     */
    readonly volumeSizeInGb: pulumi.Output<number>;
    /**
     * Type of volume where data are stored (`lssd`, `sbs5k` or `sbs15k`).
     */
    readonly volumeType: pulumi.Output<string | undefined>;
    /**
     * Create a DatabaseInstance 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.
     */
    /** @deprecated scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance */
    constructor(name: string, args: DatabaseInstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering DatabaseInstance resources.
 */
export interface DatabaseInstanceState {
    /**
     * Boolean to store logical backups in the same region as the database instance
     */
    backupSameRegion?: pulumi.Input<boolean | undefined>;
    /**
     * Backup schedule frequency in hours
     */
    backupScheduleFrequency?: pulumi.Input<number | undefined>;
    /**
     * Backup schedule retention in days
     */
    backupScheduleRetention?: pulumi.Input<number | undefined>;
    /**
     * Certificate of the Database Instance.
     */
    certificate?: pulumi.Input<string | undefined>;
    /**
     * Disable automated backup for the database instance
     */
    disableBackup?: pulumi.Input<boolean | undefined>;
    /**
     * Enable or disable encryption at rest for the Database Instance.
     */
    encryptionAtRest?: pulumi.Input<boolean | undefined>;
    /**
     * (Deprecated) The IP of the Database Instance. Please use the privateNetwork or the loadBalancer attribute.
     *
     * @deprecated Please use the privateNetwork or the loadBalancer attribute
     */
    endpointIp?: pulumi.Input<string | undefined>;
    /**
     * (Deprecated) The port of the Database Instance. Please use the privateNetwork or the loadBalancer attribute.
     *
     * @deprecated Please use the privateNetwork or the loadBalancer attribute
     */
    endpointPort?: pulumi.Input<number | undefined>;
    /**
     * Database Instance's engine version name (e.g. `PostgreSQL-16`, `MySQL-8`).
     *
     * > **Warning** Provider versions prior to `2.61.0` did not support engine upgrades. Changing the `engine` value in these versions would recreate the Database Instance **empty**, resulting in **data loss**. Ensure you are using provider version `>= 2.61.0` before upgrading your Database Instance engine version.
     *
     * > **Important** Updates to `engine` will perform a blue/green upgrade using `MajorUpgradeWorkflow`. This creates a new instance from a snapshot, migrates endpoints automatically, and updates the Terraform state with the new instance ID. The upgrade ensures minimal downtime but **any writes between the snapshot and the endpoint migration will be lost**. Use the `upgradableVersions` computed attribute to check available versions for upgrade.
     *
     * > **Note** The provider copies instance-level data managed outside `scaleway.databases.Instance`, such as ACL rules, to the upgraded instance during the engine upgrade. However, Terraform plans dependent resources before the blue/green upgrade returns the new instance ID. As a result, resources that reference the previous instance ID, such as `scaleway.databases.Acl`, may require a second `pulumi up` to fully reconcile their Terraform state with the upgraded instance.
     */
    engine?: pulumi.Input<string | undefined>;
    /**
     * Map of engine settings to be set at database initialisation.
     */
    initSettings?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * Enable or disable high availability for the Database Instance.
     *
     * > **Important** Updates to `isHaCluster` will recreate the Database Instance.
     */
    isHaCluster?: pulumi.Input<boolean | undefined>;
    /**
     * List of Load Balancer endpoints of the Database Instance.
     */
    loadBalancer?: pulumi.Input<inputs.DatabaseInstanceLoadBalancer | undefined>;
    /**
     * Logs policy configuration
     */
    logsPolicy?: pulumi.Input<inputs.DatabaseInstanceLogsPolicy | undefined>;
    /**
     * List of scheduled maintenance events on the Database Instance.
     */
    maintenances?: pulumi.Input<pulumi.Input<inputs.DatabaseInstanceMaintenance>[] | undefined>;
    /**
     * The name of the Database Instance.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The type of Database Instance you want to create (e.g. `db-dev-s`).
     *
     * > **Important** Updates to `nodeType` will upgrade the Database Instance to the desired `nodeType` without any
     * interruption.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, if you are using `lssd` storage, you should upgrade the `nodeType`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
     */
    nodeType?: pulumi.Input<string | undefined>;
    /**
     * The organization ID the Database Instance is associated with.
     */
    organizationId?: pulumi.Input<string | undefined>;
    /**
     * Password for the first user of the Database Instance. Only one of `password` or `passwordWo` should be specified.
     */
    password?: pulumi.Input<string | undefined>;
    /**
     * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
     * Password for the first user of the Database Instance in write-only mode. Only one of `password` or `passwordWo` should be specified. `passwordWo` will not be set in the Terraform state. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    passwordWo?: pulumi.Input<string | undefined>;
    /**
     * The version of the write-only password. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    passwordWoVersion?: pulumi.Input<number | undefined>;
    /**
     * The private IPv4 address associated with the resource.
     */
    privateIps?: pulumi.Input<pulumi.Input<inputs.DatabaseInstancePrivateIp>[] | undefined>;
    /**
     * List of Private Networks endpoints of the Database Instance.
     */
    privateNetwork?: pulumi.Input<inputs.DatabaseInstancePrivateNetwork | undefined>;
    /**
     * `projectId`) The ID of the project the Database
     * Instance is associated with.
     */
    projectId?: pulumi.Input<string | undefined>;
    /**
     * List of read replicas of the Database Instance.
     */
    readReplicas?: pulumi.Input<pulumi.Input<inputs.DatabaseInstanceReadReplica>[] | undefined>;
    /**
     * `region`) The region
     * in which the Database Instance should be created.
     */
    region?: pulumi.Input<string | undefined>;
    /**
     * Map of engine settings to be set on a running instance.
     */
    settings?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
     */
    snapshotId?: pulumi.Input<string | undefined>;
    /**
     * The tags associated with the Database Instance.
     */
    tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
    /**
     * List of available engine versions for upgrade. Each version contains:
     */
    upgradableVersions?: pulumi.Input<pulumi.Input<inputs.DatabaseInstanceUpgradableVersion>[] | undefined>;
    /**
     * Identifier for the first user of the Database Instance.
     *
     * > **Important** Updates to `userName` will recreate the Database Instance.
     */
    userName?: pulumi.Input<string | undefined>;
    /**
     * Volume size (in GB). Cannot be used when `volumeType` is set to `lssd`.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, you should increase the volume size before making any other change to your Database Instance.
     */
    volumeSizeInGb?: pulumi.Input<number | undefined>;
    /**
     * Type of volume where data are stored (`lssd`, `sbs5k` or `sbs15k`).
     */
    volumeType?: pulumi.Input<string | undefined>;
}
/**
 * The set of arguments for constructing a DatabaseInstance resource.
 */
export interface DatabaseInstanceArgs {
    /**
     * Boolean to store logical backups in the same region as the database instance
     */
    backupSameRegion?: pulumi.Input<boolean | undefined>;
    /**
     * Backup schedule frequency in hours
     */
    backupScheduleFrequency?: pulumi.Input<number | undefined>;
    /**
     * Backup schedule retention in days
     */
    backupScheduleRetention?: pulumi.Input<number | undefined>;
    /**
     * Disable automated backup for the database instance
     */
    disableBackup?: pulumi.Input<boolean | undefined>;
    /**
     * Enable or disable encryption at rest for the Database Instance.
     */
    encryptionAtRest?: pulumi.Input<boolean | undefined>;
    /**
     * Database Instance's engine version name (e.g. `PostgreSQL-16`, `MySQL-8`).
     *
     * > **Warning** Provider versions prior to `2.61.0` did not support engine upgrades. Changing the `engine` value in these versions would recreate the Database Instance **empty**, resulting in **data loss**. Ensure you are using provider version `>= 2.61.0` before upgrading your Database Instance engine version.
     *
     * > **Important** Updates to `engine` will perform a blue/green upgrade using `MajorUpgradeWorkflow`. This creates a new instance from a snapshot, migrates endpoints automatically, and updates the Terraform state with the new instance ID. The upgrade ensures minimal downtime but **any writes between the snapshot and the endpoint migration will be lost**. Use the `upgradableVersions` computed attribute to check available versions for upgrade.
     *
     * > **Note** The provider copies instance-level data managed outside `scaleway.databases.Instance`, such as ACL rules, to the upgraded instance during the engine upgrade. However, Terraform plans dependent resources before the blue/green upgrade returns the new instance ID. As a result, resources that reference the previous instance ID, such as `scaleway.databases.Acl`, may require a second `pulumi up` to fully reconcile their Terraform state with the upgraded instance.
     */
    engine?: pulumi.Input<string | undefined>;
    /**
     * Map of engine settings to be set at database initialisation.
     */
    initSettings?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * Enable or disable high availability for the Database Instance.
     *
     * > **Important** Updates to `isHaCluster` will recreate the Database Instance.
     */
    isHaCluster?: pulumi.Input<boolean | undefined>;
    /**
     * List of Load Balancer endpoints of the Database Instance.
     */
    loadBalancer?: pulumi.Input<inputs.DatabaseInstanceLoadBalancer | undefined>;
    /**
     * Logs policy configuration
     */
    logsPolicy?: pulumi.Input<inputs.DatabaseInstanceLogsPolicy | undefined>;
    /**
     * The name of the Database Instance.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The type of Database Instance you want to create (e.g. `db-dev-s`).
     *
     * > **Important** Updates to `nodeType` will upgrade the Database Instance to the desired `nodeType` without any
     * interruption.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, if you are using `lssd` storage, you should upgrade the `nodeType`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
     */
    nodeType: pulumi.Input<string>;
    /**
     * Password for the first user of the Database Instance. Only one of `password` or `passwordWo` should be specified.
     */
    password?: pulumi.Input<string | undefined>;
    /**
     * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
     * Password for the first user of the Database Instance in write-only mode. Only one of `password` or `passwordWo` should be specified. `passwordWo` will not be set in the Terraform state. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    passwordWo?: pulumi.Input<string | undefined>;
    /**
     * The version of the write-only password. To update the `passwordWo`, you must also update the `passwordWoVersion`.
     */
    passwordWoVersion?: pulumi.Input<number | undefined>;
    /**
     * The private IPv4 address associated with the resource.
     */
    privateIps?: pulumi.Input<pulumi.Input<inputs.DatabaseInstancePrivateIp>[] | undefined>;
    /**
     * List of Private Networks endpoints of the Database Instance.
     */
    privateNetwork?: pulumi.Input<inputs.DatabaseInstancePrivateNetwork | undefined>;
    /**
     * `projectId`) The ID of the project the Database
     * Instance is associated with.
     */
    projectId?: pulumi.Input<string | undefined>;
    /**
     * `region`) The region
     * in which the Database Instance should be created.
     */
    region?: pulumi.Input<string | undefined>;
    /**
     * Map of engine settings to be set on a running instance.
     */
    settings?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * The ID of an existing snapshot to restore or create the Database Instance from. Conflicts with the `engine` parameter and backup settings.
     */
    snapshotId?: pulumi.Input<string | undefined>;
    /**
     * The tags associated with the Database Instance.
     */
    tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
    /**
     * Identifier for the first user of the Database Instance.
     *
     * > **Important** Updates to `userName` will recreate the Database Instance.
     */
    userName?: pulumi.Input<string | undefined>;
    /**
     * Volume size (in GB). Cannot be used when `volumeType` is set to `lssd`.
     *
     * > **Important** Once your Database Instance reaches `diskFull` status, you should increase the volume size before making any other change to your Database Instance.
     */
    volumeSizeInGb?: pulumi.Input<number | undefined>;
    /**
     * Type of volume where data are stored (`lssd`, `sbs5k` or `sbs15k`).
     */
    volumeType?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=databaseInstance.d.ts.map