https://pulumi.com logo
Title
a

adamant-translator-31969

06/15/2021, 6:13 PM
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

billowy-army-68599

06/15/2021, 6:13 PM
can you share your code? some properties in RDS are immutable, ie they can only be changed by a replace
a

adamant-translator-31969

06/15/2021, 6:18 PM
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

billowy-army-68599

06/15/2021, 6:21 PM
you cannot change the name/identifier of a resource without creating a new resource, this is a limitation of the AWS API
a

adamant-translator-31969

06/15/2021, 6:27 PM
Ok! I tried only change instance class and it worked!! thank you @billowy-army-68599
👍 1