Skip to content

replication-group resource

Source: internal/service/elasticache/replication_group_rsrc.go:50

Example usage:

imports: {
  aws-elasticache: 'github.com/cloudboss/unobin-library-aws//service/elasticache'
}

resources: {
  example: aws-elasticache.replication-group {
    # Set input fields here.
  }
}

Inputs

replication-group-id

string

required

description

string

required

at-rest-encryption-enabled

optional(boolean)

auth-token

optional(string)

sensitive

auth-token-update-strategy

string

default ROTATE

auto-minor-version-upgrade

optional(boolean)

automatic-failover-enabled

boolean

default false

multi-az-enabled

optional(boolean)

cluster-mode

optional(string)

data-tiering-enabled

optional(boolean)

durability

optional(string)

engine

string

default redis

engine-version

optional(string)

global-replication-group-id

optional(string)

primary-cluster-id

optional(string)

ip-discovery

optional(string)

network-type

optional(string)

node-type

optional(string)

kms-key-id

optional(string)

port

optional(integer)

log-delivery-configuration

optional(list(object))
optional(
  list(
    object({
      destination: string
      destination-type: string
      log-format: string
      log-type: string
    })
  )
)

node-group-configuration

optional(list(object))
optional(
  list(
    object({
      node-group-id: optional(string)
      primary-availability-zone: optional(string)
      primary-outpost-arn: optional(string)
      replica-availability-zones: optional(list(string))
      replica-count: optional(integer)
      replica-outpost-arns: optional(list(string))
      slots: optional(string)
    })
  )
)

num-cache-clusters

optional(integer)

num-node-groups

optional(integer)

replicas-per-node-group

optional(integer)

maintenance-window

optional(string)

notification-topic-arn

optional(string)

parameter-group-name

optional(string)

preferred-cache-cluster-azs

optional(list(string))

security-group-ids

optional(list(string))

security-group-names

optional(list(string))

subnet-group-name

optional(string)

snapshot-arns

optional(list(string))

snapshot-name

optional(string)

snapshot-retention-limit

optional(integer)

snapshot-window

optional(string)

snapshotting-cluster-id

optional(string)

transit-encryption-enabled

boolean

default false

transit-encryption-mode

optional(string)

user-group-ids

optional(list(string))

final-snapshot-identifier

optional(string)

tags

optional(map(string))

Input Constraints

Description rules

description must not be empty.

Rule logic
Require
@core.length(input.description) >= 1

Tags rules

tags holds at most 50 entries.

Rule logic
Require
@core.length(input.tags ?? {}) <= 50

Auth token rules

auth-token requires transit-encryption-enabled.

Rule logic
When
input.auth-token != null
Require
input.transit-encryption-enabled == true

Field combinations

Forbidden with auth-token: user-group-ids.

Forbidden with num-cache-clusters: num-node-groups, replicas-per-node-group, and node-group-configuration.

Forbidden with node-group-configuration: num-node-groups, replicas-per-node-group, and preferred-cache-cluster-azs.

Forbidden with global-replication-group-id: primary-cluster-id, at-rest-encryption-enabled, auth-token, data-tiering-enabled, engine-version, kms-key-id, node-type, num-node-groups, parameter-group-name, security-group-names, snapshot-arns, snapshot-name, and transit-encryption-mode.

Multi az enabled rules

multi-az-enabled requires automatic-failover-enabled.

Rule logic
When
input.multi-az-enabled == true
Require
input.automatic-failover-enabled == true

Auth token update strategy rules

auth-token-update-strategy must be SET, ROTATE, or DELETE.

Rule logic
Require
input.auth-token-update-strategy == 'SET'
|| input.auth-token-update-strategy == 'ROTATE'
|| input.auth-token-update-strategy == 'DELETE'

Cluster mode rules

cluster-mode must be disabled, compatible, or enabled.

