import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Creates and manages Read Replicas. * For more information refer to [the API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const instance = new scaleway.RdbInstance("instance", { * nodeType: "db-dev-s", * engine: "PostgreSQL-14", * isHaCluster: false, * disableBackup: true, * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * tags: [ * "terraform-test", * "scaleway_rdb_read_replica", * "minimal", * ], * }); * const replica = new scaleway.RdbReadReplica("replica", { * instanceId: instance.id, * directAccess: {}, * }); * ``` * * ### Private network with static endpoint * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const instance = new scaleway.RdbInstance("instance", { * nodeType: "db-dev-s", * engine: "PostgreSQL-14", * isHaCluster: false, * disableBackup: true, * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * }); * const pn = new scaleway.VpcPrivateNetwork("pn", {}); * const replica = new scaleway.RdbReadReplica("replica", { * instanceId: instance.id, * privateNetwork: { * privateNetworkId: pn.id, * serviceIp: "192.168.1.254/24", * }, * }); * ``` * * ### Private network with IPAM * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const instance = new scaleway.RdbInstance("instance", { * nodeType: "db-dev-s", * engine: "PostgreSQL-14", * isHaCluster: false, * disableBackup: true, * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * }); * const pn = new scaleway.VpcPrivateNetwork("pn", {}); * const replica = new scaleway.RdbReadReplica("replica", { * instanceId: instance.id, * privateNetwork: { * privateNetworkId: pn.id, * enableIpam: true, * }, * }); * ``` * * ## Import * * Read Replicas can be imported using the `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/rdbReadReplica:RdbReadReplica rr fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class RdbReadReplica extends pulumi.CustomResource { /** * Get an existing RdbReadReplica 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?: RdbReadReplicaState, opts?: pulumi.CustomResourceOptions): RdbReadReplica; /** * Returns true if the given object is an instance of RdbReadReplica. 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 RdbReadReplica; /** * Creates a direct access endpoint to rdb replica. */ readonly directAccess: pulumi.Output; /** * UUID of the rdb instance. * * > **Important:** The replica musts contains at least one `directAccess` or `privateNetwork`. It can contain both. */ readonly instanceId: pulumi.Output; /** * Create an endpoint in a Private Netork. */ readonly privateNetwork: pulumi.Output; /** * `region`) The region * in which the Read Replica should be created. */ readonly region: pulumi.Output; /** * Defines whether to create the replica in the same availability zone as the main instance nodes or not. */ readonly sameZone: pulumi.Output; /** * Create a RdbReadReplica 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: RdbReadReplicaArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RdbReadReplica resources. */ export interface RdbReadReplicaState { /** * Creates a direct access endpoint to rdb replica. */ directAccess?: pulumi.Input; /** * UUID of the rdb instance. * * > **Important:** The replica musts contains at least one `directAccess` or `privateNetwork`. It can contain both. */ instanceId?: pulumi.Input; /** * Create an endpoint in a Private Netork. */ privateNetwork?: pulumi.Input; /** * `region`) The region * in which the Read Replica should be created. */ region?: pulumi.Input; /** * Defines whether to create the replica in the same availability zone as the main instance nodes or not. */ sameZone?: pulumi.Input; } /** * The set of arguments for constructing a RdbReadReplica resource. */ export interface RdbReadReplicaArgs { /** * Creates a direct access endpoint to rdb replica. */ directAccess?: pulumi.Input; /** * UUID of the rdb instance. * * > **Important:** The replica musts contains at least one `directAccess` or `privateNetwork`. It can contain both. */ instanceId: pulumi.Input; /** * Create an endpoint in a Private Netork. */ privateNetwork?: pulumi.Input; /** * `region`) The region * in which the Read Replica should be created. */ region?: pulumi.Input; /** * Defines whether to create the replica in the same availability zone as the main instance nodes or not. */ sameZone?: pulumi.Input; }