Hi! When I modify RDS instance class, Pulumi tries...
# aws
a
Hi! When I modify RDS instance class, Pulumi tries to delete and replace my instance. this will make my tables in my db disappear. I need to modify my instance as AWS make ... only update... someone tried to do this?
b
can you share your code? some properties in RDS are immutable, ie they can only be changed by a replace
a
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const _default = new aws.rds.Cluster("cluster-at", {
    clusterIdentifier: "cluster-test", // --> I want to change identifier
    availabilityZones: [
        "us-west-2a",
    ],
    databaseName: "foo",
    masterUsername: "bar",
    masterPassword: "*******",
});
const clusterInstances: aws.rds.ClusterInstance[];
for (const range = {value: 0}; range.value < 2; range.value++) {
    clusterInstances.push(new aws.rds.ClusterInstance(`clusterInstances-${range.value}`, {
        identifier: `aurora-cluster-test-${range.value}`,
        clusterIdentifier: _default.id,
        instanceClass: "db.r4.medium",
        engine: _default.engine,
        engineVersion: _default.engineVersion,
    }));
}
I want to change identifier and instance class in cluster instances
b
you cannot change the name/identifier of a resource without creating a new resource, this is a limitation of the AWS API
a
Ok! I tried only change instance class and it worked!! thank you @billowy-army-68599
👍 1