import * as core from "@terrascript/core"; export interface LogDeliveryConfigurationArgs extends core.SchemaArgs { destination: string | core.StringOut; destinationType: string | core.StringOut; logFormat: string | core.StringOut; logType: string | core.StringOut; } export class LogDeliveryConfiguration extends core.Schema { @core.attr(String) public destination!: string | core.StringOut; @core.attr(String) public destinationType!: string | core.StringOut; @core.attr(String) public logFormat!: string | core.StringOut; @core.attr(String) public logType!: string | core.StringOut; } export interface ClusterModeArgs extends core.SchemaArgs { numNodeGroups?: number | core.NumberOut; replicasPerNodeGroup?: number | core.NumberOut; } export class ClusterMode extends core.Schema { @core.attr(Number, { computed: true }) public numNodeGroups?: number | core.NumberOut; @core.attr(Number, { computed: true }) public replicasPerNodeGroup?: number | core.NumberOut; } export interface ReplicationGroupArgs extends core.ResourceArgs { /** * (Optional) Specifies whether any modifications are applied immediately, or during the next maintenan * ce window. Default is `false`. */ applyImmediately?: boolean | core.BooleanOut; /** * (Optional) Whether to enable encryption at rest. */ atRestEncryptionEnabled?: boolean | core.BooleanOut; /** * (Optional) Password used to access a password protected server. Can be specified only if `transit_en * cryption_enabled = true`. */ authToken?: string | core.StringOut; /** * (Optional) Specifies whether minor version engine upgrades will be applied automatically to the unde * rlying Cache Cluster instances during the maintenance window. */ autoMinorVersionUpgrade?: string | core.StringOut; /** * (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primar * y if the existing primary fails. If enabled, `num_cache_clusters` must be greater than 1. Must be en * abled for Redis (cluster mode enabled) replication groups. Defaults to `false`. */ automaticFailoverEnabled?: boolean | core.BooleanOut; /** * (Optional, **Deprecated** use `preferred_cache_cluster_azs` instead) 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 not considered. */ availabilityZones?: core.Array | core.ArrayOut; /** * (Optional, **Deprecated** use root-level `num_node_groups` and `replicas_per_node_group` instead) Cr * eate a native Redis cluster. `automatic_failover_enabled` must be set to true. Cluster Mode document * ed below. Only 1 `cluster_mode` block is allowed. Note that configuring this block does not enable c * luster mode, i.e., data sharding, this requires using a parameter group that has the parameter `clus * ter-enabled` set to true. */ clusterMode?: ClusterMode; /** * (Optional) Enables data tiering. Data tiering is only supported for replication groups using the r6g * d node type. This parameter must be set to `true` when using r6gd nodes. */ dataTieringEnabled?: boolean | core.BooleanOut; description?: string | core.StringOut; /** * (Optional) Name of the cache engine to be used for the clusters in this replication group. The only * valid value is `redis`. */ engine?: string | core.StringOut; /** * (Optional) Version number of the cache engine to be used for the cache clusters in this replication * group. */ engineVersion?: string | core.StringOut; /** * (Optional) 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?: string | core.StringOut; /** * (Optional) 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 grou * p as a secondary replication group; otherwise, the replication group is not part of any global repli * cation group. If `global_replication_group_id` is set, the `num_node_groups` parameter (or the `num_ * node_groups` parameter of the deprecated `cluster_mode` block) cannot be set. */ globalReplicationGroupId?: string | core.StringOut; /** * (Optional) The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses serv * ice managed encryption. Can be specified only if `at_rest_encryption_enabled = true`. */ kmsKeyId?: string | core.StringOut; /** * (Optional, Redis only) Specifies the destination and format of Redis [SLOWLOG](https://redis.io/comm * ands/slowlog) or Redis [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.a * ws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See [Log D * elivery Configuration](#log-delivery-configuration) below for more details. */ logDeliveryConfiguration?: | core.Array | core.ArrayOut; maintenanceWindow?: string | core.StringOut; /** * (Optional) Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `autom * atic_failover_enabled` must also be enabled. Defaults to `false`. */ multiAzEnabled?: boolean | core.BooleanOut; /** * (Optional) 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 [g * uidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-s * elect-size.html). Required unless `global_replication_group_id` is set. Cannot be set if `global_rep * lication_group_id` is set. */ nodeType?: string | core.StringOut; notificationTopicArn?: string | core.StringOut; /** * (Optional) Number of cache clusters (primary and replicas) this replication group will have. If Mult * i-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other mod * ifications. Conflicts with `num_node_groups`, the deprecated`number_cache_clusters`, or the deprecat * ed `cluster_mode`. Defaults to `1`. */ numCacheClusters?: number | core.NumberOut; /** * (Optional, **Deprecated** use root-level `num_node_groups` instead) Number of node groups (shards) f * or this Redis replication group. Changing this number will trigger an online resizing operation befo * re other settings modifications. Required unless `global_replication_group_id` is set. */ numNodeGroups?: number | core.NumberOut; /** * (Optional, **Deprecated** use `num_cache_clusters` instead) Number of cache clusters (primary and re * plicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must b * e at least 2. Updates will occur before other modifications. Conflicts with `num_cache_clusters`, `n * um_node_groups`, or the deprecated `cluster_mode`. Defaults to `1`. */ numberCacheClusters?: number | core.NumberOut; /** * (Optional) 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 mod * e", i.e., data sharding, use a parameter group that has the parameter `cluster-enabled` set to true. */ parameterGroupName?: string | core.StringOut; port?: number | core.NumberOut; /** * (Optional) List of EC2 availability zones in which the replication group's cache clusters will be cr * eated. The order of the availability zones in the list is considered. The first item in the list wil * l be the primary node. Ignored when updating. */ preferredCacheClusterAzs?: core.Array | core.ArrayOut; /** * (Optional, Required with `cluster_mode` `num_node_groups`, **Deprecated** use root-level `replicas_p * er_node_group` instead) Number of replica nodes in each node group. Valid values are 0 to 5. Changin * g this number will trigger an online resizing operation before other settings modifications. */ replicasPerNodeGroup?: number | core.NumberOut; replicationGroupDescription?: string | core.StringOut; replicationGroupId: string | core.StringOut; /** * (Optional) One or more Amazon VPC security groups associated with this replication group. Use this p * arameter only when you are creating a replication group in an Amazon Virtual Private Cloud */ securityGroupIds?: core.Array | core.ArrayOut; /** * (Optional) List of cache security group names to associate with this replication group. */ securityGroupNames?: core.Array | core.ArrayOut; snapshotArns?: core.Array | core.ArrayOut; /** * (Optional) Name of a snapshot from which to restore data into the new node group. Changing the `snap * shot_name` forces a new resource. */ snapshotName?: string | core.StringOut; /** * (Optional, Redis only) Number of days for which ElastiCache will retain automatic cache cluster snap * shots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot tha * t was taken today will be retained for 5 days before being deleted. If the value of `snapshot_retent * ion_limit` is set to zero (0), backups are turned off. Please note that setting a `snapshot_retentio * n_limit` is not supported on cache.t1.micro cache nodes */ snapshotRetentionLimit?: number | core.NumberOut; /** * (Optional, Redis only) 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-0 * 9:00` */ snapshotWindow?: string | core.StringOut; /** * (Optional) Name of the cache subnet group to be used for the replication group. */ subnetGroupName?: string | core.StringOut; /** * (Optional) 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 configur * ed with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hash * icorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwr * ite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Whether to enable encryption in transit. */ transitEncryptionEnabled?: boolean | core.BooleanOut; /** * (Optional) User Group ID to associate with the replication group. Only a maximum of one (1) user gro * up 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?: core.Array | core.ArrayOut; } export class ReplicationGroup extends core.Resource { /** * (Optional) Specifies whether any modifications are applied immediately, or during the next maintenan * ce window. Default is `false`. */ @core.attr(Boolean, { computed: true }) public applyImmediately?: boolean | core.BooleanOut; /** * ARN of the created ElastiCache Replication Group. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) Whether to enable encryption at rest. */ @core.attr(Boolean, { computed: true }) public atRestEncryptionEnabled?: boolean | core.BooleanOut; /** * (Optional) Password used to access a password protected server. Can be specified only if `transit_en * cryption_enabled = true`. */ @core.attr(String) public authToken?: string | core.StringOut; /** * (Optional) Specifies whether minor version engine upgrades will be applied automatically to the unde * rlying Cache Cluster instances during the maintenance window. */ @core.attr(String, { computed: true }) public autoMinorVersionUpgrade?: string | core.StringOut; /** * (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primar * y if the existing primary fails. If enabled, `num_cache_clusters` must be greater than 1. Must be en * abled for Redis (cluster mode enabled) replication groups. Defaults to `false`. */ @core.attr(Boolean) public automaticFailoverEnabled?: boolean | core.BooleanOut; /** * (Optional, **Deprecated** use `preferred_cache_cluster_azs` instead) 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 not considered. */ @core.attr(String, { kind: "array" }) public availabilityZones?: core.Array | core.ArrayOut; /** * Indicates if cluster mode is enabled. */ @core.attr(Boolean, { computed: true }) public clusterEnabled!: boolean | core.BooleanOut; /** * (Optional, **Deprecated** use root-level `num_node_groups` and `replicas_per_node_group` instead) Cr * eate a native Redis cluster. `automatic_failover_enabled` must be set to true. Cluster Mode document * ed below. Only 1 `cluster_mode` block is allowed. Note that configuring this block does not enable c * luster mode, i.e., data sharding, this requires using a parameter group that has the parameter `clus * ter-enabled` set to true. */ @core.attr(ClusterMode, { computed: true }) public clusterMode?: ClusterMode; /** * Address of the replication group configuration endpoint when cluster mode is enabled. */ @core.attr(String, { computed: true }) public configurationEndpointAddress!: string | core.StringOut; /** * (Optional) Enables data tiering. Data tiering is only supported for replication groups using the r6g * d node type. This parameter must be set to `true` when using r6gd nodes. */ @core.attr(Boolean, { computed: true }) public dataTieringEnabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public description?: string | core.StringOut; /** * (Optional) Name of the cache engine to be used for the clusters in this replication group. The only * valid value is `redis`. */ @core.attr(String) public engine?: string | core.StringOut; /** * (Optional) Version number of the cache engine to be used for the cache clusters in this replication * group. */ @core.attr(String, { computed: true }) public engineVersion?: string | core.StringOut; /** * Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the runnin * g version of the cache engine. */ @core.attr(String, { computed: true }) public engineVersionActual!: string | core.StringOut; /** * (Optional) 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. */ @core.attr(String) public finalSnapshotIdentifier?: string | core.StringOut; /** * (Optional) 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 grou * p as a secondary replication group; otherwise, the replication group is not part of any global repli * cation group. If `global_replication_group_id` is set, the `num_node_groups` parameter (or the `num_ * node_groups` parameter of the deprecated `cluster_mode` block) cannot be set. */ @core.attr(String, { computed: true }) public globalReplicationGroupId?: string | core.StringOut; /** * ID of the ElastiCache Replication Group. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses serv * ice managed encryption. Can be specified only if `at_rest_encryption_enabled = true`. */ @core.attr(String) public kmsKeyId?: string | core.StringOut; /** * (Optional, Redis only) Specifies the destination and format of Redis [SLOWLOG](https://redis.io/comm * ands/slowlog) or Redis [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.a * ws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See [Log D * elivery Configuration](#log-delivery-configuration) below for more details. */ @core.attr(LogDeliveryConfiguration, { kind: "array" }) public logDeliveryConfiguration?: | core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public maintenanceWindow?: string | core.StringOut; /** * Identifiers of all the nodes that are part of this replication group. */ @core.attr(String, { computed: true, kind: "array" }) public memberClusters!: core.Array | core.ArrayOut; /** * (Optional) Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `autom * atic_failover_enabled` must also be enabled. Defaults to `false`. */ @core.attr(Boolean) public multiAzEnabled?: boolean | core.BooleanOut; /** * (Optional) 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 [g * uidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-s * elect-size.html). Required unless `global_replication_group_id` is set. Cannot be set if `global_rep * lication_group_id` is set. */ @core.attr(String, { computed: true }) public nodeType?: string | core.StringOut; @core.attr(String) public notificationTopicArn?: string | core.StringOut; /** * (Optional) Number of cache clusters (primary and replicas) this replication group will have. If Mult * i-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other mod * ifications. Conflicts with `num_node_groups`, the deprecated`number_cache_clusters`, or the deprecat * ed `cluster_mode`. Defaults to `1`. */ @core.attr(Number, { computed: true }) public numCacheClusters?: number | core.NumberOut; /** * (Optional, **Deprecated** use root-level `num_node_groups` instead) Number of node groups (shards) f * or this Redis replication group. Changing this number will trigger an online resizing operation befo * re other settings modifications. Required unless `global_replication_group_id` is set. */ @core.attr(Number, { computed: true }) public numNodeGroups?: number | core.NumberOut; /** * (Optional, **Deprecated** use `num_cache_clusters` instead) Number of cache clusters (primary and re * plicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must b * e at least 2. Updates will occur before other modifications. Conflicts with `num_cache_clusters`, `n * um_node_groups`, or the deprecated `cluster_mode`. Defaults to `1`. */ @core.attr(Number, { computed: true }) public numberCacheClusters?: number | core.NumberOut; /** * (Optional) 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 mod * e", i.e., data sharding, use a parameter group that has the parameter `cluster-enabled` set to true. */ @core.attr(String, { computed: true }) public parameterGroupName?: string | core.StringOut; @core.attr(Number) public port?: number | core.NumberOut; /** * (Optional) List of EC2 availability zones in which the replication group's cache clusters will be cr * eated. The order of the availability zones in the list is considered. The first item in the list wil * l be the primary node. Ignored when updating. */ @core.attr(String, { kind: "array" }) public preferredCacheClusterAzs?: | core.Array | core.ArrayOut; /** * (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster m * ode is disabled. */ @core.attr(String, { computed: true }) public primaryEndpointAddress!: string | core.StringOut; /** * (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mo * de is disabled. */ @core.attr(String, { computed: true }) public readerEndpointAddress!: string | core.StringOut; /** * (Optional, Required with `cluster_mode` `num_node_groups`, **Deprecated** use root-level `replicas_p * er_node_group` instead) Number of replica nodes in each node group. Valid values are 0 to 5. Changin * g this number will trigger an online resizing operation before other settings modifications. */ @core.attr(Number, { computed: true }) public replicasPerNodeGroup?: number | core.NumberOut; @core.attr(String, { computed: true }) public replicationGroupDescription?: string | core.StringOut; @core.attr(String) public replicationGroupId!: string | core.StringOut; /** * (Optional) One or more Amazon VPC security groups associated with this replication group. Use this p * arameter only when you are creating a replication group in an Amazon Virtual Private Cloud */ @core.attr(String, { computed: true, kind: "array" }) public securityGroupIds?: core.Array | core.ArrayOut; /** * (Optional) List of cache security group names to associate with this replication group. */ @core.attr(String, { computed: true, kind: "array" }) public securityGroupNames?: | core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public snapshotArns?: core.Array | core.ArrayOut; /** * (Optional) Name of a snapshot from which to restore data into the new node group. Changing the `snap * shot_name` forces a new resource. */ @core.attr(String) public snapshotName?: string | core.StringOut; /** * (Optional, Redis only) Number of days for which ElastiCache will retain automatic cache cluster snap * shots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot tha * t was taken today will be retained for 5 days before being deleted. If the value of `snapshot_retent * ion_limit` is set to zero (0), backups are turned off. Please note that setting a `snapshot_retentio * n_limit` is not supported on cache.t1.micro cache nodes */ @core.attr(Number) public snapshotRetentionLimit?: number | core.NumberOut; /** * (Optional, Redis only) 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-0 * 9:00` */ @core.attr(String, { computed: true }) public snapshotWindow?: string | core.StringOut; /** * (Optional) Name of the cache subnet group to be used for the replication group. */ @core.attr(String, { computed: true }) public subnetGroupName?: string | core.StringOut; /** * (Optional) 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 configur * ed with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hash * icorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwr * ite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Whether to enable encryption in transit. */ @core.attr(Boolean, { computed: true }) public transitEncryptionEnabled?: boolean | core.BooleanOut; /** * (Optional) User Group ID to associate with the replication group. Only a maximum of one (1) user gro * up 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. */ @core.attr(String, { kind: "array" }) public userGroupIds?: core.Array | core.ArrayOut; constructor(name: string, args?: ReplicationGroupArgs) { super(name, "aws_elasticache_replication_group", args); } public override getNamespace(): string { return "aws_elasticache"; } }