github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticache/globalReplicationGroup.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an ElastiCache Global Replication Group resource, which manages replication between two or more Replication Groups in different regions. For more information, see the [ElastiCache User Guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Redis-Global-Datastore.html).
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Global replication group with one secondary replication group
    20  //
    21  // The global replication group depends on the primary group existing. Secondary replication groups depend on the global replication group. the provider dependency management will handle this transparently using resource value references.
    22  //
    23  // <!--Start PulumiCodeChooser -->
    24  // ```go
    25  // package main
    26  //
    27  // import (
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    30  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    31  //
    32  // )
    33  //
    34  //	func main() {
    35  //		pulumi.Run(func(ctx *pulumi.Context) error {
    36  //			primary, err := elasticache.NewReplicationGroup(ctx, "primary", &elasticache.ReplicationGroupArgs{
    37  //				ReplicationGroupId: pulumi.String("example-primary"),
    38  //				Description:        pulumi.String("primary replication group"),
    39  //				Engine:             pulumi.String("redis"),
    40  //				EngineVersion:      pulumi.String("5.0.6"),
    41  //				NodeType:           pulumi.String("cache.m5.large"),
    42  //				NumCacheClusters:   pulumi.Int(1),
    43  //			})
    44  //			if err != nil {
    45  //				return err
    46  //			}
    47  //			example, err := elasticache.NewGlobalReplicationGroup(ctx, "example", &elasticache.GlobalReplicationGroupArgs{
    48  //				GlobalReplicationGroupIdSuffix: pulumi.String("example"),
    49  //				PrimaryReplicationGroupId:      primary.ID(),
    50  //			})
    51  //			if err != nil {
    52  //				return err
    53  //			}
    54  //			_, err = elasticache.NewReplicationGroup(ctx, "secondary", &elasticache.ReplicationGroupArgs{
    55  //				ReplicationGroupId:       pulumi.String("example-secondary"),
    56  //				Description:              pulumi.String("secondary replication group"),
    57  //				GlobalReplicationGroupId: example.GlobalReplicationGroupId,
    58  //				NumCacheClusters:         pulumi.Int(1),
    59  //			})
    60  //			if err != nil {
    61  //				return err
    62  //			}
    63  //			return nil
    64  //		})
    65  //	}
    66  //
    67  // ```
    68  // <!--End PulumiCodeChooser -->
    69  //
    70  // ### Managing Redis Engine Versions
    71  //
    72  // The initial Redis version is determined by the version set on the primary replication group.
    73  // However, once it is part of a Global Replication Group,
    74  // the Global Replication Group manages the version of all member replication groups.
    75  //
    76  // The member replication groups must have `lifecycle.ignore_changes[engineVersion]` set,
    77  // or the provider will always return a diff.
    78  //
    79  // In this example,
    80  // the primary replication group will be created with Redis 6.0,
    81  // and then upgraded to Redis 6.2 once added to the Global Replication Group.
    82  // The secondary replication group will be created with Redis 6.2.
    83  //
    84  // <!--Start PulumiCodeChooser -->
    85  // ```go
    86  // package main
    87  //
    88  // import (
    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  //			primary, err := elasticache.NewReplicationGroup(ctx, "primary", &elasticache.ReplicationGroupArgs{
    98  //				ReplicationGroupId: pulumi.String("example-primary"),
    99  //				Description:        pulumi.String("primary replication group"),
   100  //				Engine:             pulumi.String("redis"),
   101  //				EngineVersion:      pulumi.String("6.0"),
   102  //				NodeType:           pulumi.String("cache.m5.large"),
   103  //				NumCacheClusters:   pulumi.Int(1),
   104  //			})
   105  //			if err != nil {
   106  //				return err
   107  //			}
   108  //			example, err := elasticache.NewGlobalReplicationGroup(ctx, "example", &elasticache.GlobalReplicationGroupArgs{
   109  //				GlobalReplicationGroupIdSuffix: pulumi.String("example"),
   110  //				PrimaryReplicationGroupId:      primary.ID(),
   111  //				EngineVersion:                  pulumi.String("6.2"),
   112  //			})
   113  //			if err != nil {
   114  //				return err
   115  //			}
   116  //			_, err = elasticache.NewReplicationGroup(ctx, "secondary", &elasticache.ReplicationGroupArgs{
   117  //				ReplicationGroupId:       pulumi.String("example-secondary"),
   118  //				Description:              pulumi.String("secondary replication group"),
   119  //				GlobalReplicationGroupId: example.GlobalReplicationGroupId,
   120  //				NumCacheClusters:         pulumi.Int(1),
   121  //			})
   122  //			if err != nil {
   123  //				return err
   124  //			}
   125  //			return nil
   126  //		})
   127  //	}
   128  //
   129  // ```
   130  // <!--End PulumiCodeChooser -->
   131  //
   132  // ## Import
   133  //
   134  // Using `pulumi import`, import ElastiCache Global Replication Groups using the `global_replication_group_id`. For example:
   135  //
   136  // ```sh
   137  // $ pulumi import aws:elasticache/globalReplicationGroup:GlobalReplicationGroup my_global_replication_group okuqm-global-replication-group-1
   138  // ```
   139  type GlobalReplicationGroup struct {
   140  	pulumi.CustomResourceState
   141  
   142  	// The ARN of the ElastiCache Global Replication Group.
   143  	Arn pulumi.StringOutput `pulumi:"arn"`
   144  	// A flag that indicate whether the encryption at rest is enabled.
   145  	AtRestEncryptionEnabled pulumi.BoolOutput `pulumi:"atRestEncryptionEnabled"`
   146  	// A flag that indicate whether AuthToken (password) is enabled.
   147  	AuthTokenEnabled pulumi.BoolOutput `pulumi:"authTokenEnabled"`
   148  	// Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   149  	// When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   150  	AutomaticFailoverEnabled pulumi.BoolOutput `pulumi:"automaticFailoverEnabled"`
   151  	// The instance class used.
   152  	// See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   153  	// and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   154  	// When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   155  	CacheNodeType pulumi.StringOutput `pulumi:"cacheNodeType"`
   156  	// Indicates whether the Global Datastore is cluster enabled.
   157  	ClusterEnabled pulumi.BoolOutput `pulumi:"clusterEnabled"`
   158  	// The name of the cache engine to be used for the clusters in this global replication group.
   159  	Engine pulumi.StringOutput `pulumi:"engine"`
   160  	// Redis version to use for the Global Replication Group.
   161  	// When creating, by default the Global Replication Group inherits the version of the primary replication group.
   162  	// If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   163  	// Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   164  	// When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   165  	// When the version is 6, the major and minor version can be set, e.g., `6.2`,
   166  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   167  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   168  	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
   169  	// The full version number of the cache engine running on the members of this global replication group.
   170  	EngineVersionActual pulumi.StringOutput `pulumi:"engineVersionActual"`
   171  	// Set of node groups (shards) on the global replication group.
   172  	// Has the values:
   173  	GlobalNodeGroups GlobalReplicationGroupGlobalNodeGroupArrayOutput `pulumi:"globalNodeGroups"`
   174  	// A user-created description for the global replication group.
   175  	GlobalReplicationGroupDescription pulumi.StringPtrOutput `pulumi:"globalReplicationGroupDescription"`
   176  	// The full ID of the global replication group.
   177  	GlobalReplicationGroupId pulumi.StringOutput `pulumi:"globalReplicationGroupId"`
   178  	// The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   179  	GlobalReplicationGroupIdSuffix pulumi.StringOutput `pulumi:"globalReplicationGroupIdSuffix"`
   180  	// The number of node groups (shards) on the global replication group.
   181  	NumNodeGroups pulumi.IntOutput `pulumi:"numNodeGroups"`
   182  	// An ElastiCache Parameter Group to use for the Global Replication Group.
   183  	// Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   184  	// Specifying without a major version upgrade will fail.
   185  	// Note that ElastiCache creates a copy of this parameter group for each member replication group.
   186  	ParameterGroupName pulumi.StringPtrOutput `pulumi:"parameterGroupName"`
   187  	// The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   188  	PrimaryReplicationGroupId pulumi.StringOutput `pulumi:"primaryReplicationGroupId"`
   189  	// A flag that indicates whether the encryption in transit is enabled.
   190  	TransitEncryptionEnabled pulumi.BoolOutput `pulumi:"transitEncryptionEnabled"`
   191  }
   192  
   193  // NewGlobalReplicationGroup registers a new resource with the given unique name, arguments, and options.
   194  func NewGlobalReplicationGroup(ctx *pulumi.Context,
   195  	name string, args *GlobalReplicationGroupArgs, opts ...pulumi.ResourceOption) (*GlobalReplicationGroup, error) {
   196  	if args == nil {
   197  		return nil, errors.New("missing one or more required arguments")
   198  	}
   199  
   200  	if args.GlobalReplicationGroupIdSuffix == nil {
   201  		return nil, errors.New("invalid value for required argument 'GlobalReplicationGroupIdSuffix'")
   202  	}
   203  	if args.PrimaryReplicationGroupId == nil {
   204  		return nil, errors.New("invalid value for required argument 'PrimaryReplicationGroupId'")
   205  	}
   206  	opts = internal.PkgResourceDefaultOpts(opts)
   207  	var resource GlobalReplicationGroup
   208  	err := ctx.RegisterResource("aws:elasticache/globalReplicationGroup:GlobalReplicationGroup", name, args, &resource, opts...)
   209  	if err != nil {
   210  		return nil, err
   211  	}
   212  	return &resource, nil
   213  }
   214  
   215  // GetGlobalReplicationGroup gets an existing GlobalReplicationGroup resource's state with the given name, ID, and optional
   216  // state properties that are used to uniquely qualify the lookup (nil if not required).
   217  func GetGlobalReplicationGroup(ctx *pulumi.Context,
   218  	name string, id pulumi.IDInput, state *GlobalReplicationGroupState, opts ...pulumi.ResourceOption) (*GlobalReplicationGroup, error) {
   219  	var resource GlobalReplicationGroup
   220  	err := ctx.ReadResource("aws:elasticache/globalReplicationGroup:GlobalReplicationGroup", name, id, state, &resource, opts...)
   221  	if err != nil {
   222  		return nil, err
   223  	}
   224  	return &resource, nil
   225  }
   226  
   227  // Input properties used for looking up and filtering GlobalReplicationGroup resources.
   228  type globalReplicationGroupState struct {
   229  	// The ARN of the ElastiCache Global Replication Group.
   230  	Arn *string `pulumi:"arn"`
   231  	// A flag that indicate whether the encryption at rest is enabled.
   232  	AtRestEncryptionEnabled *bool `pulumi:"atRestEncryptionEnabled"`
   233  	// A flag that indicate whether AuthToken (password) is enabled.
   234  	AuthTokenEnabled *bool `pulumi:"authTokenEnabled"`
   235  	// Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   236  	// When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   237  	AutomaticFailoverEnabled *bool `pulumi:"automaticFailoverEnabled"`
   238  	// The instance class used.
   239  	// See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   240  	// and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   241  	// When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   242  	CacheNodeType *string `pulumi:"cacheNodeType"`
   243  	// Indicates whether the Global Datastore is cluster enabled.
   244  	ClusterEnabled *bool `pulumi:"clusterEnabled"`
   245  	// The name of the cache engine to be used for the clusters in this global replication group.
   246  	Engine *string `pulumi:"engine"`
   247  	// Redis version to use for the Global Replication Group.
   248  	// When creating, by default the Global Replication Group inherits the version of the primary replication group.
   249  	// If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   250  	// Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   251  	// When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   252  	// When the version is 6, the major and minor version can be set, e.g., `6.2`,
   253  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   254  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   255  	EngineVersion *string `pulumi:"engineVersion"`
   256  	// The full version number of the cache engine running on the members of this global replication group.
   257  	EngineVersionActual *string `pulumi:"engineVersionActual"`
   258  	// Set of node groups (shards) on the global replication group.
   259  	// Has the values:
   260  	GlobalNodeGroups []GlobalReplicationGroupGlobalNodeGroup `pulumi:"globalNodeGroups"`
   261  	// A user-created description for the global replication group.
   262  	GlobalReplicationGroupDescription *string `pulumi:"globalReplicationGroupDescription"`
   263  	// The full ID of the global replication group.
   264  	GlobalReplicationGroupId *string `pulumi:"globalReplicationGroupId"`
   265  	// The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   266  	GlobalReplicationGroupIdSuffix *string `pulumi:"globalReplicationGroupIdSuffix"`
   267  	// The number of node groups (shards) on the global replication group.
   268  	NumNodeGroups *int `pulumi:"numNodeGroups"`
   269  	// An ElastiCache Parameter Group to use for the Global Replication Group.
   270  	// Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   271  	// Specifying without a major version upgrade will fail.
   272  	// Note that ElastiCache creates a copy of this parameter group for each member replication group.
   273  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   274  	// The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   275  	PrimaryReplicationGroupId *string `pulumi:"primaryReplicationGroupId"`
   276  	// A flag that indicates whether the encryption in transit is enabled.
   277  	TransitEncryptionEnabled *bool `pulumi:"transitEncryptionEnabled"`
   278  }
   279  
   280  type GlobalReplicationGroupState struct {
   281  	// The ARN of the ElastiCache Global Replication Group.
   282  	Arn pulumi.StringPtrInput
   283  	// A flag that indicate whether the encryption at rest is enabled.
   284  	AtRestEncryptionEnabled pulumi.BoolPtrInput
   285  	// A flag that indicate whether AuthToken (password) is enabled.
   286  	AuthTokenEnabled pulumi.BoolPtrInput
   287  	// Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   288  	// When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   289  	AutomaticFailoverEnabled pulumi.BoolPtrInput
   290  	// The instance class used.
   291  	// See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   292  	// and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   293  	// When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   294  	CacheNodeType pulumi.StringPtrInput
   295  	// Indicates whether the Global Datastore is cluster enabled.
   296  	ClusterEnabled pulumi.BoolPtrInput
   297  	// The name of the cache engine to be used for the clusters in this global replication group.
   298  	Engine pulumi.StringPtrInput
   299  	// Redis version to use for the Global Replication Group.
   300  	// When creating, by default the Global Replication Group inherits the version of the primary replication group.
   301  	// If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   302  	// Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   303  	// When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   304  	// When the version is 6, the major and minor version can be set, e.g., `6.2`,
   305  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   306  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   307  	EngineVersion pulumi.StringPtrInput
   308  	// The full version number of the cache engine running on the members of this global replication group.
   309  	EngineVersionActual pulumi.StringPtrInput
   310  	// Set of node groups (shards) on the global replication group.
   311  	// Has the values:
   312  	GlobalNodeGroups GlobalReplicationGroupGlobalNodeGroupArrayInput
   313  	// A user-created description for the global replication group.
   314  	GlobalReplicationGroupDescription pulumi.StringPtrInput
   315  	// The full ID of the global replication group.
   316  	GlobalReplicationGroupId pulumi.StringPtrInput
   317  	// The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   318  	GlobalReplicationGroupIdSuffix pulumi.StringPtrInput
   319  	// The number of node groups (shards) on the global replication group.
   320  	NumNodeGroups pulumi.IntPtrInput
   321  	// An ElastiCache Parameter Group to use for the Global Replication Group.
   322  	// Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   323  	// Specifying without a major version upgrade will fail.
   324  	// Note that ElastiCache creates a copy of this parameter group for each member replication group.
   325  	ParameterGroupName pulumi.StringPtrInput
   326  	// The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   327  	PrimaryReplicationGroupId pulumi.StringPtrInput
   328  	// A flag that indicates whether the encryption in transit is enabled.
   329  	TransitEncryptionEnabled pulumi.BoolPtrInput
   330  }
   331  
   332  func (GlobalReplicationGroupState) ElementType() reflect.Type {
   333  	return reflect.TypeOf((*globalReplicationGroupState)(nil)).Elem()
   334  }
   335  
   336  type globalReplicationGroupArgs struct {
   337  	// Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   338  	// When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   339  	AutomaticFailoverEnabled *bool `pulumi:"automaticFailoverEnabled"`
   340  	// The instance class used.
   341  	// See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   342  	// and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   343  	// When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   344  	CacheNodeType *string `pulumi:"cacheNodeType"`
   345  	// Redis version to use for the Global Replication Group.
   346  	// When creating, by default the Global Replication Group inherits the version of the primary replication group.
   347  	// If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   348  	// Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   349  	// When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   350  	// When the version is 6, the major and minor version can be set, e.g., `6.2`,
   351  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   352  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   353  	EngineVersion *string `pulumi:"engineVersion"`
   354  	// A user-created description for the global replication group.
   355  	GlobalReplicationGroupDescription *string `pulumi:"globalReplicationGroupDescription"`
   356  	// The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   357  	GlobalReplicationGroupIdSuffix string `pulumi:"globalReplicationGroupIdSuffix"`
   358  	// The number of node groups (shards) on the global replication group.
   359  	NumNodeGroups *int `pulumi:"numNodeGroups"`
   360  	// An ElastiCache Parameter Group to use for the Global Replication Group.
   361  	// Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   362  	// Specifying without a major version upgrade will fail.
   363  	// Note that ElastiCache creates a copy of this parameter group for each member replication group.
   364  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   365  	// The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   366  	PrimaryReplicationGroupId string `pulumi:"primaryReplicationGroupId"`
   367  }
   368  
   369  // The set of arguments for constructing a GlobalReplicationGroup resource.
   370  type GlobalReplicationGroupArgs struct {
   371  	// Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   372  	// When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   373  	AutomaticFailoverEnabled pulumi.BoolPtrInput
   374  	// The instance class used.
   375  	// See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   376  	// and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   377  	// When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   378  	CacheNodeType pulumi.StringPtrInput
   379  	// Redis version to use for the Global Replication Group.
   380  	// When creating, by default the Global Replication Group inherits the version of the primary replication group.
   381  	// If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   382  	// Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   383  	// When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   384  	// When the version is 6, the major and minor version can be set, e.g., `6.2`,
   385  	// or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   386  	// The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   387  	EngineVersion pulumi.StringPtrInput
   388  	// A user-created description for the global replication group.
   389  	GlobalReplicationGroupDescription pulumi.StringPtrInput
   390  	// The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   391  	GlobalReplicationGroupIdSuffix pulumi.StringInput
   392  	// The number of node groups (shards) on the global replication group.
   393  	NumNodeGroups pulumi.IntPtrInput
   394  	// An ElastiCache Parameter Group to use for the Global Replication Group.
   395  	// Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   396  	// Specifying without a major version upgrade will fail.
   397  	// Note that ElastiCache creates a copy of this parameter group for each member replication group.
   398  	ParameterGroupName pulumi.StringPtrInput
   399  	// The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   400  	PrimaryReplicationGroupId pulumi.StringInput
   401  }
   402  
   403  func (GlobalReplicationGroupArgs) ElementType() reflect.Type {
   404  	return reflect.TypeOf((*globalReplicationGroupArgs)(nil)).Elem()
   405  }
   406  
   407  type GlobalReplicationGroupInput interface {
   408  	pulumi.Input
   409  
   410  	ToGlobalReplicationGroupOutput() GlobalReplicationGroupOutput
   411  	ToGlobalReplicationGroupOutputWithContext(ctx context.Context) GlobalReplicationGroupOutput
   412  }
   413  
   414  func (*GlobalReplicationGroup) ElementType() reflect.Type {
   415  	return reflect.TypeOf((**GlobalReplicationGroup)(nil)).Elem()
   416  }
   417  
   418  func (i *GlobalReplicationGroup) ToGlobalReplicationGroupOutput() GlobalReplicationGroupOutput {
   419  	return i.ToGlobalReplicationGroupOutputWithContext(context.Background())
   420  }
   421  
   422  func (i *GlobalReplicationGroup) ToGlobalReplicationGroupOutputWithContext(ctx context.Context) GlobalReplicationGroupOutput {
   423  	return pulumi.ToOutputWithContext(ctx, i).(GlobalReplicationGroupOutput)
   424  }
   425  
   426  // GlobalReplicationGroupArrayInput is an input type that accepts GlobalReplicationGroupArray and GlobalReplicationGroupArrayOutput values.
   427  // You can construct a concrete instance of `GlobalReplicationGroupArrayInput` via:
   428  //
   429  //	GlobalReplicationGroupArray{ GlobalReplicationGroupArgs{...} }
   430  type GlobalReplicationGroupArrayInput interface {
   431  	pulumi.Input
   432  
   433  	ToGlobalReplicationGroupArrayOutput() GlobalReplicationGroupArrayOutput
   434  	ToGlobalReplicationGroupArrayOutputWithContext(context.Context) GlobalReplicationGroupArrayOutput
   435  }
   436  
   437  type GlobalReplicationGroupArray []GlobalReplicationGroupInput
   438  
   439  func (GlobalReplicationGroupArray) ElementType() reflect.Type {
   440  	return reflect.TypeOf((*[]*GlobalReplicationGroup)(nil)).Elem()
   441  }
   442  
   443  func (i GlobalReplicationGroupArray) ToGlobalReplicationGroupArrayOutput() GlobalReplicationGroupArrayOutput {
   444  	return i.ToGlobalReplicationGroupArrayOutputWithContext(context.Background())
   445  }
   446  
   447  func (i GlobalReplicationGroupArray) ToGlobalReplicationGroupArrayOutputWithContext(ctx context.Context) GlobalReplicationGroupArrayOutput {
   448  	return pulumi.ToOutputWithContext(ctx, i).(GlobalReplicationGroupArrayOutput)
   449  }
   450  
   451  // GlobalReplicationGroupMapInput is an input type that accepts GlobalReplicationGroupMap and GlobalReplicationGroupMapOutput values.
   452  // You can construct a concrete instance of `GlobalReplicationGroupMapInput` via:
   453  //
   454  //	GlobalReplicationGroupMap{ "key": GlobalReplicationGroupArgs{...} }
   455  type GlobalReplicationGroupMapInput interface {
   456  	pulumi.Input
   457  
   458  	ToGlobalReplicationGroupMapOutput() GlobalReplicationGroupMapOutput
   459  	ToGlobalReplicationGroupMapOutputWithContext(context.Context) GlobalReplicationGroupMapOutput
   460  }
   461  
   462  type GlobalReplicationGroupMap map[string]GlobalReplicationGroupInput
   463  
   464  func (GlobalReplicationGroupMap) ElementType() reflect.Type {
   465  	return reflect.TypeOf((*map[string]*GlobalReplicationGroup)(nil)).Elem()
   466  }
   467  
   468  func (i GlobalReplicationGroupMap) ToGlobalReplicationGroupMapOutput() GlobalReplicationGroupMapOutput {
   469  	return i.ToGlobalReplicationGroupMapOutputWithContext(context.Background())
   470  }
   471  
   472  func (i GlobalReplicationGroupMap) ToGlobalReplicationGroupMapOutputWithContext(ctx context.Context) GlobalReplicationGroupMapOutput {
   473  	return pulumi.ToOutputWithContext(ctx, i).(GlobalReplicationGroupMapOutput)
   474  }
   475  
   476  type GlobalReplicationGroupOutput struct{ *pulumi.OutputState }
   477  
   478  func (GlobalReplicationGroupOutput) ElementType() reflect.Type {
   479  	return reflect.TypeOf((**GlobalReplicationGroup)(nil)).Elem()
   480  }
   481  
   482  func (o GlobalReplicationGroupOutput) ToGlobalReplicationGroupOutput() GlobalReplicationGroupOutput {
   483  	return o
   484  }
   485  
   486  func (o GlobalReplicationGroupOutput) ToGlobalReplicationGroupOutputWithContext(ctx context.Context) GlobalReplicationGroupOutput {
   487  	return o
   488  }
   489  
   490  // The ARN of the ElastiCache Global Replication Group.
   491  func (o GlobalReplicationGroupOutput) Arn() pulumi.StringOutput {
   492  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   493  }
   494  
   495  // A flag that indicate whether the encryption at rest is enabled.
   496  func (o GlobalReplicationGroupOutput) AtRestEncryptionEnabled() pulumi.BoolOutput {
   497  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.BoolOutput { return v.AtRestEncryptionEnabled }).(pulumi.BoolOutput)
   498  }
   499  
   500  // A flag that indicate whether AuthToken (password) is enabled.
   501  func (o GlobalReplicationGroupOutput) AuthTokenEnabled() pulumi.BoolOutput {
   502  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.BoolOutput { return v.AuthTokenEnabled }).(pulumi.BoolOutput)
   503  }
   504  
   505  // Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.
   506  // When creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.
   507  func (o GlobalReplicationGroupOutput) AutomaticFailoverEnabled() pulumi.BoolOutput {
   508  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.BoolOutput { return v.AutomaticFailoverEnabled }).(pulumi.BoolOutput)
   509  }
   510  
   511  // The instance class used.
   512  // See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html)
   513  // and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
   514  // When creating, by default the Global Replication Group inherits the node type of the primary replication group.
   515  func (o GlobalReplicationGroupOutput) CacheNodeType() pulumi.StringOutput {
   516  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.CacheNodeType }).(pulumi.StringOutput)
   517  }
   518  
   519  // Indicates whether the Global Datastore is cluster enabled.
   520  func (o GlobalReplicationGroupOutput) ClusterEnabled() pulumi.BoolOutput {
   521  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.BoolOutput { return v.ClusterEnabled }).(pulumi.BoolOutput)
   522  }
   523  
   524  // The name of the cache engine to be used for the clusters in this global replication group.
   525  func (o GlobalReplicationGroupOutput) Engine() pulumi.StringOutput {
   526  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.Engine }).(pulumi.StringOutput)
   527  }
   528  
   529  // Redis version to use for the Global Replication Group.
   530  // When creating, by default the Global Replication Group inherits the version of the primary replication group.
   531  // If a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.
   532  // Cannot be downgraded without replacing the Global Replication Group and all member replication groups.
   533  // When the version is 7 or higher, the major and minor version should be set, e.g., `7.2`.
   534  // When the version is 6, the major and minor version can be set, e.g., `6.2`,
   535  // or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`.
   536  // The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below.
   537  func (o GlobalReplicationGroupOutput) EngineVersion() pulumi.StringOutput {
   538  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
   539  }
   540  
   541  // The full version number of the cache engine running on the members of this global replication group.
   542  func (o GlobalReplicationGroupOutput) EngineVersionActual() pulumi.StringOutput {
   543  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.EngineVersionActual }).(pulumi.StringOutput)
   544  }
   545  
   546  // Set of node groups (shards) on the global replication group.
   547  // Has the values:
   548  func (o GlobalReplicationGroupOutput) GlobalNodeGroups() GlobalReplicationGroupGlobalNodeGroupArrayOutput {
   549  	return o.ApplyT(func(v *GlobalReplicationGroup) GlobalReplicationGroupGlobalNodeGroupArrayOutput {
   550  		return v.GlobalNodeGroups
   551  	}).(GlobalReplicationGroupGlobalNodeGroupArrayOutput)
   552  }
   553  
   554  // A user-created description for the global replication group.
   555  func (o GlobalReplicationGroupOutput) GlobalReplicationGroupDescription() pulumi.StringPtrOutput {
   556  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringPtrOutput { return v.GlobalReplicationGroupDescription }).(pulumi.StringPtrOutput)
   557  }
   558  
   559  // The full ID of the global replication group.
   560  func (o GlobalReplicationGroupOutput) GlobalReplicationGroupId() pulumi.StringOutput {
   561  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.GlobalReplicationGroupId }).(pulumi.StringOutput)
   562  }
   563  
   564  // The suffix name of a Global Datastore. If `globalReplicationGroupIdSuffix` is changed, creates a new resource.
   565  func (o GlobalReplicationGroupOutput) GlobalReplicationGroupIdSuffix() pulumi.StringOutput {
   566  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.GlobalReplicationGroupIdSuffix }).(pulumi.StringOutput)
   567  }
   568  
   569  // The number of node groups (shards) on the global replication group.
   570  func (o GlobalReplicationGroupOutput) NumNodeGroups() pulumi.IntOutput {
   571  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.IntOutput { return v.NumNodeGroups }).(pulumi.IntOutput)
   572  }
   573  
   574  // An ElastiCache Parameter Group to use for the Global Replication Group.
   575  // Required when upgrading a major engine version, but will be ignored if left configured after the upgrade is complete.
   576  // Specifying without a major version upgrade will fail.
   577  // Note that ElastiCache creates a copy of this parameter group for each member replication group.
   578  func (o GlobalReplicationGroupOutput) ParameterGroupName() pulumi.StringPtrOutput {
   579  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringPtrOutput { return v.ParameterGroupName }).(pulumi.StringPtrOutput)
   580  }
   581  
   582  // The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If `primaryReplicationGroupId` is changed, creates a new resource.
   583  func (o GlobalReplicationGroupOutput) PrimaryReplicationGroupId() pulumi.StringOutput {
   584  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.StringOutput { return v.PrimaryReplicationGroupId }).(pulumi.StringOutput)
   585  }
   586  
   587  // A flag that indicates whether the encryption in transit is enabled.
   588  func (o GlobalReplicationGroupOutput) TransitEncryptionEnabled() pulumi.BoolOutput {
   589  	return o.ApplyT(func(v *GlobalReplicationGroup) pulumi.BoolOutput { return v.TransitEncryptionEnabled }).(pulumi.BoolOutput)
   590  }
   591  
   592  type GlobalReplicationGroupArrayOutput struct{ *pulumi.OutputState }
   593  
   594  func (GlobalReplicationGroupArrayOutput) ElementType() reflect.Type {
   595  	return reflect.TypeOf((*[]*GlobalReplicationGroup)(nil)).Elem()
   596  }
   597  
   598  func (o GlobalReplicationGroupArrayOutput) ToGlobalReplicationGroupArrayOutput() GlobalReplicationGroupArrayOutput {
   599  	return o
   600  }
   601  
   602  func (o GlobalReplicationGroupArrayOutput) ToGlobalReplicationGroupArrayOutputWithContext(ctx context.Context) GlobalReplicationGroupArrayOutput {
   603  	return o
   604  }
   605  
   606  func (o GlobalReplicationGroupArrayOutput) Index(i pulumi.IntInput) GlobalReplicationGroupOutput {
   607  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GlobalReplicationGroup {
   608  		return vs[0].([]*GlobalReplicationGroup)[vs[1].(int)]
   609  	}).(GlobalReplicationGroupOutput)
   610  }
   611  
   612  type GlobalReplicationGroupMapOutput struct{ *pulumi.OutputState }
   613  
   614  func (GlobalReplicationGroupMapOutput) ElementType() reflect.Type {
   615  	return reflect.TypeOf((*map[string]*GlobalReplicationGroup)(nil)).Elem()
   616  }
   617  
   618  func (o GlobalReplicationGroupMapOutput) ToGlobalReplicationGroupMapOutput() GlobalReplicationGroupMapOutput {
   619  	return o
   620  }
   621  
   622  func (o GlobalReplicationGroupMapOutput) ToGlobalReplicationGroupMapOutputWithContext(ctx context.Context) GlobalReplicationGroupMapOutput {
   623  	return o
   624  }
   625  
   626  func (o GlobalReplicationGroupMapOutput) MapIndex(k pulumi.StringInput) GlobalReplicationGroupOutput {
   627  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GlobalReplicationGroup {
   628  		return vs[0].(map[string]*GlobalReplicationGroup)[vs[1].(string)]
   629  	}).(GlobalReplicationGroupOutput)
   630  }
   631  
   632  func init() {
   633  	pulumi.RegisterInputType(reflect.TypeOf((*GlobalReplicationGroupInput)(nil)).Elem(), &GlobalReplicationGroup{})
   634  	pulumi.RegisterInputType(reflect.TypeOf((*GlobalReplicationGroupArrayInput)(nil)).Elem(), GlobalReplicationGroupArray{})
   635  	pulumi.RegisterInputType(reflect.TypeOf((*GlobalReplicationGroupMapInput)(nil)).Elem(), GlobalReplicationGroupMap{})
   636  	pulumi.RegisterOutputType(GlobalReplicationGroupOutput{})
   637  	pulumi.RegisterOutputType(GlobalReplicationGroupArrayOutput{})
   638  	pulumi.RegisterOutputType(GlobalReplicationGroupMapOutput{})
   639  }