UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

419 lines (418 loc) 15.5 kB
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 refer to the [API documentation](https://www.scaleway.com/en/developers/api/managed-database-redis). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * 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", * }], * }); * ``` * * ### With settings * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * 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", * settings: { * maxclients: "1000", * "tcp-keepalive": "120", * }, * }); * ``` * * ### With a Private Network * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const pn = new scaleway.network.PrivateNetwork("pn", {name: "private-network"}); * const main = new scaleway.redis.Cluster("main", { * name: "test_redis_endpoints", * version: "6.2.7", * nodeType: "RED1-MICRO", * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * clusterSize: 1, * privateNetworks: [{ * id: pn.id, * serviceIps: ["10.12.1.1/20"], * }], * }, { * dependsOn: [pn], * }); * ``` * * ## Import * * Redis™ cluster can be imported using the `{zone}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/redisCluster:RedisCluster main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster */ export declare class RedisCluster extends pulumi.CustomResource { /** * Get an existing RedisCluster 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?: RedisClusterState, opts?: pulumi.CustomResourceOptions): RedisCluster; /** * Returns true if the given object is an instance of RedisCluster. 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 RedisCluster; /** * List of acl rules, this is cluster's authorized IPs. More details on the ACL section. */ readonly acls: pulumi.Output<outputs.RedisClusterAcl[] | 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>; /** * 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. */ readonly password: pulumi.Output<string>; /** * The list of private IPv4 addresses associated with the resource. */ readonly privateIps: pulumi.Output<outputs.RedisClusterPrivateIp[]>; /** * 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.RedisClusterPrivateNetwork[] | 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.RedisClusterPublicNetwork>; /** * 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>; /** * Create a RedisCluster 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/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster */ constructor(name: string, args: RedisClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RedisCluster resources. */ export interface RedisClusterState { /** * List of acl rules, this is cluster's authorized IPs. More details on the ACL section. */ acls?: pulumi.Input<pulumi.Input<inputs.RedisClusterAcl>[]>; /** * The PEM of the certificate used by redis, only when `tlsEnabled` is true */ certificate?: pulumi.Input<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. */ clusterSize?: pulumi.Input<number>; /** * The date and time of creation of the Redis™ cluster. */ createdAt?: pulumi.Input<string>; /** * The name of the Redis™ cluster. */ name?: pulumi.Input<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. */ nodeType?: pulumi.Input<string>; /** * Password for the first user of the Redis™ cluster. */ password?: pulumi.Input<string>; /** * The list of private IPv4 addresses associated with the resource. */ privateIps?: pulumi.Input<pulumi.Input<inputs.RedisClusterPrivateIp>[]>; /** * 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.RedisClusterPrivateNetwork>[]>; /** * `projectId`) The ID of the project the Redis™ cluster is * associated with. */ projectId?: pulumi.Input<string>; /** * (Optional) Public network details. Only one of `privateNetwork` and `publicNetwork` may be set. * > The `publicNetwork` block exports: */ publicNetwork?: pulumi.Input<inputs.RedisClusterPublicNetwork>; /** * 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>; }>; /** * The tags associated with the Redis™ cluster. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether TLS is enabled or not. * * > The changes on `tlsEnabled` will force the resource creation. */ tlsEnabled?: pulumi.Input<boolean>; /** * The date and time of the last update of the Redis™ cluster. */ updatedAt?: pulumi.Input<string>; /** * 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>; } /** * The set of arguments for constructing a RedisCluster resource. */ export interface RedisClusterArgs { /** * List of acl rules, this is cluster's authorized IPs. More details on the ACL section. */ acls?: pulumi.Input<pulumi.Input<inputs.RedisClusterAcl>[]>; /** * 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>; /** * The name of the Redis™ cluster. */ name?: pulumi.Input<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. */ nodeType: pulumi.Input<string>; /** * Password for the first user of the Redis™ cluster. */ password: pulumi.Input<string>; /** * The list of private IPv4 addresses associated with the resource. */ privateIps?: pulumi.Input<pulumi.Input<inputs.RedisClusterPrivateIp>[]>; /** * 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.RedisClusterPrivateNetwork>[]>; /** * `projectId`) The ID of the project the Redis™ cluster is * associated with. */ projectId?: pulumi.Input<string>; /** * (Optional) Public network details. Only one of `privateNetwork` and `publicNetwork` may be set. * > The `publicNetwork` block exports: */ publicNetwork?: pulumi.Input<inputs.RedisClusterPublicNetwork>; /** * 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>; }>; /** * The tags associated with the Redis™ cluster. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether TLS is enabled or not. * * > The changes on `tlsEnabled` will force the resource creation. */ tlsEnabled?: pulumi.Input<boolean>; /** * 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>; }