pulumi / pulumi-aws

An Amazon Web Services (AWS) Pulumi resource package, providing multi-language access to AWS
Apache License 2.0
466 stars 157 forks source link

Can't update aws.elasticache.ReplicationGroup node type #2039

Open Tirke opened 2 years ago

Tirke commented 2 years ago

What happened?

Updating the nodeType of a aws.elasticache.ReplicationGroup doesn't do anything.

Steps to reproduce

Create a cache

const cache = new aws.elasticache.ReplicationGroup(`${env}-${name}-cache`, {
    automaticFailoverEnabled: false,
    nodeType: instanceType,
    numCacheClusters: 1,
    port: 6379,
    description: description,
    transitEncryptionEnabled: false,
    atRestEncryptionEnabled: true,
    securityGroupIds: [cacheSecurityGroup.id],
    subnetGroupName: subnetGroupElastic.name,
  })

Update the nodeType -> cache.t2.small -> cache.t3.medium

Pulumi starts doing it's thing

Previewing update (prd-****):
     Type                                 Name                                    Plan       Info
     pulumi:pulumi:Stack                  ****
 ~   └─ aws:elasticache:ReplicationGroup  ****                   update     [diff: ~nodeType]

Resources:
    ~ 1 to update
    61 unchanged

Do you want to perform this update? yes
Updating (prd-****):
     Type                                 Name                                    Status      Info
     pulumi:pulumi:Stack                 ******
 ~   └─ aws:elasticache:ReplicationGroup  ****                        updated     [diff: ~nodeType]
Resources:
    ~ 1 updated
    61 unchanged

Duration: 1m6s

Expected Behavior

Elasticache is updating the nodeType.

Actual Behavior

Nothing. pulumi up again after is saying that nodeType needs to be updated. Nothing is happening on AWS console.

Versions used

pulumi about
CLI
Version      3.35.3
Go Version   go1.18.3
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown

Host
OS       darwin
Version  12.3
Arch     arm64

This project is written in nodejs: executable='/Users/tirke/Library/Caches/fnm_multishells/6021_1657103991529/bin/node' version='v16.15.1'

        "@pulumi/aws": "^5.9.2",
        "@pulumi/aws-native": "^0.19.0",
        "@pulumi/awsx": "^0.40.0",
        "@pulumi/eks": "^0.41.0",
        "@pulumi/pulumi": "^3.35.2",

Pulumi doesn't read pnpm lock file :p

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

jkodroff commented 2 years ago

This looks like a result of the following upstream bug: https://github.com/hashicorp/terraform-provider-aws/issues/24733

Once the bug is resolved in the upstream provider, we'll update the dependency here and the issue should be resolved.

joeypunzel commented 2 years ago

Ran into this issue today myself!

Curious why we need to wait for terraform update before this can be addressed on Pulumi side?

Is that because Pulumi is built on terraform? Unfortunate to see Pulumi does not have capability to fix this issue on their own and is dependent on an upstream vendor for a fix

jkodroff commented 2 years ago

@joeypunzel Bridged (that is, non-native) providers in Pulumi take a Terraform provider as a dependency. We do not take a dependency on the Terraform core.

O1ahmad commented 1 year ago

+1 also just started encountering this issue.

This has now been open for almost a year and a half. Any updates on upvoting/escalating the upstream fix? We recognize it can be worked around by updating the type within the AWS console though this is extremely cumbersome with large instance scales and problematic when dealing with dependencies like ALB TargetGroups.

alko89 commented 5 months ago

You need to set the applyImmediately flag.

https://www.pulumi.com/registry/packages/aws/api-docs/elasticache/cluster/#applyimmediately_nodejs