UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

888 lines (887 loc) • 49.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an ElastiCache Replication Group resource. * * For working with a [Memcached cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html) or a * [single-node Redis instance (Cluster Mode Disabled)](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html), * see the `aws.elasticache.Cluster` resource. * * > **Note:** When you change an attribute, such as `engineVersion`, by * default the ElastiCache API applies it in the next maintenance window. Because * of this, this provider may report a difference in its planning phase because the * actual modification has not yet taken place. You can use the * `applyImmediately` flag to instruct the service to apply the change * immediately. Using `applyImmediately` can result in a brief downtime as * servers reboots. * See the AWS Documentation on * [Modifying an ElastiCache Cache Cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Modify.html) * for more information. * * > **Note:** Any attribute changes that re-create the resource will be applied immediately, regardless of the value of `applyImmediately`. * * > **Note:** Be aware of the terminology collision around "cluster" for `aws.elasticache.ReplicationGroup`. For example, it is possible to create a ["Cluster Mode Disabled [Redis] Cluster"](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Create.CON.Redis.html). With "Cluster Mode Enabled", the data will be stored in shards (called "node groups"). See [Redis Cluster Configuration](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/cluster-create-determine-requirements.html#redis-cluster-configuration) for a diagram of the differences. To enable cluster mode, use a parameter group that has cluster mode enabled. The default parameter groups provided by AWS end with ".cluster.on", for example `default.redis6.x.cluster.on`. * * ## Example Usage * * ### Redis OSS/Valkey Cluster Mode Disabled * * To create a single shard primary with single read replica: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.elasticache.ReplicationGroup("example", { * automaticFailoverEnabled: true, * preferredCacheClusterAzs: [ * "us-west-2a", * "us-west-2b", * ], * replicationGroupId: "tf-rep-group-1", * description: "example description", * nodeType: "cache.m4.large", * numCacheClusters: 2, * parameterGroupName: "default.redis3.2", * port: 6379, * }); * ``` * * You have two options for adjusting the number of replicas: * * * Adjusting `numCacheClusters` directly. This will attempt to automatically add or remove replicas, but provides no granular control (e.g., preferred availability zone, cache cluster ID) for the added or removed replicas. This also currently expects cache cluster IDs in the form of `replication_group_id-00#`. * * Otherwise for fine grained control of the underlying cache clusters, they can be added or removed with the `aws.elasticache.Cluster` resource and its `replicationGroupId` attribute. In this situation, you will need to utilize [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) to prevent perpetual differences with the `numberCacheCluster` attribute. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.elasticache.ReplicationGroup("example", { * automaticFailoverEnabled: true, * preferredCacheClusterAzs: [ * "us-west-2a", * "us-west-2b", * ], * replicationGroupId: "tf-rep-group-1", * description: "example description", * nodeType: "cache.m4.large", * numCacheClusters: 2, * parameterGroupName: "default.redis3.2", * port: 6379, * }); * const replica: aws.elasticache.Cluster[] = []; * for (const range = {value: 0}; range.value < 1; range.value++) { * replica.push(new aws.elasticache.Cluster(`replica-${range.value}`, { * clusterId: `tf-rep-group-1-${range.value}`, * replicationGroupId: example.id, * })); * } * ``` * * ### Redis OSS/Valkey Cluster Mode Enabled * * To create two shards with a primary and a single read replica each: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const baz = new aws.elasticache.ReplicationGroup("baz", { * replicationGroupId: "tf-redis-cluster", * description: "example description", * nodeType: "cache.t2.small", * port: 6379, * parameterGroupName: "default.redis3.2.cluster.on", * automaticFailoverEnabled: true, * numNodeGroups: 2, * replicasPerNodeGroup: 1, * }); * ``` * * ### Redis Log Delivery configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.elasticache.ReplicationGroup("test", { * replicationGroupId: "myreplicaciongroup", * description: "test description", * nodeType: "cache.t3.small", * port: 6379, * applyImmediately: true, * autoMinorVersionUpgrade: false, * maintenanceWindow: "tue:06:30-tue:07:30", * snapshotWindow: "01:00-02:00", * logDeliveryConfigurations: [ * { * destination: example.name, * destinationType: "cloudwatch-logs", * logFormat: "text", * logType: "slow-log", * }, * { * destination: exampleAwsKinesisFirehoseDeliveryStream.name, * destinationType: "kinesis-firehose", * logFormat: "json", * logType: "engine-log", * }, * ], * }); * ``` * * > **Note:** We currently do not support passing a `primaryClusterId` in order to create the Replication Group. * * > **Note:** Automatic Failover is unavailable for Redis versions earlier than 2.8.6, * and unavailable on T1 node types. For T2 node types, it is only available on Redis version 3.2.4 or later with cluster mode enabled. See the [High Availability Using Replication Groups](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.html) guide * for full details on using Replication Groups. * * ### Creating a secondary replication group for a global replication group * * A Global Replication Group can have up to two secondary Replication Groups in different regions. These are added to an existing Global Replication Group. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const primary = new aws.elasticache.ReplicationGroup("primary", { * replicationGroupId: "example-primary", * description: "primary replication group", * engine: "redis", * engineVersion: "5.0.6", * nodeType: "cache.m5.large", * numCacheClusters: 1, * }); * const example = new aws.elasticache.GlobalReplicationGroup("example", { * globalReplicationGroupIdSuffix: "example", * primaryReplicationGroupId: primary.id, * }); * const secondary = new aws.elasticache.ReplicationGroup("secondary", { * replicationGroupId: "example-secondary", * description: "secondary replication group", * globalReplicationGroupId: example.globalReplicationGroupId, * numCacheClusters: 1, * }); * ``` * * ### Redis AUTH and In-Transit Encryption Enabled * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.elasticache.ReplicationGroup("example", { * replicationGroupId: "example", * description: "example with authentication", * nodeType: "cache.t2.micro", * numCacheClusters: 1, * port: 6379, * subnetGroupName: exampleAwsElasticacheSubnetGroup.name, * securityGroupIds: [exampleAwsSecurityGroup.id], * parameterGroupName: "default.redis5.0", * engineVersion: "5.0.6", * transitEncryptionEnabled: true, * authToken: "abcdefgh1234567890", * authTokenUpdateStrategy: "ROTATE", * }); * ``` * * > When adding a new `authToken` to a previously passwordless replication group, using the `ROTATE` update strategy will result in support for **both** the new token and passwordless authentication. To immediately require authorization when adding the initial token, use the `SET` strategy instead. See the [Authenticating with the Redis AUTH command](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html) guide for additional details. * * ## Import * * Using `pulumi import`, import ElastiCache Replication Groups using the `replication_group_id`. For example: * * ```sh * $ pulumi import aws:elasticache/replicationGroup:ReplicationGroup my_replication_group replication-group-1 * ``` */ export declare class ReplicationGroup extends pulumi.CustomResource { /** * Get an existing ReplicationGroup 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?: ReplicationGroupState, opts?: pulumi.CustomResourceOptions): ReplicationGroup; /** * Returns true if the given object is an instance of ReplicationGroup. 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 ReplicationGroup; /** * Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. */ readonly applyImmediately: pulumi.Output<boolean>; /** * ARN of the created ElastiCache Replication Group. */ readonly arn: pulumi.Output<string>; /** * Whether to enable encryption at rest. * When `engine` is `redis`, default is `false`. * When `engine` is `valkey`, default is `true`. */ readonly atRestEncryptionEnabled: pulumi.Output<boolean>; /** * Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`. */ readonly authToken: pulumi.Output<string | undefined>; /** * Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Required if `authToken` is set. */ readonly authTokenUpdateStrategy: pulumi.Output<string | undefined>; /** * Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. * Only supported for engine types `"redis"` and `"valkey"` and if the engine version is 6 or higher. * Defaults to `true`. */ readonly autoMinorVersionUpgrade: pulumi.Output<boolean>; /** * Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, `numCacheClusters` must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to `false`. */ readonly automaticFailoverEnabled: pulumi.Output<boolean | undefined>; /** * Indicates if cluster mode is enabled. */ readonly clusterEnabled: pulumi.Output<boolean>; /** * Specifies whether cluster mode is enabled or disabled. Valid values are `enabled` or `disabled` or `compatible` */ readonly clusterMode: pulumi.Output<string>; /** * Address of the replication group configuration endpoint when cluster mode is enabled. */ readonly configurationEndpointAddress: pulumi.Output<string>; /** * Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to `true` when using r6gd nodes. */ readonly dataTieringEnabled: pulumi.Output<boolean>; /** * User-created description for the replication group. Must not be empty. */ readonly description: pulumi.Output<string>; /** * Name of the cache engine to be used for the clusters in this replication group. * Valid values are `redis` or `valkey`. * Default is `redis`. */ readonly engine: pulumi.Output<string>; /** * Version number of the cache engine to be used for the cache clusters in this replication group. * If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`. * If the version is 6, the major and minor version can be set, e.g., `6.2`, * or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`. * Otherwise, specify the full version desired, e.g., `5.0.6`. * The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ readonly engineVersion: pulumi.Output<string>; /** * Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine. */ readonly engineVersionActual: pulumi.Output<string>; /** * The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. */ readonly finalSnapshotIdentifier: pulumi.Output<string | undefined>; /** * The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `globalReplicationGroupId` is set, the `numNodeGroups` parameter cannot be set. */ readonly globalReplicationGroupId: pulumi.Output<string>; /** * The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. */ readonly ipDiscovery: pulumi.Output<string>; /** * The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `atRestEncryptionEnabled = true`. */ readonly kmsKeyId: pulumi.Output<string | undefined>; /** * Specifies the destination and format of Redis OSS/Valkey [SLOWLOG](https://redis.io/commands/slowlog) or Redis OSS/Valkey [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details. */ readonly logDeliveryConfigurations: pulumi.Output<outputs.elasticache.ReplicationGroupLogDeliveryConfiguration[] | undefined>; /** * Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` */ readonly maintenanceWindow: pulumi.Output<string>; /** * Identifiers of all the nodes that are part of this replication group. */ readonly memberClusters: pulumi.Output<string[]>; /** * Specifies whether to enable Multi-AZ Support for the replication group. * If `true`, `automaticFailoverEnabled` must also be enabled. * Defaults to `false`. */ readonly multiAzEnabled: pulumi.Output<boolean | undefined>; /** * The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`. */ readonly networkType: pulumi.Output<string>; /** * Instance class to be used. * See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). * Required unless `globalReplicationGroupId` is set. * Cannot be set if `globalReplicationGroupId` is set. */ readonly nodeType: pulumi.Output<string>; /** * ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` */ readonly notificationTopicArn: pulumi.Output<string | undefined>; /** * Number of cache clusters (primary and replicas) this replication group will have. * If `automaticFailoverEnabled` or `multiAzEnabled` are `true`, must be at least 2. * Updates will occur before other modifications. * Conflicts with `numNodeGroups` and `replicasPerNodeGroup`. * Defaults to `1`. */ readonly numCacheClusters: pulumi.Output<number>; /** * Number of node groups (shards) for this Redis replication group. * Changing this number will trigger a resizing operation before other settings modifications. * Conflicts with `numCacheClusters`. */ readonly numNodeGroups: pulumi.Output<number>; /** * Name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. To enable "cluster mode", i.e., data sharding, use a parameter group that has the parameter `cluster-enabled` set to true. */ readonly parameterGroupName: pulumi.Output<string>; /** * Port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. */ readonly port: pulumi.Output<number | undefined>; /** * List of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is considered. The first item in the list will be the primary node. Ignored when updating. */ readonly preferredCacheClusterAzs: pulumi.Output<string[] | undefined>; /** * (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled. */ readonly primaryEndpointAddress: pulumi.Output<string>; /** * (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. */ readonly readerEndpointAddress: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Number of replica nodes in each node group. * Changing this number will trigger a resizing operation before other settings modifications. * Valid values are 0 to 5. * Conflicts with `numCacheClusters`. * Can only be set if `numNodeGroups` is set. */ readonly replicasPerNodeGroup: pulumi.Output<number>; /** * Replication group identifier. This parameter is stored as a lowercase string. * * The following arguments are optional: */ readonly replicationGroupId: pulumi.Output<string>; /** * IDs of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ readonly securityGroupIds: pulumi.Output<string[]>; /** * Names of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ readonly securityGroupNames: pulumi.Output<string[]>; /** * List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas. */ readonly snapshotArns: pulumi.Output<string[] | undefined>; /** * Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource. */ readonly snapshotName: pulumi.Output<string | undefined>; /** * Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of `snapshotRetentionLimit` is set to zero (0), backups are turned off. Please note that setting a `snapshotRetentionLimit` is not supported on cache.t1.micro cache nodes */ readonly snapshotRetentionLimit: pulumi.Output<number | undefined>; /** * Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. Example: `05:00-09:00` */ readonly snapshotWindow: pulumi.Output<string>; /** * Name of the cache subnet group to be used for the replication group. */ readonly subnetGroupName: pulumi.Output<string>; /** * Map of tags to assign to the resource. Adding tags to this resource will add or overwrite any existing tags on the clusters in the replication group and not to the group itself. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Whether to enable encryption in transit. * Changing this argument with an `engineVersion` < `7.0.5` will force a replacement. * Engine versions prior to `7.0.5` only allow this transit encryption to be configured during creation of the replication group. */ readonly transitEncryptionEnabled: pulumi.Output<boolean>; /** * A setting that enables clients to migrate to in-transit encryption with no downtime. * Valid values are `preferred` and `required`. * When enabling encryption on an existing replication group, this must first be set to `preferred` before setting it to `required` in a subsequent apply. * See the `TransitEncryptionMode` field in the [`CreateReplicationGroup` API documentation](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateReplicationGroup.html) for additional details. */ readonly transitEncryptionMode: pulumi.Output<string>; /** * User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. **NOTE:** This argument _is_ a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one. */ readonly userGroupIds: pulumi.Output<string[] | undefined>; /** * Create a ReplicationGroup 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: ReplicationGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ReplicationGroup resources. */ export interface ReplicationGroupState { /** * Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. */ applyImmediately?: pulumi.Input<boolean>; /** * ARN of the created ElastiCache Replication Group. */ arn?: pulumi.Input<string>; /** * Whether to enable encryption at rest. * When `engine` is `redis`, default is `false`. * When `engine` is `valkey`, default is `true`. */ atRestEncryptionEnabled?: pulumi.Input<boolean>; /** * Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`. */ authToken?: pulumi.Input<string>; /** * Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Required if `authToken` is set. */ authTokenUpdateStrategy?: pulumi.Input<string>; /** * Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. * Only supported for engine types `"redis"` and `"valkey"` and if the engine version is 6 or higher. * Defaults to `true`. */ autoMinorVersionUpgrade?: pulumi.Input<boolean>; /** * Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, `numCacheClusters` must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to `false`. */ automaticFailoverEnabled?: pulumi.Input<boolean>; /** * Indicates if cluster mode is enabled. */ clusterEnabled?: pulumi.Input<boolean>; /** * Specifies whether cluster mode is enabled or disabled. Valid values are `enabled` or `disabled` or `compatible` */ clusterMode?: pulumi.Input<string>; /** * Address of the replication group configuration endpoint when cluster mode is enabled. */ configurationEndpointAddress?: pulumi.Input<string>; /** * Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to `true` when using r6gd nodes. */ dataTieringEnabled?: pulumi.Input<boolean>; /** * User-created description for the replication group. Must not be empty. */ description?: pulumi.Input<string>; /** * Name of the cache engine to be used for the clusters in this replication group. * Valid values are `redis` or `valkey`. * Default is `redis`. */ engine?: pulumi.Input<string>; /** * Version number of the cache engine to be used for the cache clusters in this replication group. * If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`. * If the version is 6, the major and minor version can be set, e.g., `6.2`, * or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`. * Otherwise, specify the full version desired, e.g., `5.0.6`. * The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ engineVersion?: pulumi.Input<string>; /** * Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine. */ engineVersionActual?: pulumi.Input<string>; /** * The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input<string>; /** * The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `globalReplicationGroupId` is set, the `numNodeGroups` parameter cannot be set. */ globalReplicationGroupId?: pulumi.Input<string>; /** * The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. */ ipDiscovery?: pulumi.Input<string>; /** * The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `atRestEncryptionEnabled = true`. */ kmsKeyId?: pulumi.Input<string>; /** * Specifies the destination and format of Redis OSS/Valkey [SLOWLOG](https://redis.io/commands/slowlog) or Redis OSS/Valkey [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details. */ logDeliveryConfigurations?: pulumi.Input<pulumi.Input<inputs.elasticache.ReplicationGroupLogDeliveryConfiguration>[]>; /** * Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` */ maintenanceWindow?: pulumi.Input<string>; /** * Identifiers of all the nodes that are part of this replication group. */ memberClusters?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies whether to enable Multi-AZ Support for the replication group. * If `true`, `automaticFailoverEnabled` must also be enabled. * Defaults to `false`. */ multiAzEnabled?: pulumi.Input<boolean>; /** * The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`. */ networkType?: pulumi.Input<string>; /** * Instance class to be used. * See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). * Required unless `globalReplicationGroupId` is set. * Cannot be set if `globalReplicationGroupId` is set. */ nodeType?: pulumi.Input<string>; /** * ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` */ notificationTopicArn?: pulumi.Input<string>; /** * Number of cache clusters (primary and replicas) this replication group will have. * If `automaticFailoverEnabled` or `multiAzEnabled` are `true`, must be at least 2. * Updates will occur before other modifications. * Conflicts with `numNodeGroups` and `replicasPerNodeGroup`. * Defaults to `1`. */ numCacheClusters?: pulumi.Input<number>; /** * Number of node groups (shards) for this Redis replication group. * Changing this number will trigger a resizing operation before other settings modifications. * Conflicts with `numCacheClusters`. */ numNodeGroups?: pulumi.Input<number>; /** * Name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. To enable "cluster mode", i.e., data sharding, use a parameter group that has the parameter `cluster-enabled` set to true. */ parameterGroupName?: pulumi.Input<string>; /** * Port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. */ port?: pulumi.Input<number>; /** * List of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is considered. The first item in the list will be the primary node. Ignored when updating. */ preferredCacheClusterAzs?: pulumi.Input<pulumi.Input<string>[]>; /** * (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled. */ primaryEndpointAddress?: pulumi.Input<string>; /** * (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. */ readerEndpointAddress?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Number of replica nodes in each node group. * Changing this number will trigger a resizing operation before other settings modifications. * Valid values are 0 to 5. * Conflicts with `numCacheClusters`. * Can only be set if `numNodeGroups` is set. */ replicasPerNodeGroup?: pulumi.Input<number>; /** * Replication group identifier. This parameter is stored as a lowercase string. * * The following arguments are optional: */ replicationGroupId?: pulumi.Input<string>; /** * IDs of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>; /** * Names of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ securityGroupNames?: pulumi.Input<pulumi.Input<string>[]>; /** * List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas. */ snapshotArns?: pulumi.Input<pulumi.Input<string>[]>; /** * Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource. */ snapshotName?: pulumi.Input<string>; /** * Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of `snapshotRetentionLimit` is set to zero (0), backups are turned off. Please note that setting a `snapshotRetentionLimit` is not supported on cache.t1.micro cache nodes */ snapshotRetentionLimit?: pulumi.Input<number>; /** * Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. Example: `05:00-09:00` */ snapshotWindow?: pulumi.Input<string>; /** * Name of the cache subnet group to be used for the replication group. */ subnetGroupName?: pulumi.Input<string>; /** * Map of tags to assign to the resource. Adding tags to this resource will add or overwrite any existing tags on the clusters in the replication group and not to the group itself. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Whether to enable encryption in transit. * Changing this argument with an `engineVersion` < `7.0.5` will force a replacement. * Engine versions prior to `7.0.5` only allow this transit encryption to be configured during creation of the replication group. */ transitEncryptionEnabled?: pulumi.Input<boolean>; /** * A setting that enables clients to migrate to in-transit encryption with no downtime. * Valid values are `preferred` and `required`. * When enabling encryption on an existing replication group, this must first be set to `preferred` before setting it to `required` in a subsequent apply. * See the `TransitEncryptionMode` field in the [`CreateReplicationGroup` API documentation](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateReplicationGroup.html) for additional details. */ transitEncryptionMode?: pulumi.Input<string>; /** * User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. **NOTE:** This argument _is_ a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one. */ userGroupIds?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a ReplicationGroup resource. */ export interface ReplicationGroupArgs { /** * Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. */ applyImmediately?: pulumi.Input<boolean>; /** * Whether to enable encryption at rest. * When `engine` is `redis`, default is `false`. * When `engine` is `valkey`, default is `true`. */ atRestEncryptionEnabled?: pulumi.Input<boolean>; /** * Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`. */ authToken?: pulumi.Input<string>; /** * Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Required if `authToken` is set. */ authTokenUpdateStrategy?: pulumi.Input<string>; /** * Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. * Only supported for engine types `"redis"` and `"valkey"` and if the engine version is 6 or higher. * Defaults to `true`. */ autoMinorVersionUpgrade?: pulumi.Input<boolean>; /** * Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, `numCacheClusters` must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to `false`. */ automaticFailoverEnabled?: pulumi.Input<boolean>; /** * Specifies whether cluster mode is enabled or disabled. Valid values are `enabled` or `disabled` or `compatible` */ clusterMode?: pulumi.Input<string>; /** * Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to `true` when using r6gd nodes. */ dataTieringEnabled?: pulumi.Input<boolean>; /** * User-created description for the replication group. Must not be empty. */ description: pulumi.Input<string>; /** * Name of the cache engine to be used for the clusters in this replication group. * Valid values are `redis` or `valkey`. * Default is `redis`. */ engine?: pulumi.Input<string>; /** * Version number of the cache engine to be used for the cache clusters in this replication group. * If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`. * If the version is 6, the major and minor version can be set, e.g., `6.2`, * or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`. * Otherwise, specify the full version desired, e.g., `5.0.6`. * The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ engineVersion?: pulumi.Input<string>; /** * The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input<string>; /** * The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `globalReplicationGroupId` is set, the `numNodeGroups` parameter cannot be set. */ globalReplicationGroupId?: pulumi.Input<string>; /** * The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. */ ipDiscovery?: pulumi.Input<string>; /** * The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `atRestEncryptionEnabled = true`. */ kmsKeyId?: pulumi.Input<string>; /** * Specifies the destination and format of Redis OSS/Valkey [SLOWLOG](https://redis.io/commands/slowlog) or Redis OSS/Valkey [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details. */ logDeliveryConfigurations?: pulumi.Input<pulumi.Input<inputs.elasticache.ReplicationGroupLogDeliveryConfiguration>[]>; /** * Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` */ maintenanceWindow?: pulumi.Input<string>; /** * Specifies whether to enable Multi-AZ Support for the replication group. * If `true`, `automaticFailoverEnabled` must also be enabled. * Defaults to `false`. */ multiAzEnabled?: pulumi.Input<boolean>; /** * The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`. */ networkType?: pulumi.Input<string>; /** * Instance class to be used. * See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). * Required unless `globalReplicationGroupId` is set. * Cannot be set if `globalReplicationGroupId` is set. */ nodeType?: pulumi.Input<string>; /** * ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` */ notificationTopicArn?: pulumi.Input<string>; /** * Number of cache clusters (primary and replicas) this replication group will have. * If `automaticFailoverEnabled` or `multiAzEnabled` are `true`, must be at least 2. * Updates will occur before other modifications. * Conflicts with `numNodeGroups` and `replicasPerNodeGroup`. * Defaults to `1`. */ numCacheClusters?: pulumi.Input<number>; /** * Number of node groups (shards) for this Redis replication group. * Changing this number will trigger a resizing operation before other settings modifications. * Conflicts with `numCacheClusters`. */ numNodeGroups?: pulumi.Input<number>; /** * Name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. To enable "cluster mode", i.e., data sharding, use a parameter group that has the parameter `cluster-enabled` set to true. */ parameterGroupName?: pulumi.Input<string>; /** * Port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. */ port?: pulumi.Input<number>; /** * List of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is considered. The first item in the list will be the primary node. Ignored when updating. */ preferredCacheClusterAzs?: pulumi.Input<pulumi.Input<string>[]>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Number of replica nodes in each node group. * Changing this number will trigger a resizing operation before other settings modifications. * Valid values are 0 to 5. * Conflicts with `numCacheClusters`. * Can only be set if `numNodeGroups` is set. */ replicasPerNodeGroup?: pulumi.Input<number>; /** * Replication group identifier. This parameter is stored as a lowercase string. * * The following arguments are optional: */ replicationGroupId?: pulumi.Input<string>; /** * IDs of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>; /** * Names of one or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud. */ securityGroupNames?: pulumi.Input<pulumi.Input<string>[]>; /** * List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas. */ snapshotArns?: pulumi.Input<pulumi.Input<string>[]>; /** * Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource. */ snapshotName?: pulumi.Input<string>; /** * Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of `snapshotRetentionLimit` is set to zero (0), backups are turned off. Please note that setting a `snapshotRetentionLimit` is not supported on cache.t1.micro cache nodes */ snapshotRetentionLimit?: pulumi.Input<number>; /** * Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. Example: `05:00-09:00` */ snapshotWindow?: pulumi.Input<string>; /** * Name of the cache subnet group to be used for the replication group. */ subnetGroupName?: pulumi.Input<string>; /** * Map of tags to assign to the resource. Adding tags to this resource will add or overwrite any existing tags on the clusters in the replication group and not to the group itself. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Whether to enable encryption in transit. * Changing this argument with an `engineVersion` < `7.0.5` will force a replacement. * Engine versions prior to `7.0.5` only allow this transit encryption to be configured during creation of the replication group. */ transitEncryptionEnabled?: pulumi.Input<boolean>; /** * A setting that enables clients to migrate to in-transit encryption with no downtime. * Valid values are `preferred` and `required`. * When enabling encryption on an existing replication group, this must first be set to `preferred` before setting it to `required` in a subsequent apply. * See the `TransitEncryptionMode` field in the [`CreateReplicationGroup` API documentation](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateReplicationGroup.html) for additional details. */ transitEncryptionMode?: pulumi.Input<string>; /** * User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. **NOTE:** This argument _is_ a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one. */ userGroupIds?: pulumi.Input<pulumi.Input<string>[]>; }