github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticache/replicationGroup.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package elasticache
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides an ElastiCache Replication Group resource.
    15  //
    16  // For working with a [Memcached cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html) or a
    17  // [single-node Redis instance (Cluster Mode Disabled)](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html),
    18  // see the `elasticache.Cluster` resource.
    19  //
    20  // > **Note:** When you change an attribute, such as `engineVersion`, by
    21  // default the ElastiCache API applies it in the next maintenance window. Because
    22  // of this, this provider may report a difference in its planning phase because the
    23  // actual modification has not yet taken place. You can use the
    24  // `applyImmediately` flag to instruct the service to apply the change
    25  // immediately. Using `applyImmediately` can result in a brief downtime as
    26  // servers reboots.
    27  // See the AWS Documentation on
    28  // [Modifying an ElastiCache Cache Cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Modify.html)
    29  // for more information.
    30  //
    31  // > **Note:** Any attribute changes that re-create the resource will be applied immediately, regardless of the value of `applyImmediately`.
    32  //
    33  // > **Note:** Be aware of the terminology collision around "cluster" for `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`.
    34  //
    35  // ## Example Usage
    36  //
    37  // ### Redis Cluster Mode Disabled
    38  //
    39  // To create a single shard primary with single read replica:
    40  //
    41  // <!--Start PulumiCodeChooser -->
    42  // ```go
    43  // package main
    44  //
    45  // import (
    46  //
    47  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    48  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    49  //
    50  // )
    51  //
    52  //	func main() {
    53  //		pulumi.Run(func(ctx *pulumi.Context) error {
    54  //			_, err := elasticache.NewReplicationGroup(ctx, "example", &elasticache.ReplicationGroupArgs{
    55  //				AutomaticFailoverEnabled: pulumi.Bool(true),
    56  //				PreferredCacheClusterAzs: pulumi.StringArray{
    57  //					pulumi.String("us-west-2a"),
    58  //					pulumi.String("us-west-2b"),
    59  //				},
    60  //				ReplicationGroupId: pulumi.String("tf-rep-group-1"),
    61  //				Description:        pulumi.String("example description"),
    62  //				NodeType:           pulumi.String("cache.m4.large"),
    63  //				NumCacheClusters:   pulumi.Int(2),
    64  //				ParameterGroupName: pulumi.String("default.redis3.2"),
    65  //				Port:               pulumi.Int(6379),
    66  //			})
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			return nil
    71  //		})
    72  //	}
    73  //
    74  // ```
    75  // <!--End PulumiCodeChooser -->
    76  //
    77  // You have two options for adjusting the number of replicas:
    78  //
    79  // * 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#`.
    80  // * Otherwise for fine grained control of the underlying cache clusters, they can be added or removed with the `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.
    81  //
    82  // <!--Start PulumiCodeChooser -->
    83  // ```go
    84  // package main
    85  //
    86  // import (
    87  //
    88  //	"fmt"
    89  //
    90  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    91  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    92  //
    93  // )
    94  //
    95  //	func main() {
    96  //		pulumi.Run(func(ctx *pulumi.Context) error {
    97  //			example, err := elasticache.NewReplicationGroup(ctx, "example", &elasticache.ReplicationGroupArgs{
    98  //				AutomaticFailoverEnabled: pulumi.Bool(true),
    99  //				PreferredCacheClusterAzs: pulumi.StringArray{
   100  //					pulumi.String("us-west-2a"),
   101  //					pulumi.String("us-west-2b"),
   102  //				},
   103  //				ReplicationGroupId: pulumi.String("tf-rep-group-1"),
   104  //				Description:        pulumi.String("example description"),
   105  //				NodeType:           pulumi.String("cache.m4.large"),
   106  //				NumCacheClusters:   pulumi.Int(2),
   107  //				ParameterGroupName: pulumi.String("default.redis3.2"),
   108  //				Port:               pulumi.Int(6379),
   109  //			})
   110  //			if err != nil {
   111  //				return err
   112  //			}
   113  //			var replica []*elasticache.Cluster
   114  //			for index := 0; index < 1; index++ {
   115  //				key0 := index
   116  //				val0 := index
   117  //				__res, err := elasticache.NewCluster(ctx, fmt.Sprintf("replica-%v", key0), &elasticache.ClusterArgs{
   118  //					ClusterId:          pulumi.String(fmt.Sprintf("tf-rep-group-1-%v", val0)),
   119  //					ReplicationGroupId: example.ID(),
   120  //				})
   121  //				if err != nil {
   122  //					return err
   123  //				}
   124  //				replica = append(replica, __res)
   125  //			}
   126  //			return nil
   127  //		})
   128  //	}
   129  //
   130  // ```
   131  // <!--End PulumiCodeChooser -->
   132  //
   133  // ### Redis Cluster Mode Enabled
   134  //
   135  // To create two shards with a primary and a single read replica each:
   136  //
   137  // <!--Start PulumiCodeChooser -->
   138  // ```go
   139  // package main
   140  //
   141  // import (
   142  //
   143  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
   144  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   145  //
   146  // )
   147  //
   148  //	func main() {
   149  //		pulumi.Run(func(ctx *pulumi.Context) error {
   150  //			_, err := elasticache.NewReplicationGroup(ctx, "baz", &elasticache.ReplicationGroupArgs{
   151  //				ReplicationGroupId:       pulumi.String("tf-redis-cluster"),
   152  //				Description:              pulumi.String("example description"),
   153  //				NodeType:                 pulumi.String("cache.t2.small"),
   154  //				Port:                     pulumi.Int(6379),
   155  //				ParameterGroupName:       pulumi.String("default.redis3.2.cluster.on"),
   156  //				AutomaticFailoverEnabled: pulumi.Bool(true),
   157  //				NumNodeGroups:            pulumi.Int(2),
   158  //				ReplicasPerNodeGroup:     pulumi.Int(1),
   159  //			})
   160  //			if err != nil {
   161  //				return err
   162  //			}
   163  //			return nil
   164  //		})
   165  //	}
   166  //
   167  // ```
   168  // <!--End PulumiCodeChooser -->
   169  //
   170  // ### Redis Log Delivery configuration
   171  //
   172  // <!--Start PulumiCodeChooser -->
   173  // ```go
   174  // package main
   175  //
   176  // import (
   177  //
   178  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
   179  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   180  //
   181  // )
   182  //
   183  //	func main() {
   184  //		pulumi.Run(func(ctx *pulumi.Context) error {
   185  //			_, err := elasticache.NewReplicationGroup(ctx, "test", &elasticache.ReplicationGroupArgs{
   186  //				ReplicationGroupId:      pulumi.String("myreplicaciongroup"),
   187  //				Description:             pulumi.String("test description"),
   188  //				NodeType:                pulumi.String("cache.t3.small"),
   189  //				Port:                    pulumi.Int(6379),
   190  //				ApplyImmediately:        pulumi.Bool(true),
   191  //				AutoMinorVersionUpgrade: pulumi.Bool(false),
   192  //				MaintenanceWindow:       pulumi.String("tue:06:30-tue:07:30"),
   193  //				SnapshotWindow:          pulumi.String("01:00-02:00"),
   194  //				LogDeliveryConfigurations: elasticache.ReplicationGroupLogDeliveryConfigurationArray{
   195  //					&elasticache.ReplicationGroupLogDeliveryConfigurationArgs{
   196  //						Destination:     pulumi.Any(example.Name),
   197  //						DestinationType: pulumi.String("cloudwatch-logs"),
   198  //						LogFormat:       pulumi.String("text"),
   199  //						LogType:         pulumi.String("slow-log"),
   200  //					},
   201  //					&elasticache.ReplicationGroupLogDeliveryConfigurationArgs{
   202  //						Destination:     pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),
   203  //						DestinationType: pulumi.String("kinesis-firehose"),
   204  //						LogFormat:       pulumi.String("json"),
   205  //						LogType:         pulumi.String("engine-log"),
   206  //					},
   207  //				},
   208  //			})
   209  //			if err != nil {
   210  //				return err
   211  //			}
   212  //			return nil
   213  //		})
   214  //	}
   215  //
   216  // ```
   217  // <!--End PulumiCodeChooser -->
   218  //
   219  // > **Note:** We currently do not support passing a `primaryClusterId` in order to create the Replication Group.
   220  //
   221  // > **Note:** Automatic Failover is unavailable for Redis versions earlier than 2.8.6,
   222  // 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
   223  // for full details on using Replication Groups.
   224  //
   225  // ### Creating a secondary replication group for a global replication group
   226  //
   227  // A Global Replication Group can have one one two secondary Replication Groups in different regions. These are added to an existing Global Replication Group.
   228  //
   229  // <!--Start PulumiCodeChooser -->
   230  // ```go
   231  // package main
   232  //
   233  // import (
   234  //
   235  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
   236  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   237  //
   238  // )
   239  //
   240  //	func main() {
   241  //		pulumi.Run(func(ctx *pulumi.Context) error {
   242  //			primary, err := elasticache.NewReplicationGroup(ctx, "primary", &elasticache.ReplicationGroupArgs{
   243  //				ReplicationGroupId: pulumi.String("example-primary"),
   244  //				Description:        pulumi.String("primary replication group"),
   245  //				Engine:             pulumi.String("redis"),
   246  //				EngineVersion:      pulumi.String("5.0.6"),
   247  //				NodeType:           pulumi.String("cache.m5.large"),
   248  //				NumCacheClusters:   pulumi.Int(1),
   249  //			})
   250  //			if err != nil {
   251  //				return err
   252  //			}
   253  //			example, err := elasticache.NewGlobalReplicationGroup(ctx, "example", &elasticache.GlobalReplicationGroupArgs{
   254  //				GlobalReplicationGroupIdSuffix: pulumi.String("example"),
   255  //				PrimaryReplicationGroupId:      primary.ID(),
   256  //			})
   257  //			if err != nil {
   258  //				return err
   259  //			}
   260  //			_, err = elasticache.NewReplicationGroup(ctx, "secondary", &elasticache.ReplicationGroupArgs{
   261  //				ReplicationGroupId:       pulumi.String("example-secondary"),
   262  //				Description:              pulumi.String("secondary replication group"),
   263  //				GlobalReplicationGroupId: example.GlobalReplicationGroupId,
   264  //				NumCacheClusters:         pulumi.Int(1),
   265  //			})
   266  //			if err != nil {
   267  //				return err
   268  //			}
   269  //			return nil
   270  //		})
   271  //	}
   272  //
   273  // ```
   274  // <!--End PulumiCodeChooser -->
   275  //
   276  // ### Redis AUTH and In-Transit Encryption Enabled
   277  //
   278  // <!--Start PulumiCodeChooser -->
   279  // ```go
   280  // package main
   281  //
   282  // import (
   283  //
   284  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
   285  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   286  //
   287  // )
   288  //
   289  //	func main() {
   290  //		pulumi.Run(func(ctx *pulumi.Context) error {
   291  //			_, err := elasticache.NewReplicationGroup(ctx, "example", &elasticache.ReplicationGroupArgs{
   292  //				ReplicationGroupId: pulumi.String("example"),
   293  //				Description:        pulumi.String("example with authentication"),
   294  //				NodeType:           pulumi.String("cache.t2.micro"),
   295  //				NumCacheClusters:   pulumi.Int(1),
   296  //				Port:               pulumi.Int(6379),
   297  //				SubnetGroupName:    pulumi.Any(exampleAwsElasticacheSubnetGroup.Name),
   298  //				SecurityGroupIds: pulumi.StringArray{
   299  //					exampleAwsSecurityGroup.Id,
   300  //				},
   301  //				ParameterGroupName:       pulumi.String("default.redis5.0"),
   302  //				EngineVersion:            pulumi.String("5.0.6"),
   303  //				TransitEncryptionEnabled: pulumi.Bool(true),
   304  //				AuthToken:                pulumi.String("abcdefgh1234567890"),
   305  //				AuthTokenUpdateStrategy:  pulumi.String("ROTATE"),
   306  //			})
   307  //			if err != nil {
   308  //				return err
   309  //			}
   310  //			return nil
   311  //		})
   312  //	}
   313  //
   314  // ```
   315  // <!--End PulumiCodeChooser -->
   316  //
   317  // > 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.
   318  //
   319  // ## Import
   320  //
   321  // Using `pulumi import`, import ElastiCache Replication Groups using the `replication_group_id`. For example:
   322  //
   323  // ```sh
   324  // $ pulumi import aws:elasticache/replicationGroup:ReplicationGroup my_replication_group replication-group-1
   325  // ```
   326  type ReplicationGroup struct {
   327  	pulumi.CustomResourceState
   328  
   329  	// Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   330  	ApplyImmediately pulumi.BoolOutput `pulumi:"applyImmediately"`
   331  	// ARN of the created ElastiCache Replication Group.
   332  	Arn pulumi.StringOutput `pulumi:"arn"`
   333  	// Whether to enable encryption at rest.
   334  	AtRestEncryptionEnabled pulumi.BoolOutput `pulumi:"atRestEncryptionEnabled"`
   335  	// Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   336  	AuthToken pulumi.StringPtrOutput `pulumi:"authToken"`
   337  	// Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   338  	AuthTokenUpdateStrategy pulumi.StringPtrOutput `pulumi:"authTokenUpdateStrategy"`
   339  	// Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   340  	// Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   341  	// Defaults to `true`.
   342  	AutoMinorVersionUpgrade pulumi.BoolOutput `pulumi:"autoMinorVersionUpgrade"`
   343  	// 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`.
   344  	AutomaticFailoverEnabled pulumi.BoolPtrOutput `pulumi:"automaticFailoverEnabled"`
   345  	// Indicates if cluster mode is enabled.
   346  	ClusterEnabled pulumi.BoolOutput `pulumi:"clusterEnabled"`
   347  	// Address of the replication group configuration endpoint when cluster mode is enabled.
   348  	ConfigurationEndpointAddress pulumi.StringOutput `pulumi:"configurationEndpointAddress"`
   349  	// 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.
   350  	DataTieringEnabled pulumi.BoolOutput `pulumi:"dataTieringEnabled"`
   351  	// User-created description for the replication group. Must not be empty.
   352  	Description pulumi.StringOutput `pulumi:"description"`
   353  	// Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
   354  	Engine pulumi.StringPtrOutput `pulumi:"engine"`
   355  	// Version number of the cache engine to be used for the cache clusters in this replication group.
   356  	// If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   357  	// If the version is 6, the major and minor version can be set, e.g., `6.2`,
   358  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   359  	// Otherwise, specify the full version desired, e.g., `5.0.6`.
   360  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   361  	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
   362  	// Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine.
   363  	EngineVersionActual pulumi.StringOutput `pulumi:"engineVersionActual"`
   364  	// 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.
   365  	FinalSnapshotIdentifier pulumi.StringPtrOutput `pulumi:"finalSnapshotIdentifier"`
   366  	// 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.
   367  	GlobalReplicationGroupId pulumi.StringOutput `pulumi:"globalReplicationGroupId"`
   368  	// The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
   369  	IpDiscovery pulumi.StringOutput `pulumi:"ipDiscovery"`
   370  	// 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`.
   371  	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
   372  	// Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
   373  	LogDeliveryConfigurations ReplicationGroupLogDeliveryConfigurationArrayOutput `pulumi:"logDeliveryConfigurations"`
   374  	// 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`
   375  	MaintenanceWindow pulumi.StringOutput `pulumi:"maintenanceWindow"`
   376  	// Identifiers of all the nodes that are part of this replication group.
   377  	MemberClusters pulumi.StringArrayOutput `pulumi:"memberClusters"`
   378  	// Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
   379  	MultiAzEnabled pulumi.BoolPtrOutput `pulumi:"multiAzEnabled"`
   380  	// The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
   381  	NetworkType pulumi.StringOutput `pulumi:"networkType"`
   382  	// 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.
   383  	NodeType pulumi.StringOutput `pulumi:"nodeType"`
   384  	// ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
   385  	NotificationTopicArn pulumi.StringPtrOutput `pulumi:"notificationTopicArn"`
   386  	// Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
   387  	NumCacheClusters pulumi.IntOutput `pulumi:"numCacheClusters"`
   388  	// Number of node groups (shards) for this Redis replication group.
   389  	// Changing this number will trigger a resizing operation before other settings modifications.
   390  	NumNodeGroups pulumi.IntOutput `pulumi:"numNodeGroups"`
   391  	// 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.
   392  	ParameterGroupName pulumi.StringOutput `pulumi:"parameterGroupName"`
   393  	// 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.
   394  	Port pulumi.IntPtrOutput `pulumi:"port"`
   395  	// 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.
   396  	PreferredCacheClusterAzs pulumi.StringArrayOutput `pulumi:"preferredCacheClusterAzs"`
   397  	// (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled.
   398  	PrimaryEndpointAddress pulumi.StringOutput `pulumi:"primaryEndpointAddress"`
   399  	// (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled.
   400  	ReaderEndpointAddress pulumi.StringOutput `pulumi:"readerEndpointAddress"`
   401  	// Number of replica nodes in each node group.
   402  	// Changing this number will trigger a resizing operation before other settings modifications.
   403  	// Valid values are 0 to 5.
   404  	ReplicasPerNodeGroup pulumi.IntOutput `pulumi:"replicasPerNodeGroup"`
   405  	// Replication group identifier. This parameter is stored as a lowercase string.
   406  	//
   407  	// The following arguments are optional:
   408  	ReplicationGroupId pulumi.StringOutput `pulumi:"replicationGroupId"`
   409  	// 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.
   410  	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
   411  	// 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.
   412  	SecurityGroupNames pulumi.StringArrayOutput `pulumi:"securityGroupNames"`
   413  	// List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
   414  	SnapshotArns pulumi.StringArrayOutput `pulumi:"snapshotArns"`
   415  	// Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
   416  	SnapshotName pulumi.StringPtrOutput `pulumi:"snapshotName"`
   417  	// 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
   418  	SnapshotRetentionLimit pulumi.IntPtrOutput `pulumi:"snapshotRetentionLimit"`
   419  	// 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`
   420  	SnapshotWindow pulumi.StringOutput `pulumi:"snapshotWindow"`
   421  	// Name of the cache subnet group to be used for the replication group.
   422  	SubnetGroupName pulumi.StringOutput `pulumi:"subnetGroupName"`
   423  	// 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.
   424  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   425  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   426  	//
   427  	// Deprecated: Please use `tags` instead.
   428  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   429  	// Whether to enable encryption in transit.
   430  	TransitEncryptionEnabled pulumi.BoolOutput `pulumi:"transitEncryptionEnabled"`
   431  	// 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.
   432  	UserGroupIds pulumi.StringArrayOutput `pulumi:"userGroupIds"`
   433  }
   434  
   435  // NewReplicationGroup registers a new resource with the given unique name, arguments, and options.
   436  func NewReplicationGroup(ctx *pulumi.Context,
   437  	name string, args *ReplicationGroupArgs, opts ...pulumi.ResourceOption) (*ReplicationGroup, error) {
   438  	if args == nil {
   439  		args = &ReplicationGroupArgs{}
   440  	}
   441  
   442  	if args.AuthToken != nil {
   443  		args.AuthToken = pulumi.ToSecret(args.AuthToken).(pulumi.StringPtrInput)
   444  	}
   445  	secrets := pulumi.AdditionalSecretOutputs([]string{
   446  		"authToken",
   447  	})
   448  	opts = append(opts, secrets)
   449  	opts = internal.PkgResourceDefaultOpts(opts)
   450  	var resource ReplicationGroup
   451  	err := ctx.RegisterResource("aws:elasticache/replicationGroup:ReplicationGroup", name, args, &resource, opts...)
   452  	if err != nil {
   453  		return nil, err
   454  	}
   455  	return &resource, nil
   456  }
   457  
   458  // GetReplicationGroup gets an existing ReplicationGroup resource's state with the given name, ID, and optional
   459  // state properties that are used to uniquely qualify the lookup (nil if not required).
   460  func GetReplicationGroup(ctx *pulumi.Context,
   461  	name string, id pulumi.IDInput, state *ReplicationGroupState, opts ...pulumi.ResourceOption) (*ReplicationGroup, error) {
   462  	var resource ReplicationGroup
   463  	err := ctx.ReadResource("aws:elasticache/replicationGroup:ReplicationGroup", name, id, state, &resource, opts...)
   464  	if err != nil {
   465  		return nil, err
   466  	}
   467  	return &resource, nil
   468  }
   469  
   470  // Input properties used for looking up and filtering ReplicationGroup resources.
   471  type replicationGroupState struct {
   472  	// Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   473  	ApplyImmediately *bool `pulumi:"applyImmediately"`
   474  	// ARN of the created ElastiCache Replication Group.
   475  	Arn *string `pulumi:"arn"`
   476  	// Whether to enable encryption at rest.
   477  	AtRestEncryptionEnabled *bool `pulumi:"atRestEncryptionEnabled"`
   478  	// Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   479  	AuthToken *string `pulumi:"authToken"`
   480  	// Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   481  	AuthTokenUpdateStrategy *string `pulumi:"authTokenUpdateStrategy"`
   482  	// Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   483  	// Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   484  	// Defaults to `true`.
   485  	AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
   486  	// 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`.
   487  	AutomaticFailoverEnabled *bool `pulumi:"automaticFailoverEnabled"`
   488  	// Indicates if cluster mode is enabled.
   489  	ClusterEnabled *bool `pulumi:"clusterEnabled"`
   490  	// Address of the replication group configuration endpoint when cluster mode is enabled.
   491  	ConfigurationEndpointAddress *string `pulumi:"configurationEndpointAddress"`
   492  	// 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.
   493  	DataTieringEnabled *bool `pulumi:"dataTieringEnabled"`
   494  	// User-created description for the replication group. Must not be empty.
   495  	Description *string `pulumi:"description"`
   496  	// Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
   497  	Engine *string `pulumi:"engine"`
   498  	// Version number of the cache engine to be used for the cache clusters in this replication group.
   499  	// If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   500  	// If the version is 6, the major and minor version can be set, e.g., `6.2`,
   501  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   502  	// Otherwise, specify the full version desired, e.g., `5.0.6`.
   503  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   504  	EngineVersion *string `pulumi:"engineVersion"`
   505  	// Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine.
   506  	EngineVersionActual *string `pulumi:"engineVersionActual"`
   507  	// 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.
   508  	FinalSnapshotIdentifier *string `pulumi:"finalSnapshotIdentifier"`
   509  	// 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.
   510  	GlobalReplicationGroupId *string `pulumi:"globalReplicationGroupId"`
   511  	// The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
   512  	IpDiscovery *string `pulumi:"ipDiscovery"`
   513  	// 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`.
   514  	KmsKeyId *string `pulumi:"kmsKeyId"`
   515  	// Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
   516  	LogDeliveryConfigurations []ReplicationGroupLogDeliveryConfiguration `pulumi:"logDeliveryConfigurations"`
   517  	// 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`
   518  	MaintenanceWindow *string `pulumi:"maintenanceWindow"`
   519  	// Identifiers of all the nodes that are part of this replication group.
   520  	MemberClusters []string `pulumi:"memberClusters"`
   521  	// Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
   522  	MultiAzEnabled *bool `pulumi:"multiAzEnabled"`
   523  	// The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
   524  	NetworkType *string `pulumi:"networkType"`
   525  	// 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.
   526  	NodeType *string `pulumi:"nodeType"`
   527  	// ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
   528  	NotificationTopicArn *string `pulumi:"notificationTopicArn"`
   529  	// Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
   530  	NumCacheClusters *int `pulumi:"numCacheClusters"`
   531  	// Number of node groups (shards) for this Redis replication group.
   532  	// Changing this number will trigger a resizing operation before other settings modifications.
   533  	NumNodeGroups *int `pulumi:"numNodeGroups"`
   534  	// 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.
   535  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   536  	// 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.
   537  	Port *int `pulumi:"port"`
   538  	// 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.
   539  	PreferredCacheClusterAzs []string `pulumi:"preferredCacheClusterAzs"`
   540  	// (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled.
   541  	PrimaryEndpointAddress *string `pulumi:"primaryEndpointAddress"`
   542  	// (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled.
   543  	ReaderEndpointAddress *string `pulumi:"readerEndpointAddress"`
   544  	// Number of replica nodes in each node group.
   545  	// Changing this number will trigger a resizing operation before other settings modifications.
   546  	// Valid values are 0 to 5.
   547  	ReplicasPerNodeGroup *int `pulumi:"replicasPerNodeGroup"`
   548  	// Replication group identifier. This parameter is stored as a lowercase string.
   549  	//
   550  	// The following arguments are optional:
   551  	ReplicationGroupId *string `pulumi:"replicationGroupId"`
   552  	// 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.
   553  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   554  	// 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.
   555  	SecurityGroupNames []string `pulumi:"securityGroupNames"`
   556  	// List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
   557  	SnapshotArns []string `pulumi:"snapshotArns"`
   558  	// Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
   559  	SnapshotName *string `pulumi:"snapshotName"`
   560  	// 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
   561  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   562  	// 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`
   563  	SnapshotWindow *string `pulumi:"snapshotWindow"`
   564  	// Name of the cache subnet group to be used for the replication group.
   565  	SubnetGroupName *string `pulumi:"subnetGroupName"`
   566  	// 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.
   567  	Tags map[string]string `pulumi:"tags"`
   568  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   569  	//
   570  	// Deprecated: Please use `tags` instead.
   571  	TagsAll map[string]string `pulumi:"tagsAll"`
   572  	// Whether to enable encryption in transit.
   573  	TransitEncryptionEnabled *bool `pulumi:"transitEncryptionEnabled"`
   574  	// 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.
   575  	UserGroupIds []string `pulumi:"userGroupIds"`
   576  }
   577  
   578  type ReplicationGroupState struct {
   579  	// Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   580  	ApplyImmediately pulumi.BoolPtrInput
   581  	// ARN of the created ElastiCache Replication Group.
   582  	Arn pulumi.StringPtrInput
   583  	// Whether to enable encryption at rest.
   584  	AtRestEncryptionEnabled pulumi.BoolPtrInput
   585  	// Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   586  	AuthToken pulumi.StringPtrInput
   587  	// Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   588  	AuthTokenUpdateStrategy pulumi.StringPtrInput
   589  	// Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   590  	// Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   591  	// Defaults to `true`.
   592  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   593  	// 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`.
   594  	AutomaticFailoverEnabled pulumi.BoolPtrInput
   595  	// Indicates if cluster mode is enabled.
   596  	ClusterEnabled pulumi.BoolPtrInput
   597  	// Address of the replication group configuration endpoint when cluster mode is enabled.
   598  	ConfigurationEndpointAddress pulumi.StringPtrInput
   599  	// 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.
   600  	DataTieringEnabled pulumi.BoolPtrInput
   601  	// User-created description for the replication group. Must not be empty.
   602  	Description pulumi.StringPtrInput
   603  	// Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
   604  	Engine pulumi.StringPtrInput
   605  	// Version number of the cache engine to be used for the cache clusters in this replication group.
   606  	// If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   607  	// If the version is 6, the major and minor version can be set, e.g., `6.2`,
   608  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   609  	// Otherwise, specify the full version desired, e.g., `5.0.6`.
   610  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   611  	EngineVersion pulumi.StringPtrInput
   612  	// Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine.
   613  	EngineVersionActual pulumi.StringPtrInput
   614  	// 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.
   615  	FinalSnapshotIdentifier pulumi.StringPtrInput
   616  	// 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.
   617  	GlobalReplicationGroupId pulumi.StringPtrInput
   618  	// The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
   619  	IpDiscovery pulumi.StringPtrInput
   620  	// 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`.
   621  	KmsKeyId pulumi.StringPtrInput
   622  	// Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
   623  	LogDeliveryConfigurations ReplicationGroupLogDeliveryConfigurationArrayInput
   624  	// 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`
   625  	MaintenanceWindow pulumi.StringPtrInput
   626  	// Identifiers of all the nodes that are part of this replication group.
   627  	MemberClusters pulumi.StringArrayInput
   628  	// Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
   629  	MultiAzEnabled pulumi.BoolPtrInput
   630  	// The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
   631  	NetworkType pulumi.StringPtrInput
   632  	// 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.
   633  	NodeType pulumi.StringPtrInput
   634  	// ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
   635  	NotificationTopicArn pulumi.StringPtrInput
   636  	// Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
   637  	NumCacheClusters pulumi.IntPtrInput
   638  	// Number of node groups (shards) for this Redis replication group.
   639  	// Changing this number will trigger a resizing operation before other settings modifications.
   640  	NumNodeGroups pulumi.IntPtrInput
   641  	// 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.
   642  	ParameterGroupName pulumi.StringPtrInput
   643  	// 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.
   644  	Port pulumi.IntPtrInput
   645  	// 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.
   646  	PreferredCacheClusterAzs pulumi.StringArrayInput
   647  	// (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled.
   648  	PrimaryEndpointAddress pulumi.StringPtrInput
   649  	// (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled.
   650  	ReaderEndpointAddress pulumi.StringPtrInput
   651  	// Number of replica nodes in each node group.
   652  	// Changing this number will trigger a resizing operation before other settings modifications.
   653  	// Valid values are 0 to 5.
   654  	ReplicasPerNodeGroup pulumi.IntPtrInput
   655  	// Replication group identifier. This parameter is stored as a lowercase string.
   656  	//
   657  	// The following arguments are optional:
   658  	ReplicationGroupId pulumi.StringPtrInput
   659  	// 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.
   660  	SecurityGroupIds pulumi.StringArrayInput
   661  	// 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.
   662  	SecurityGroupNames pulumi.StringArrayInput
   663  	// List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
   664  	SnapshotArns pulumi.StringArrayInput
   665  	// Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
   666  	SnapshotName pulumi.StringPtrInput
   667  	// 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
   668  	SnapshotRetentionLimit pulumi.IntPtrInput
   669  	// 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`
   670  	SnapshotWindow pulumi.StringPtrInput
   671  	// Name of the cache subnet group to be used for the replication group.
   672  	SubnetGroupName pulumi.StringPtrInput
   673  	// 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.
   674  	Tags pulumi.StringMapInput
   675  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   676  	//
   677  	// Deprecated: Please use `tags` instead.
   678  	TagsAll pulumi.StringMapInput
   679  	// Whether to enable encryption in transit.
   680  	TransitEncryptionEnabled pulumi.BoolPtrInput
   681  	// 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.
   682  	UserGroupIds pulumi.StringArrayInput
   683  }
   684  
   685  func (ReplicationGroupState) ElementType() reflect.Type {
   686  	return reflect.TypeOf((*replicationGroupState)(nil)).Elem()
   687  }
   688  
   689  type replicationGroupArgs struct {
   690  	// Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   691  	ApplyImmediately *bool `pulumi:"applyImmediately"`
   692  	// Whether to enable encryption at rest.
   693  	AtRestEncryptionEnabled *bool `pulumi:"atRestEncryptionEnabled"`
   694  	// Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   695  	AuthToken *string `pulumi:"authToken"`
   696  	// Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   697  	AuthTokenUpdateStrategy *string `pulumi:"authTokenUpdateStrategy"`
   698  	// Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   699  	// Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   700  	// Defaults to `true`.
   701  	AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
   702  	// 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`.
   703  	AutomaticFailoverEnabled *bool `pulumi:"automaticFailoverEnabled"`
   704  	// 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.
   705  	DataTieringEnabled *bool `pulumi:"dataTieringEnabled"`
   706  	// User-created description for the replication group. Must not be empty.
   707  	Description *string `pulumi:"description"`
   708  	// Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
   709  	Engine *string `pulumi:"engine"`
   710  	// Version number of the cache engine to be used for the cache clusters in this replication group.
   711  	// If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   712  	// If the version is 6, the major and minor version can be set, e.g., `6.2`,
   713  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   714  	// Otherwise, specify the full version desired, e.g., `5.0.6`.
   715  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   716  	EngineVersion *string `pulumi:"engineVersion"`
   717  	// 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.
   718  	FinalSnapshotIdentifier *string `pulumi:"finalSnapshotIdentifier"`
   719  	// 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.
   720  	GlobalReplicationGroupId *string `pulumi:"globalReplicationGroupId"`
   721  	// The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
   722  	IpDiscovery *string `pulumi:"ipDiscovery"`
   723  	// 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`.
   724  	KmsKeyId *string `pulumi:"kmsKeyId"`
   725  	// Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
   726  	LogDeliveryConfigurations []ReplicationGroupLogDeliveryConfiguration `pulumi:"logDeliveryConfigurations"`
   727  	// 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`
   728  	MaintenanceWindow *string `pulumi:"maintenanceWindow"`
   729  	// Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
   730  	MultiAzEnabled *bool `pulumi:"multiAzEnabled"`
   731  	// The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
   732  	NetworkType *string `pulumi:"networkType"`
   733  	// 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.
   734  	NodeType *string `pulumi:"nodeType"`
   735  	// ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
   736  	NotificationTopicArn *string `pulumi:"notificationTopicArn"`
   737  	// Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
   738  	NumCacheClusters *int `pulumi:"numCacheClusters"`
   739  	// Number of node groups (shards) for this Redis replication group.
   740  	// Changing this number will trigger a resizing operation before other settings modifications.
   741  	NumNodeGroups *int `pulumi:"numNodeGroups"`
   742  	// 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.
   743  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   744  	// 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.
   745  	Port *int `pulumi:"port"`
   746  	// 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.
   747  	PreferredCacheClusterAzs []string `pulumi:"preferredCacheClusterAzs"`
   748  	// Number of replica nodes in each node group.
   749  	// Changing this number will trigger a resizing operation before other settings modifications.
   750  	// Valid values are 0 to 5.
   751  	ReplicasPerNodeGroup *int `pulumi:"replicasPerNodeGroup"`
   752  	// Replication group identifier. This parameter is stored as a lowercase string.
   753  	//
   754  	// The following arguments are optional:
   755  	ReplicationGroupId *string `pulumi:"replicationGroupId"`
   756  	// 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.
   757  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   758  	// 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.
   759  	SecurityGroupNames []string `pulumi:"securityGroupNames"`
   760  	// List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
   761  	SnapshotArns []string `pulumi:"snapshotArns"`
   762  	// Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
   763  	SnapshotName *string `pulumi:"snapshotName"`
   764  	// 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
   765  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   766  	// 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`
   767  	SnapshotWindow *string `pulumi:"snapshotWindow"`
   768  	// Name of the cache subnet group to be used for the replication group.
   769  	SubnetGroupName *string `pulumi:"subnetGroupName"`
   770  	// 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.
   771  	Tags map[string]string `pulumi:"tags"`
   772  	// Whether to enable encryption in transit.
   773  	TransitEncryptionEnabled *bool `pulumi:"transitEncryptionEnabled"`
   774  	// 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.
   775  	UserGroupIds []string `pulumi:"userGroupIds"`
   776  }
   777  
   778  // The set of arguments for constructing a ReplicationGroup resource.
   779  type ReplicationGroupArgs struct {
   780  	// Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   781  	ApplyImmediately pulumi.BoolPtrInput
   782  	// Whether to enable encryption at rest.
   783  	AtRestEncryptionEnabled pulumi.BoolPtrInput
   784  	// Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   785  	AuthToken pulumi.StringPtrInput
   786  	// Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   787  	AuthTokenUpdateStrategy pulumi.StringPtrInput
   788  	// Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   789  	// Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   790  	// Defaults to `true`.
   791  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   792  	// 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`.
   793  	AutomaticFailoverEnabled pulumi.BoolPtrInput
   794  	// 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.
   795  	DataTieringEnabled pulumi.BoolPtrInput
   796  	// User-created description for the replication group. Must not be empty.
   797  	Description pulumi.StringPtrInput
   798  	// Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
   799  	Engine pulumi.StringPtrInput
   800  	// Version number of the cache engine to be used for the cache clusters in this replication group.
   801  	// If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   802  	// If the version is 6, the major and minor version can be set, e.g., `6.2`,
   803  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   804  	// Otherwise, specify the full version desired, e.g., `5.0.6`.
   805  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   806  	EngineVersion pulumi.StringPtrInput
   807  	// 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.
   808  	FinalSnapshotIdentifier pulumi.StringPtrInput
   809  	// 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.
   810  	GlobalReplicationGroupId pulumi.StringPtrInput
   811  	// The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
   812  	IpDiscovery pulumi.StringPtrInput
   813  	// 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`.
   814  	KmsKeyId pulumi.StringPtrInput
   815  	// Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
   816  	LogDeliveryConfigurations ReplicationGroupLogDeliveryConfigurationArrayInput
   817  	// 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`
   818  	MaintenanceWindow pulumi.StringPtrInput
   819  	// Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
   820  	MultiAzEnabled pulumi.BoolPtrInput
   821  	// The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
   822  	NetworkType pulumi.StringPtrInput
   823  	// 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.
   824  	NodeType pulumi.StringPtrInput
   825  	// ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
   826  	NotificationTopicArn pulumi.StringPtrInput
   827  	// Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
   828  	NumCacheClusters pulumi.IntPtrInput
   829  	// Number of node groups (shards) for this Redis replication group.
   830  	// Changing this number will trigger a resizing operation before other settings modifications.
   831  	NumNodeGroups pulumi.IntPtrInput
   832  	// 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.
   833  	ParameterGroupName pulumi.StringPtrInput
   834  	// 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.
   835  	Port pulumi.IntPtrInput
   836  	// 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.
   837  	PreferredCacheClusterAzs pulumi.StringArrayInput
   838  	// Number of replica nodes in each node group.
   839  	// Changing this number will trigger a resizing operation before other settings modifications.
   840  	// Valid values are 0 to 5.
   841  	ReplicasPerNodeGroup pulumi.IntPtrInput
   842  	// Replication group identifier. This parameter is stored as a lowercase string.
   843  	//
   844  	// The following arguments are optional:
   845  	ReplicationGroupId pulumi.StringPtrInput
   846  	// 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.
   847  	SecurityGroupIds pulumi.StringArrayInput
   848  	// 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.
   849  	SecurityGroupNames pulumi.StringArrayInput
   850  	// List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
   851  	SnapshotArns pulumi.StringArrayInput
   852  	// Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
   853  	SnapshotName pulumi.StringPtrInput
   854  	// 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
   855  	SnapshotRetentionLimit pulumi.IntPtrInput
   856  	// 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`
   857  	SnapshotWindow pulumi.StringPtrInput
   858  	// Name of the cache subnet group to be used for the replication group.
   859  	SubnetGroupName pulumi.StringPtrInput
   860  	// 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.
   861  	Tags pulumi.StringMapInput
   862  	// Whether to enable encryption in transit.
   863  	TransitEncryptionEnabled pulumi.BoolPtrInput
   864  	// 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.
   865  	UserGroupIds pulumi.StringArrayInput
   866  }
   867  
   868  func (ReplicationGroupArgs) ElementType() reflect.Type {
   869  	return reflect.TypeOf((*replicationGroupArgs)(nil)).Elem()
   870  }
   871  
   872  type ReplicationGroupInput interface {
   873  	pulumi.Input
   874  
   875  	ToReplicationGroupOutput() ReplicationGroupOutput
   876  	ToReplicationGroupOutputWithContext(ctx context.Context) ReplicationGroupOutput
   877  }
   878  
   879  func (*ReplicationGroup) ElementType() reflect.Type {
   880  	return reflect.TypeOf((**ReplicationGroup)(nil)).Elem()
   881  }
   882  
   883  func (i *ReplicationGroup) ToReplicationGroupOutput() ReplicationGroupOutput {
   884  	return i.ToReplicationGroupOutputWithContext(context.Background())
   885  }
   886  
   887  func (i *ReplicationGroup) ToReplicationGroupOutputWithContext(ctx context.Context) ReplicationGroupOutput {
   888  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationGroupOutput)
   889  }
   890  
   891  // ReplicationGroupArrayInput is an input type that accepts ReplicationGroupArray and ReplicationGroupArrayOutput values.
   892  // You can construct a concrete instance of `ReplicationGroupArrayInput` via:
   893  //
   894  //	ReplicationGroupArray{ ReplicationGroupArgs{...} }
   895  type ReplicationGroupArrayInput interface {
   896  	pulumi.Input
   897  
   898  	ToReplicationGroupArrayOutput() ReplicationGroupArrayOutput
   899  	ToReplicationGroupArrayOutputWithContext(context.Context) ReplicationGroupArrayOutput
   900  }
   901  
   902  type ReplicationGroupArray []ReplicationGroupInput
   903  
   904  func (ReplicationGroupArray) ElementType() reflect.Type {
   905  	return reflect.TypeOf((*[]*ReplicationGroup)(nil)).Elem()
   906  }
   907  
   908  func (i ReplicationGroupArray) ToReplicationGroupArrayOutput() ReplicationGroupArrayOutput {
   909  	return i.ToReplicationGroupArrayOutputWithContext(context.Background())
   910  }
   911  
   912  func (i ReplicationGroupArray) ToReplicationGroupArrayOutputWithContext(ctx context.Context) ReplicationGroupArrayOutput {
   913  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationGroupArrayOutput)
   914  }
   915  
   916  // ReplicationGroupMapInput is an input type that accepts ReplicationGroupMap and ReplicationGroupMapOutput values.
   917  // You can construct a concrete instance of `ReplicationGroupMapInput` via:
   918  //
   919  //	ReplicationGroupMap{ "key": ReplicationGroupArgs{...} }
   920  type ReplicationGroupMapInput interface {
   921  	pulumi.Input
   922  
   923  	ToReplicationGroupMapOutput() ReplicationGroupMapOutput
   924  	ToReplicationGroupMapOutputWithContext(context.Context) ReplicationGroupMapOutput
   925  }
   926  
   927  type ReplicationGroupMap map[string]ReplicationGroupInput
   928  
   929  func (ReplicationGroupMap) ElementType() reflect.Type {
   930  	return reflect.TypeOf((*map[string]*ReplicationGroup)(nil)).Elem()
   931  }
   932  
   933  func (i ReplicationGroupMap) ToReplicationGroupMapOutput() ReplicationGroupMapOutput {
   934  	return i.ToReplicationGroupMapOutputWithContext(context.Background())
   935  }
   936  
   937  func (i ReplicationGroupMap) ToReplicationGroupMapOutputWithContext(ctx context.Context) ReplicationGroupMapOutput {
   938  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationGroupMapOutput)
   939  }
   940  
   941  type ReplicationGroupOutput struct{ *pulumi.OutputState }
   942  
   943  func (ReplicationGroupOutput) ElementType() reflect.Type {
   944  	return reflect.TypeOf((**ReplicationGroup)(nil)).Elem()
   945  }
   946  
   947  func (o ReplicationGroupOutput) ToReplicationGroupOutput() ReplicationGroupOutput {
   948  	return o
   949  }
   950  
   951  func (o ReplicationGroupOutput) ToReplicationGroupOutputWithContext(ctx context.Context) ReplicationGroupOutput {
   952  	return o
   953  }
   954  
   955  // Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`.
   956  func (o ReplicationGroupOutput) ApplyImmediately() pulumi.BoolOutput {
   957  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.ApplyImmediately }).(pulumi.BoolOutput)
   958  }
   959  
   960  // ARN of the created ElastiCache Replication Group.
   961  func (o ReplicationGroupOutput) Arn() pulumi.StringOutput {
   962  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   963  }
   964  
   965  // Whether to enable encryption at rest.
   966  func (o ReplicationGroupOutput) AtRestEncryptionEnabled() pulumi.BoolOutput {
   967  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.AtRestEncryptionEnabled }).(pulumi.BoolOutput)
   968  }
   969  
   970  // Password used to access a password protected server. Can be specified only if `transitEncryptionEnabled = true`.
   971  func (o ReplicationGroupOutput) AuthToken() pulumi.StringPtrOutput {
   972  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.AuthToken }).(pulumi.StringPtrOutput)
   973  }
   974  
   975  // Strategy to use when updating the `authToken`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`.
   976  func (o ReplicationGroupOutput) AuthTokenUpdateStrategy() pulumi.StringPtrOutput {
   977  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.AuthTokenUpdateStrategy }).(pulumi.StringPtrOutput)
   978  }
   979  
   980  // Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window.
   981  // Only supported for engine type `"redis"` and if the engine version is 6 or higher.
   982  // Defaults to `true`.
   983  func (o ReplicationGroupOutput) AutoMinorVersionUpgrade() pulumi.BoolOutput {
   984  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.AutoMinorVersionUpgrade }).(pulumi.BoolOutput)
   985  }
   986  
   987  // 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`.
   988  func (o ReplicationGroupOutput) AutomaticFailoverEnabled() pulumi.BoolPtrOutput {
   989  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolPtrOutput { return v.AutomaticFailoverEnabled }).(pulumi.BoolPtrOutput)
   990  }
   991  
   992  // Indicates if cluster mode is enabled.
   993  func (o ReplicationGroupOutput) ClusterEnabled() pulumi.BoolOutput {
   994  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.ClusterEnabled }).(pulumi.BoolOutput)
   995  }
   996  
   997  // Address of the replication group configuration endpoint when cluster mode is enabled.
   998  func (o ReplicationGroupOutput) ConfigurationEndpointAddress() pulumi.StringOutput {
   999  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.ConfigurationEndpointAddress }).(pulumi.StringOutput)
  1000  }
  1001  
  1002  // 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.
  1003  func (o ReplicationGroupOutput) DataTieringEnabled() pulumi.BoolOutput {
  1004  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.DataTieringEnabled }).(pulumi.BoolOutput)
  1005  }
  1006  
  1007  // User-created description for the replication group. Must not be empty.
  1008  func (o ReplicationGroupOutput) Description() pulumi.StringOutput {
  1009  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
  1010  }
  1011  
  1012  // Name of the cache engine to be used for the clusters in this replication group. The only valid value is `redis`.
  1013  func (o ReplicationGroupOutput) Engine() pulumi.StringPtrOutput {
  1014  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.Engine }).(pulumi.StringPtrOutput)
  1015  }
  1016  
  1017  // Version number of the cache engine to be used for the cache clusters in this replication group.
  1018  // If the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
  1019  // If the version is 6, the major and minor version can be set, e.g., `6.2`,
  1020  // or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
  1021  // Otherwise, specify the full version desired, e.g., `5.0.6`.
  1022  // The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
  1023  func (o ReplicationGroupOutput) EngineVersion() pulumi.StringOutput {
  1024  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
  1025  }
  1026  
  1027  // Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine.
  1028  func (o ReplicationGroupOutput) EngineVersionActual() pulumi.StringOutput {
  1029  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.EngineVersionActual }).(pulumi.StringOutput)
  1030  }
  1031  
  1032  // 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.
  1033  func (o ReplicationGroupOutput) FinalSnapshotIdentifier() pulumi.StringPtrOutput {
  1034  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.FinalSnapshotIdentifier }).(pulumi.StringPtrOutput)
  1035  }
  1036  
  1037  // 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.
  1038  func (o ReplicationGroupOutput) GlobalReplicationGroupId() pulumi.StringOutput {
  1039  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.GlobalReplicationGroupId }).(pulumi.StringOutput)
  1040  }
  1041  
  1042  // The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`.
  1043  func (o ReplicationGroupOutput) IpDiscovery() pulumi.StringOutput {
  1044  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.IpDiscovery }).(pulumi.StringOutput)
  1045  }
  1046  
  1047  // 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`.
  1048  func (o ReplicationGroupOutput) KmsKeyId() pulumi.StringPtrOutput {
  1049  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.KmsKeyId }).(pulumi.StringPtrOutput)
  1050  }
  1051  
  1052  // Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/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.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See Log Delivery Configuration below for more details.
  1053  func (o ReplicationGroupOutput) LogDeliveryConfigurations() ReplicationGroupLogDeliveryConfigurationArrayOutput {
  1054  	return o.ApplyT(func(v *ReplicationGroup) ReplicationGroupLogDeliveryConfigurationArrayOutput {
  1055  		return v.LogDeliveryConfigurations
  1056  	}).(ReplicationGroupLogDeliveryConfigurationArrayOutput)
  1057  }
  1058  
  1059  // 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`
  1060  func (o ReplicationGroupOutput) MaintenanceWindow() pulumi.StringOutput {
  1061  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.MaintenanceWindow }).(pulumi.StringOutput)
  1062  }
  1063  
  1064  // Identifiers of all the nodes that are part of this replication group.
  1065  func (o ReplicationGroupOutput) MemberClusters() pulumi.StringArrayOutput {
  1066  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.MemberClusters }).(pulumi.StringArrayOutput)
  1067  }
  1068  
  1069  // Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automaticFailoverEnabled` must also be enabled. Defaults to `false`.
  1070  func (o ReplicationGroupOutput) MultiAzEnabled() pulumi.BoolPtrOutput {
  1071  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolPtrOutput { return v.MultiAzEnabled }).(pulumi.BoolPtrOutput)
  1072  }
  1073  
  1074  // The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dualStack`.
  1075  func (o ReplicationGroupOutput) NetworkType() pulumi.StringOutput {
  1076  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.NetworkType }).(pulumi.StringOutput)
  1077  }
  1078  
  1079  // 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.
  1080  func (o ReplicationGroupOutput) NodeType() pulumi.StringOutput {
  1081  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.NodeType }).(pulumi.StringOutput)
  1082  }
  1083  
  1084  // ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`
  1085  func (o ReplicationGroupOutput) NotificationTopicArn() pulumi.StringPtrOutput {
  1086  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.NotificationTopicArn }).(pulumi.StringPtrOutput)
  1087  }
  1088  
  1089  // Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `numNodeGroups`. Defaults to `1`.
  1090  func (o ReplicationGroupOutput) NumCacheClusters() pulumi.IntOutput {
  1091  	return o.ApplyT(func(v *ReplicationGroup) pulumi.IntOutput { return v.NumCacheClusters }).(pulumi.IntOutput)
  1092  }
  1093  
  1094  // Number of node groups (shards) for this Redis replication group.
  1095  // Changing this number will trigger a resizing operation before other settings modifications.
  1096  func (o ReplicationGroupOutput) NumNodeGroups() pulumi.IntOutput {
  1097  	return o.ApplyT(func(v *ReplicationGroup) pulumi.IntOutput { return v.NumNodeGroups }).(pulumi.IntOutput)
  1098  }
  1099  
  1100  // 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.
  1101  func (o ReplicationGroupOutput) ParameterGroupName() pulumi.StringOutput {
  1102  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.ParameterGroupName }).(pulumi.StringOutput)
  1103  }
  1104  
  1105  // 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.
  1106  func (o ReplicationGroupOutput) Port() pulumi.IntPtrOutput {
  1107  	return o.ApplyT(func(v *ReplicationGroup) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput)
  1108  }
  1109  
  1110  // 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.
  1111  func (o ReplicationGroupOutput) PreferredCacheClusterAzs() pulumi.StringArrayOutput {
  1112  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.PreferredCacheClusterAzs }).(pulumi.StringArrayOutput)
  1113  }
  1114  
  1115  // (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled.
  1116  func (o ReplicationGroupOutput) PrimaryEndpointAddress() pulumi.StringOutput {
  1117  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.PrimaryEndpointAddress }).(pulumi.StringOutput)
  1118  }
  1119  
  1120  // (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled.
  1121  func (o ReplicationGroupOutput) ReaderEndpointAddress() pulumi.StringOutput {
  1122  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.ReaderEndpointAddress }).(pulumi.StringOutput)
  1123  }
  1124  
  1125  // Number of replica nodes in each node group.
  1126  // Changing this number will trigger a resizing operation before other settings modifications.
  1127  // Valid values are 0 to 5.
  1128  func (o ReplicationGroupOutput) ReplicasPerNodeGroup() pulumi.IntOutput {
  1129  	return o.ApplyT(func(v *ReplicationGroup) pulumi.IntOutput { return v.ReplicasPerNodeGroup }).(pulumi.IntOutput)
  1130  }
  1131  
  1132  // Replication group identifier. This parameter is stored as a lowercase string.
  1133  //
  1134  // The following arguments are optional:
  1135  func (o ReplicationGroupOutput) ReplicationGroupId() pulumi.StringOutput {
  1136  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.ReplicationGroupId }).(pulumi.StringOutput)
  1137  }
  1138  
  1139  // 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.
  1140  func (o ReplicationGroupOutput) SecurityGroupIds() pulumi.StringArrayOutput {
  1141  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
  1142  }
  1143  
  1144  // 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.
  1145  func (o ReplicationGroupOutput) SecurityGroupNames() pulumi.StringArrayOutput {
  1146  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.SecurityGroupNames }).(pulumi.StringArrayOutput)
  1147  }
  1148  
  1149  // List of ARNs that identify Redis RDB snapshot files stored in Amazon S3. The names object names cannot contain any commas.
  1150  func (o ReplicationGroupOutput) SnapshotArns() pulumi.StringArrayOutput {
  1151  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.SnapshotArns }).(pulumi.StringArrayOutput)
  1152  }
  1153  
  1154  // Name of a snapshot from which to restore data into the new node group. Changing the `snapshotName` forces a new resource.
  1155  func (o ReplicationGroupOutput) SnapshotName() pulumi.StringPtrOutput {
  1156  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringPtrOutput { return v.SnapshotName }).(pulumi.StringPtrOutput)
  1157  }
  1158  
  1159  // 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
  1160  func (o ReplicationGroupOutput) SnapshotRetentionLimit() pulumi.IntPtrOutput {
  1161  	return o.ApplyT(func(v *ReplicationGroup) pulumi.IntPtrOutput { return v.SnapshotRetentionLimit }).(pulumi.IntPtrOutput)
  1162  }
  1163  
  1164  // 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`
  1165  func (o ReplicationGroupOutput) SnapshotWindow() pulumi.StringOutput {
  1166  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.SnapshotWindow }).(pulumi.StringOutput)
  1167  }
  1168  
  1169  // Name of the cache subnet group to be used for the replication group.
  1170  func (o ReplicationGroupOutput) SubnetGroupName() pulumi.StringOutput {
  1171  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringOutput { return v.SubnetGroupName }).(pulumi.StringOutput)
  1172  }
  1173  
  1174  // 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.
  1175  func (o ReplicationGroupOutput) Tags() pulumi.StringMapOutput {
  1176  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
  1177  }
  1178  
  1179  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
  1180  //
  1181  // Deprecated: Please use `tags` instead.
  1182  func (o ReplicationGroupOutput) TagsAll() pulumi.StringMapOutput {
  1183  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
  1184  }
  1185  
  1186  // Whether to enable encryption in transit.
  1187  func (o ReplicationGroupOutput) TransitEncryptionEnabled() pulumi.BoolOutput {
  1188  	return o.ApplyT(func(v *ReplicationGroup) pulumi.BoolOutput { return v.TransitEncryptionEnabled }).(pulumi.BoolOutput)
  1189  }
  1190  
  1191  // 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.
  1192  func (o ReplicationGroupOutput) UserGroupIds() pulumi.StringArrayOutput {
  1193  	return o.ApplyT(func(v *ReplicationGroup) pulumi.StringArrayOutput { return v.UserGroupIds }).(pulumi.StringArrayOutput)
  1194  }
  1195  
  1196  type ReplicationGroupArrayOutput struct{ *pulumi.OutputState }
  1197  
  1198  func (ReplicationGroupArrayOutput) ElementType() reflect.Type {
  1199  	return reflect.TypeOf((*[]*ReplicationGroup)(nil)).Elem()
  1200  }
  1201  
  1202  func (o ReplicationGroupArrayOutput) ToReplicationGroupArrayOutput() ReplicationGroupArrayOutput {
  1203  	return o
  1204  }
  1205  
  1206  func (o ReplicationGroupArrayOutput) ToReplicationGroupArrayOutputWithContext(ctx context.Context) ReplicationGroupArrayOutput {
  1207  	return o
  1208  }
  1209  
  1210  func (o ReplicationGroupArrayOutput) Index(i pulumi.IntInput) ReplicationGroupOutput {
  1211  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationGroup {
  1212  		return vs[0].([]*ReplicationGroup)[vs[1].(int)]
  1213  	}).(ReplicationGroupOutput)
  1214  }
  1215  
  1216  type ReplicationGroupMapOutput struct{ *pulumi.OutputState }
  1217  
  1218  func (ReplicationGroupMapOutput) ElementType() reflect.Type {
  1219  	return reflect.TypeOf((*map[string]*ReplicationGroup)(nil)).Elem()
  1220  }
  1221  
  1222  func (o ReplicationGroupMapOutput) ToReplicationGroupMapOutput() ReplicationGroupMapOutput {
  1223  	return o
  1224  }
  1225  
  1226  func (o ReplicationGroupMapOutput) ToReplicationGroupMapOutputWithContext(ctx context.Context) ReplicationGroupMapOutput {
  1227  	return o
  1228  }
  1229  
  1230  func (o ReplicationGroupMapOutput) MapIndex(k pulumi.StringInput) ReplicationGroupOutput {
  1231  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationGroup {
  1232  		return vs[0].(map[string]*ReplicationGroup)[vs[1].(string)]
  1233  	}).(ReplicationGroupOutput)
  1234  }
  1235  
  1236  func init() {
  1237  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationGroupInput)(nil)).Elem(), &ReplicationGroup{})
  1238  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationGroupArrayInput)(nil)).Elem(), ReplicationGroupArray{})
  1239  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationGroupMapInput)(nil)).Elem(), ReplicationGroupMap{})
  1240  	pulumi.RegisterOutputType(ReplicationGroupOutput{})
  1241  	pulumi.RegisterOutputType(ReplicationGroupArrayOutput{})
  1242  	pulumi.RegisterOutputType(ReplicationGroupMapOutput{})
  1243  }