https://pulumi.com logo
Title
c

curved-pharmacist-41509

07/05/2021, 8:41 AM
Since upgrading to
@pulumi/aws
v4.10 we have got. Any ideas?
aws:elasticache:ReplicationGroup (news-shared-branch-deploys):
    error: aws:elasticache/replicationGroup:ReplicationGroup resource 'news-shared-branch-deploys' has a problem: engine_version: Redis versions must match <major>.x when using version 6 or higher, or <major>.<minor>.<bug-fix>. Examine values at 'ReplicationGroup.EngineVersion'.
Here is the code
const redisResource = new Redis(
    prefix,
    {
        engine: 'redis',
        engineVersion: '6.x',
        AZs: privateAZs,
        subnetIds: privateSubnetIds,
        securityGroups: [
            securityGroups.redisSecurityGroup.id,
            securityGroups.essentialIcmpSecurityGroup.id,
        ],
        vpcId,
    },
    {
        provider: deploymentProvider,
        awsRegion: 'ap-southeast-2',
        awsRole: getRoleArnToAssume(),
    },
)
👀 1
b

brave-planet-10645

07/05/2021, 1:05 PM
I'm assuming you're using something like a component resource to abstract over the ReplicationGroup resource, but I've just run this and it worked with no problems:
const rg= new aws.elasticache.ReplicationGroup("rg", {
    availabilityZones: [
        "eu-west-1a",
    ],
    replicationGroupDescription: "my replication group",
    engineVersion: "6.x",
    engine: "redis",
    numberCacheClusters: 1,
    nodeType: "cache.t3.micro"
})
That's with the latest version of the Pulumi CLI and v4.0.0 of the AWS package
c

curved-pharmacist-41509

07/05/2021, 1:34 PM
What about with 4.1 of the aws package?
b

brave-planet-10645

07/05/2021, 2:29 PM
that worked too
Just trying 4.10 now
Seems to be working. What's the underlying code in the Redis component resource?
c

curved-pharmacist-41509

07/06/2021, 1:51 AM
I think we have got to the bottom of it. https://github.com/hashicorp/terraform-provider-aws/issues/15625 Caused the engine version to be 6.0.5 in state, with the provider update it needs to be 6.x in state, otherwise preview fails
Or something similar
Fix was export state, change engine version to be 6.x again, import, then it works