This message was deleted.
# general
s
This message was deleted.
b
engine "redis" does not support num_cache_nodes > 1
c
I've added @broad-dog-22463 to help take a look at this.
b
hey @bitter-application-91815
can you show me a sample of the code you are using here that shows you this error?
b
Copy code
// - beef up
// - type redis only supports one node and therefore rules it out for multi az setup.
func (w *worker) createRedis(ctx *pulumi.Context) error {
	sn, err := elasticache.NewSubnetGroup(ctx, fmt.Sprintf("axiom-cache-subnetgroup-%s", w.targetEnv), &elasticache.SubnetGroupArgs{
		SubnetIds: pulumi.StringArray{
			pulumi.StringInput(w.privateSN[0].ID()),
			pulumi.StringInput(w.privateSN[1].ID()),
			pulumi.StringInput(w.privateSN[2].ID()),
		},
	})
	if err != nil {
		return err
	}

	r, err := elasticache.NewCluster(ctx, fmt.Sprintf("axiom-cache-%s", w.targetEnv), &elasticache.ClusterArgs{
		Engine:             pulumi.String("redis"),
		EngineVersion:      pulumi.String("5.0.6"),
		NodeType:           pulumi.String("cache.r5.4xlarge"),
		NumCacheNodes:      <http://pulumi.Int|pulumi.Int>(3), // only supports one node ???
		ParameterGroupName: pulumi.String("default.redis5.0.cluster.on"),
		Port:               <http://pulumi.Int|pulumi.Int>(6379),
		SubnetGroupName:    sn.Name,
		AvailabilityZone:   pulumi.String("preferredAvailabilityZones"), // make it multi AZ
		AzMode:             pulumi.String("cross-az"),                   // make it multi AZ
	})
	if err != nil {
		return err
	}
	w.redis = r
	return nil
}
Copy code
aws:elasticache:Cluster (axiom-cache-development-b):
    error: diffing urn:pulumi:axiom-cloud::development::aws:elasticache/cluster:Cluster::axiom-cache-development-b: engine "redis" does not support num_cache_nodes > 1
@broad-dog-22463 ^
b
looking
b
sound
b
so I remember this...
you are actually going to need to use an elasticacheReplicationGroup when working with Redis
b
magic, will give it a shot
thanks Paul
b
👍
b
Why does it say `Multi AZ`disabled when you can see on the right that i have assigned it 3 AZs.
Also should i create a security group that has that redis port open for ingress and egress and assign it to it, I have placed it in 3 private subnets
@broad-dog-22463 ^
b
you will need to follow AWS guidance on that (re: security groups) - I am pretty sure you will need to use elasticacheSecurityGroup as a way to be able to get the security group added
re: multi-az, that looks to be something missing from the provider - can you open an issue and I can look into that?
b
Sure will do, thanks dude
b
ok, it looks like there is a PR upstream for this that we are waiting on getting merged...
😕
b
b
thanks!
b
ah, no worries, linked,