Since upgrading to `@pulumi/aws` v4.10 we have got...
# aws
c
Since upgrading to
@pulumi/aws
v4.10 we have got. Any ideas?
Copy code
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
Copy 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
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:
Copy code
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
What about with 4.1 of the aws package?
b
that worked too
Just trying 4.10 now
Seems to be working. What's the underlying code in the Redis component resource?
c
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