@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
406 lines • 17.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Creates and manages Scaleway Redis™ clusters.
* For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/managed-database-redis).
*
* > **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";
*
* //## Basic Redis cluster creation
* const main = new scaleway.redis.Cluster("main", {
* name: "test_redis_basic",
* version: "6.2.7",
* nodeType: "RED1-MICRO",
* userName: "my_initial_user",
* password: "thiZ_is_v&ry_s3cret",
* tags: [
* "test",
* "redis",
* ],
* clusterSize: 1,
* tlsEnabled: true,
* acls: [{
* ip: "0.0.0.0/0",
* description: "Allow all",
* }],
* });
* ```
*
* ## Import
*
* Redis™ cluster can be imported using the `{zone}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:redis/cluster:Cluster main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Cluster extends pulumi.CustomResource {
/**
* Get an existing Cluster 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?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster;
/**
* Returns true if the given object is an instance of Cluster. 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 Cluster;
/**
* List of acl rules, this is cluster's authorized IPs. More details on the ACL section.
*/
readonly acls: pulumi.Output<outputs.redis.ClusterAcl[] | undefined>;
/**
* The PEM of the certificate used by redis, only when `tlsEnabled` is true
*/
readonly certificate: pulumi.Output<string>;
/**
* The number of nodes in the Redis™ cluster.
*
* > **Important:**
*
* - Cluster_size = 1 for Standalone mode (single node).
*
* - Cluster_size = 2 for High Availability (HA) mode, with 1 main node and 1 standby node.
*
* - Cluster_size >= 3 for Cluster mode, which requires a minimum of 1 main node and 2 secondary nodes.
*
* > **Important:** If you are using the cluster mode (>=3 nodes), you can set a bigger `clusterSize` than you initially
* did, it will migrate the Redis™ cluster but keep in mind that you cannot downgrade a Redis™ cluster, so setting a smaller
* `clusterSize` will destroy and recreate your cluster.
*
* > **Important:** If you are using the Standalone mode (1 node), setting a bigger `clusterSize` will destroy and
* recreate your cluster as you will be switching to the cluster mode.
*/
readonly clusterSize: pulumi.Output<number>;
/**
* Redis connection URI for the first reachable endpoint (public is preferred over private). Uses scheme `rediss` when TLS is enabled. Database index is always `0`. When a password is available in state, userinfo includes `userName` and the password (Redis ACL). When `passwordWo` is used, the password is omitted because it is not stored in state.
*/
readonly connectionString: pulumi.Output<string>;
/**
* The date and time of creation of the Redis™ cluster.
*/
readonly createdAt: pulumi.Output<string>;
/**
* The name of the Redis™ cluster.
*/
readonly name: pulumi.Output<string>;
/**
* The type of Redis™ cluster you want to create (e.g. `RED1-M`).
*
* > **Important:** Updates to `nodeType` will migrate the Redis™ cluster to the desired `nodeType`. Keep in mind that
* you cannot downgrade a Redis™ cluster.
*/
readonly nodeType: pulumi.Output<string>;
/**
* Password for the first user of the Redis™ cluster. 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 Redis™ cluster 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 list of private IPv4 addresses associated with the resource.
*/
readonly privateIps: pulumi.Output<outputs.redis.ClusterPrivateIp[]>;
/**
* Describes the Private Network you want to connect to your cluster. If not set, a public
* network will be provided. More details on the Private Network section
*/
readonly privateNetworks: pulumi.Output<outputs.redis.ClusterPrivateNetwork[] | undefined>;
/**
* `projectId`) The ID of the project the Redis™ cluster is
* associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* (Optional) Public network details. Only one of `privateNetwork` and `publicNetwork` may be set. The `publicNetwork` block exports:
*/
readonly publicNetwork: pulumi.Output<outputs.redis.ClusterPublicNetwork>;
/**
* Map of settings for Redis™ cluster. Available settings can be found by listing Redis™ versions
* with scaleway API or CLI
*/
readonly settings: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The tags associated with the Redis™ cluster.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Whether TLS is enabled or not.
*
* > The changes on `tlsEnabled` will force the resource creation.
*/
readonly tlsEnabled: pulumi.Output<boolean | undefined>;
/**
* The date and time of the last update of the Redis™ cluster.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Identifier for the first user of the Redis™ cluster.
*/
readonly userName: pulumi.Output<string>;
/**
* Redis™ cluster's version (e.g. `6.2.7`).
*
* > **Important:** Updates to `version` will migrate the Redis™ cluster to the desired `version`. Keep in mind that you
* cannot downgrade a Redis™ cluster.
*/
readonly version: pulumi.Output<string>;
/**
* `zone`) The zone in which the
* Redis™ cluster should be created.
*/
readonly zone: pulumi.Output<string | undefined>;
/**
* Create a Cluster 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: ClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Cluster resources.
*/
export interface ClusterState {
/**
* List of acl rules, this is cluster's authorized IPs. More details on the ACL section.
*/
acls?: pulumi.Input<pulumi.Input<inputs.redis.ClusterAcl>[] | undefined>;
/**
* The PEM of the certificate used by redis, only when `tlsEnabled` is true
*/
certificate?: pulumi.Input<string | undefined>;
/**
* The number of nodes in the Redis™ cluster.
*
* > **Important:**
*
* - Cluster_size = 1 for Standalone mode (single node).
*
* - Cluster_size = 2 for High Availability (HA) mode, with 1 main node and 1 standby node.
*
* - Cluster_size >= 3 for Cluster mode, which requires a minimum of 1 main node and 2 secondary nodes.
*
* > **Important:** If you are using the cluster mode (>=3 nodes), you can set a bigger `clusterSize` than you initially
* did, it will migrate the Redis™ cluster but keep in mind that you cannot downgrade a Redis™ cluster, so setting a smaller
* `clusterSize` will destroy and recreate your cluster.
*
* > **Important:** If you are using the Standalone mode (1 node), setting a bigger `clusterSize` will destroy and
* recreate your cluster as you will be switching to the cluster mode.
*/
clusterSize?: pulumi.Input<number | undefined>;
/**
* Redis connection URI for the first reachable endpoint (public is preferred over private). Uses scheme `rediss` when TLS is enabled. Database index is always `0`. When a password is available in state, userinfo includes `userName` and the password (Redis ACL). When `passwordWo` is used, the password is omitted because it is not stored in state.
*/
connectionString?: pulumi.Input<string | undefined>;
/**
* The date and time of creation of the Redis™ cluster.
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* The name of the Redis™ cluster.
*/
name?: pulumi.Input<string | undefined>;
/**
* The type of Redis™ cluster you want to create (e.g. `RED1-M`).
*
* > **Important:** Updates to `nodeType` will migrate the Redis™ cluster to the desired `nodeType`. Keep in mind that
* you cannot downgrade a Redis™ cluster.
*/
nodeType?: pulumi.Input<string | undefined>;
/**
* Password for the first user of the Redis™ cluster. 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 Redis™ cluster 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 list of private IPv4 addresses associated with the resource.
*/
privateIps?: pulumi.Input<pulumi.Input<inputs.redis.ClusterPrivateIp>[] | undefined>;
/**
* Describes the Private Network you want to connect to your cluster. If not set, a public
* network will be provided. More details on the Private Network section
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.redis.ClusterPrivateNetwork>[] | undefined>;
/**
* `projectId`) The ID of the project the Redis™ cluster is
* associated with.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* (Optional) Public network details. Only one of `privateNetwork` and `publicNetwork` may be set. The `publicNetwork` block exports:
*/
publicNetwork?: pulumi.Input<inputs.redis.ClusterPublicNetwork | undefined>;
/**
* Map of settings for Redis™ cluster. Available settings can be found by listing Redis™ versions
* with scaleway API or CLI
*/
settings?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The tags associated with the Redis™ cluster.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Whether TLS is enabled or not.
*
* > The changes on `tlsEnabled` will force the resource creation.
*/
tlsEnabled?: pulumi.Input<boolean | undefined>;
/**
* The date and time of the last update of the Redis™ cluster.
*/
updatedAt?: pulumi.Input<string | undefined>;
/**
* Identifier for the first user of the Redis™ cluster.
*/
userName?: pulumi.Input<string | undefined>;
/**
* Redis™ cluster's version (e.g. `6.2.7`).
*
* > **Important:** Updates to `version` will migrate the Redis™ cluster to the desired `version`. Keep in mind that you
* cannot downgrade a Redis™ cluster.
*/
version?: pulumi.Input<string | undefined>;
/**
* `zone`) The zone in which the
* Redis™ cluster should be created.
*/
zone?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Cluster resource.
*/
export interface ClusterArgs {
/**
* List of acl rules, this is cluster's authorized IPs. More details on the ACL section.
*/
acls?: pulumi.Input<pulumi.Input<inputs.redis.ClusterAcl>[] | undefined>;
/**
* The number of nodes in the Redis™ cluster.
*
* > **Important:**
*
* - Cluster_size = 1 for Standalone mode (single node).
*
* - Cluster_size = 2 for High Availability (HA) mode, with 1 main node and 1 standby node.
*
* - Cluster_size >= 3 for Cluster mode, which requires a minimum of 1 main node and 2 secondary nodes.
*
* > **Important:** If you are using the cluster mode (>=3 nodes), you can set a bigger `clusterSize` than you initially
* did, it will migrate the Redis™ cluster but keep in mind that you cannot downgrade a Redis™ cluster, so setting a smaller
* `clusterSize` will destroy and recreate your cluster.
*
* > **Important:** If you are using the Standalone mode (1 node), setting a bigger `clusterSize` will destroy and
* recreate your cluster as you will be switching to the cluster mode.
*/
clusterSize?: pulumi.Input<number | undefined>;
/**
* The name of the Redis™ cluster.
*/
name?: pulumi.Input<string | undefined>;
/**
* The type of Redis™ cluster you want to create (e.g. `RED1-M`).
*
* > **Important:** Updates to `nodeType` will migrate the Redis™ cluster to the desired `nodeType`. Keep in mind that
* you cannot downgrade a Redis™ cluster.
*/
nodeType: pulumi.Input<string>;
/**
* Password for the first user of the Redis™ cluster. 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 Redis™ cluster 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 list of private IPv4 addresses associated with the resource.
*/
privateIps?: pulumi.Input<pulumi.Input<inputs.redis.ClusterPrivateIp>[] | undefined>;
/**
* Describes the Private Network you want to connect to your cluster. If not set, a public
* network will be provided. More details on the Private Network section
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.redis.ClusterPrivateNetwork>[] | undefined>;
/**
* `projectId`) The ID of the project the Redis™ cluster is
* associated with.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* (Optional) Public network details. Only one of `privateNetwork` and `publicNetwork` may be set. The `publicNetwork` block exports:
*/
publicNetwork?: pulumi.Input<inputs.redis.ClusterPublicNetwork | undefined>;
/**
* Map of settings for Redis™ cluster. Available settings can be found by listing Redis™ versions
* with scaleway API or CLI
*/
settings?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The tags associated with the Redis™ cluster.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Whether TLS is enabled or not.
*
* > The changes on `tlsEnabled` will force the resource creation.
*/
tlsEnabled?: pulumi.Input<boolean | undefined>;
/**
* Identifier for the first user of the Redis™ cluster.
*/
userName: pulumi.Input<string>;
/**
* Redis™ cluster's version (e.g. `6.2.7`).
*
* > **Important:** Updates to `version` will migrate the Redis™ cluster to the desired `version`. Keep in mind that you
* cannot downgrade a Redis™ cluster.
*/
version: pulumi.Input<string>;
/**
* `zone`) The zone in which the
* Redis™ cluster should be created.
*/
zone?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=cluster.d.ts.map