tb_pulumi.elasticache¶
Infrastructural patterns related to AWS ElastiCache.
- class tb_pulumi.elasticache.ElastiCacheReplicationGroup(name: str, project: ThunderbirdPulumiProject, subnets: list[str], description: str = None, engine: str = 'redis', engine_version: str = '7.1', node_type: str = 'cache.t3.micro', num_cache_nodes: int = 1, parameter_group_family: str = 'redis7', parameter_group_params: list[dict] = [], port=6379, source_cidrs: list[str] = [], source_sgids: list[str] = [], opts: ResourceOptions = None, tags: dict = {}, **kwargs)¶
Bases:
ThunderbirdComponentResource
Pulumi Type:
tb:elasticache:ElastiCacheReplicationGroup
Builds an ElastiCache replication group in your VPC. This provides a primary writable node with zero or more readable replica nodes. The default configuration is for a single-node Redis 7.1 replication group.
Produces the following
resources
:replication_group - The aws.elasticache.ReplicationGroup.
security_group - The
tb_pulumi.network.SecurityGroupWithRules
describing traffic rules for the cluster.parameter_group - The aws.elasticache.ParameterGroup that configures the cache service.
subnet_group - The aws.elasticache.SubnetGroup the cluster is built on.
- Parameters:
name (str) – A string identifying this set of resources.
project (tb_pulumi.ThunderbirdPulumiProject) – The ThunderbirdPulumiProject to add these resources to.
subnets (list[str]) – List of subnet IDs in which to build the replication group.
description (str, optional) – Common description of the replication group. Defaults to None.
engine (str, optional) – Which cache engine to use. Must be either ‘valkey’ or ‘redis’. Defaults to ‘redis’.
engine_version (str, optional) – Engine version to use. Defaults to ‘7.1’, which is valid for Redis groups.
node_type (str, optional) – Instance type to build nodes with. Defaults to ‘cache.t3.micro’.
num_cache_nodes (int, optional) – Number of nodes to build. If building only one node,
automatic_failover_enabled
must be False. Defaults to 1.parameter_group_family (str, optional) – Parameter group family to build this parameter group from. Defaults to ‘redis7’, which comports with the default engine version.
parameter_group_params (list[dict], optional) – List of dicts defining default parameter value overrides. Should be strucutured as a ParameterGroupParameter. Defaults to [].
port (int, optional) – Port to listen on. Defaults to 6379, the default Redis port.
source_cidrs (list[str], optional) – List of CIDRs which should have access to the replication group. Defaults to [].
source_sgids (list[str], optional) – List of security group IDs which should have access to the replication group. Defaults to [].
opts (pulumi.ResourceOptions, optional) – Additional pulumi.ResourceOptions to apply to these resources. Defaults to None.
tags (dict, optional) – Key/value pairs to merge with the default tags which get applied to all resources in this group. Defaults to {}.
kwargs – Any other keyword arguments which will be passed as inputs to the ReplicationGroup resource. A full listing of options is found here.
- Raises:
IndexError – Thrown if an empty list of subnets is supplied.