Rule logic
When
input.cluster-mode != null
Require
input.cluster-mode == 'disabled'
|| input.cluster-mode == 'compatible'
|| input.cluster-mode == 'enabled'

snapshotting-cluster-id is forbidden when cluster-mode is enabled.

Rule logic
When
input.cluster-mode == 'enabled'
Require
input.snapshotting-cluster-id == null

Durability rules

durability must be sync or async.

Rule logic
When
input.durability != null
Require
input.durability == 'sync'
|| input.durability == 'async'

Engine rules

engine must be redis or valkey.

Rule logic
Require
input.engine == 'redis'
|| input.engine == 'valkey'

Ip discovery rules

ip-discovery must be ipv4 or ipv6.

Rule logic
When
input.ip-discovery != null
Require
input.ip-discovery == 'ipv4'
|| input.ip-discovery == 'ipv6'

Network type rules

network-type must be ipv4, ipv6, or dual_stack.

Rule logic
When
input.network-type != null
Require
input.network-type == 'ipv4'
|| input.network-type == 'ipv6'
|| input.network-type == 'dual_stack'

Transit encryption mode rules

transit-encryption-mode must be preferred or required.

Rule logic
When
input.transit-encryption-mode != null
Require
input.transit-encryption-mode == 'preferred'
|| input.transit-encryption-mode == 'required'

Num cache clusters rules

num-cache-clusters must be between 1 and 6.

Rule logic
When
input.num-cache-clusters != null
Require
input.num-cache-clusters >= 1
&& input.num-cache-clusters <= 6

Num node groups rules

num-node-groups must be between 1 and 500.

Rule logic
When
input.num-node-groups != null
Require
input.num-node-groups >= 1
&& input.num-node-groups <= 500

Replicas per node group rules

replicas-per-node-group must be between 0 and 5.

Rule logic
When
input.replicas-per-node-group != null
Require
input.replicas-per-node-group >= 0
&& input.replicas-per-node-group <= 5

Snapshot retention limit rules

snapshot-retention-limit must be between 0 and 35.

Rule logic
When
input.snapshot-retention-limit != null
Require
input.snapshot-retention-limit >= 0
&& input.snapshot-retention-limit <= 35

Port rules

port must be between 1 and 65535.

Rule logic
When
input.port != null
Require
input.port >= 1
&& input.port <= 65535

Global replication group id rules

node-type is required unless joining a global group or adopting a cluster.

Rule logic
When
input.global-replication-group-id == null
&& input.primary-cluster-id == null
Require
input.node-type != null

Log delivery configuration rules

log-delivery-configuration holds at most two entries.

Rule logic
Require
@core.length(input.log-delivery-configuration ?? []) <= 2

destination-type must be cloudwatch-logs or kinesis-firehose.

Rule logic
For each
input.log-delivery-configuration ?? []
Require
@each.value.destination-type == 'cloudwatch-logs'
|| @each.value.destination-type == 'kinesis-firehose'

log-format must be text or json.

Rule logic
For each
input.log-delivery-configuration ?? []
Require
@each.value.log-format == 'text'
|| @each.value.log-format == 'json'

log-type must be slow-log or engine-log.

Rule logic
For each
input.log-delivery-configuration ?? []
Require
@each.value.log-type == 'slow-log'
|| @each.value.log-type == 'engine-log'

Node group configuration rules

replica-count must be between 0 and 5.

Rule logic
For each
input.node-group-configuration ?? []
When
@each.value.replica-count != null
Require
@each.value.replica-count >= 0
&& @each.value.replica-count <= 5

Outputs

arn

string

replication-group-id

string

engine-version

string

cluster-enabled

boolean

port

integer

configuration-endpoint-address

string

primary-endpoint-address

string

reader-endpoint-address

string

member-clusters

list(string)

num-cache-clusters

integer

num-node-groups

integer

replicas-per-node-group

integer

global-replication-group-id

string

parameter-group-name

string

snapshotting-cluster-id

string