@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
335 lines (334 loc) • 11.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "./types";
/**
* Manages a Redis cluster within the Yandex.Cloud. For more information, see
* [the official documentation](https://cloud.yandex.com/docs/managed-redis/concepts).
*
* ## Example Usage
*
* Example of creating a Standalone Redis.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const fooVpcNetwork = new yandex.VpcNetwork("foo", {});
* const fooVpcSubnet = new yandex.VpcSubnet("foo", {
* networkId: fooVpcNetwork.id,
* v4CidrBlocks: ["10.5.0.0/24"],
* zone: "ru-central1-a",
* });
* const fooMdbRedisCluster = new yandex.MdbRedisCluster("foo", {
* config: {
* password: "your_password",
* version: "6.0",
* },
* environment: "PRESTABLE",
* hosts: [{
* subnetId: fooVpcSubnet.id,
* zone: "ru-central1-a",
* }],
* maintenanceWindow: {
* type: "ANYTIME",
* },
* networkId: fooVpcNetwork.id,
* resources: {
* diskSize: 16,
* resourcePresetId: "hm1.nano",
* },
* });
* ```
*
* Example of creating a sharded Redis Cluster.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const fooVpcNetwork = new yandex.VpcNetwork("foo", {});
* const fooVpcSubnet = new yandex.VpcSubnet("foo", {
* networkId: fooVpcNetwork.id,
* v4CidrBlocks: ["10.1.0.0/24"],
* zone: "ru-central1-a",
* });
* const bar = new yandex.VpcSubnet("bar", {
* networkId: fooVpcNetwork.id,
* v4CidrBlocks: ["10.2.0.0/24"],
* zone: "ru-central1-b",
* });
* const baz = new yandex.VpcSubnet("baz", {
* networkId: fooVpcNetwork.id,
* v4CidrBlocks: ["10.3.0.0/24"],
* zone: "ru-central1-c",
* });
* const fooMdbRedisCluster = new yandex.MdbRedisCluster("foo", {
* config: {
* password: "your_password",
* version: "6.0",
* },
* environment: "PRESTABLE",
* hosts: [
* {
* shardName: "first",
* subnetId: fooVpcSubnet.id,
* zone: "ru-central1-a",
* },
* {
* shardName: "second",
* subnetId: bar.id,
* zone: "ru-central1-b",
* },
* {
* shardName: "third",
* subnetId: baz.id,
* zone: "ru-central1-c",
* },
* ],
* networkId: fooVpcNetwork.id,
* resources: {
* diskSize: 16,
* resourcePresetId: "hm1.nano",
* },
* sharded: true,
* });
* ```
*
* ## Import
*
* A cluster can be imported using the `id` of the resource, e.g.
*
* ```sh
* $ pulumi import yandex:index/mdbRedisCluster:MdbRedisCluster foo cluster_id
* ```
*/
export declare class MdbRedisCluster extends pulumi.CustomResource {
/**
* Get an existing MdbRedisCluster 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?: MdbRedisClusterState, opts?: pulumi.CustomResourceOptions): MdbRedisCluster;
/**
* Returns true if the given object is an instance of MdbRedisCluster. 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 MdbRedisCluster;
/**
* Configuration of the Redis cluster. The structure is documented below.
*/
readonly config: pulumi.Output<outputs.MdbRedisClusterConfig>;
/**
* Creation timestamp of the key.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Inhibits deletion of the cluster. Can be either `true` or `false`.
*/
readonly deletionProtection: pulumi.Output<boolean>;
/**
* Description of the Redis cluster.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Deployment environment of the Redis cluster. Can be either `PRESTABLE` or `PRODUCTION`.
*/
readonly environment: pulumi.Output<string>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
readonly folderId: pulumi.Output<string>;
/**
* Aggregated health of the cluster. Can be either `ALIVE`, `DEGRADED`, `DEAD` or `HEALTH_UNKNOWN`.
* For more information see `health` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-redis/api-ref/Cluster/).
*/
readonly health: pulumi.Output<string>;
/**
* A host of the Redis cluster. The structure is documented below.
*/
readonly hosts: pulumi.Output<outputs.MdbRedisClusterHost[]>;
/**
* A set of key/value label pairs to assign to the Redis cluster.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
readonly maintenanceWindow: pulumi.Output<outputs.MdbRedisClusterMaintenanceWindow>;
/**
* Name of the Redis cluster. Provided by the client when the cluster is created.
*/
readonly name: pulumi.Output<string>;
/**
* ID of the network, to which the Redis cluster belongs.
*/
readonly networkId: pulumi.Output<string>;
/**
* Resources allocated to hosts of the Redis cluster. The structure is documented below.
*/
readonly resources: pulumi.Output<outputs.MdbRedisClusterResources>;
/**
* A set of ids of security groups assigned to hosts of the cluster.
*/
readonly securityGroupIds: pulumi.Output<string[] | undefined>;
/**
* Redis Cluster mode enabled/disabled.
*/
readonly sharded: pulumi.Output<boolean | undefined>;
/**
* Status of the cluster. Can be either `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`.
* For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-redis/api-ref/Cluster/).
*/
readonly status: pulumi.Output<string>;
/**
* tls support mode enabled/disabled.
*/
readonly tlsEnabled: pulumi.Output<boolean>;
/**
* Create a MdbRedisCluster 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: MdbRedisClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MdbRedisCluster resources.
*/
export interface MdbRedisClusterState {
/**
* Configuration of the Redis cluster. The structure is documented below.
*/
config?: pulumi.Input<inputs.MdbRedisClusterConfig>;
/**
* Creation timestamp of the key.
*/
createdAt?: pulumi.Input<string>;
/**
* Inhibits deletion of the cluster. Can be either `true` or `false`.
*/
deletionProtection?: pulumi.Input<boolean>;
/**
* Description of the Redis cluster.
*/
description?: pulumi.Input<string>;
/**
* Deployment environment of the Redis cluster. Can be either `PRESTABLE` or `PRODUCTION`.
*/
environment?: pulumi.Input<string>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
folderId?: pulumi.Input<string>;
/**
* Aggregated health of the cluster. Can be either `ALIVE`, `DEGRADED`, `DEAD` or `HEALTH_UNKNOWN`.
* For more information see `health` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-redis/api-ref/Cluster/).
*/
health?: pulumi.Input<string>;
/**
* A host of the Redis cluster. The structure is documented below.
*/
hosts?: pulumi.Input<pulumi.Input<inputs.MdbRedisClusterHost>[]>;
/**
* A set of key/value label pairs to assign to the Redis cluster.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
maintenanceWindow?: pulumi.Input<inputs.MdbRedisClusterMaintenanceWindow>;
/**
* Name of the Redis cluster. Provided by the client when the cluster is created.
*/
name?: pulumi.Input<string>;
/**
* ID of the network, to which the Redis cluster belongs.
*/
networkId?: pulumi.Input<string>;
/**
* Resources allocated to hosts of the Redis cluster. The structure is documented below.
*/
resources?: pulumi.Input<inputs.MdbRedisClusterResources>;
/**
* A set of ids of security groups assigned to hosts of the cluster.
*/
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Redis Cluster mode enabled/disabled.
*/
sharded?: pulumi.Input<boolean>;
/**
* Status of the cluster. Can be either `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`.
* For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-redis/api-ref/Cluster/).
*/
status?: pulumi.Input<string>;
/**
* tls support mode enabled/disabled.
*/
tlsEnabled?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a MdbRedisCluster resource.
*/
export interface MdbRedisClusterArgs {
/**
* Configuration of the Redis cluster. The structure is documented below.
*/
config: pulumi.Input<inputs.MdbRedisClusterConfig>;
/**
* Inhibits deletion of the cluster. Can be either `true` or `false`.
*/
deletionProtection?: pulumi.Input<boolean>;
/**
* Description of the Redis cluster.
*/
description?: pulumi.Input<string>;
/**
* Deployment environment of the Redis cluster. Can be either `PRESTABLE` or `PRODUCTION`.
*/
environment: pulumi.Input<string>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
folderId?: pulumi.Input<string>;
/**
* A host of the Redis cluster. The structure is documented below.
*/
hosts: pulumi.Input<pulumi.Input<inputs.MdbRedisClusterHost>[]>;
/**
* A set of key/value label pairs to assign to the Redis cluster.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
maintenanceWindow?: pulumi.Input<inputs.MdbRedisClusterMaintenanceWindow>;
/**
* Name of the Redis cluster. Provided by the client when the cluster is created.
*/
name?: pulumi.Input<string>;
/**
* ID of the network, to which the Redis cluster belongs.
*/
networkId: pulumi.Input<string>;
/**
* Resources allocated to hosts of the Redis cluster. The structure is documented below.
*/
resources: pulumi.Input<inputs.MdbRedisClusterResources>;
/**
* A set of ids of security groups assigned to hosts of the cluster.
*/
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Redis Cluster mode enabled/disabled.
*/
sharded?: pulumi.Input<boolean>;
/**
* tls support mode enabled/disabled.
*/
tlsEnabled?: pulumi.Input<boolean>;
}