Hey all,
having a weird problem. I may be doing something wrong here?
With the pulumi code bellow, if I am running it fresh for the first time I get an error saying that it can not delete the cluster, after it made all the stuff, it is even in AWS appropriately. If I run
pulumi up
again instead of updating the cluster it says the cluster already exists and errors out.
so two questions:
• Is this just because I have not had a fully successful run yet?
• Am I doing something wrong here?
const postgresqlCluster = new aws.rds.Cluster(`${name}-${env}-postgresql`, {
clusterIdentifier: `${name}-${env}-us-east-1-aurora`,
engine: aws.rds.EngineType.AuroraPostgresql,
engineVersion: '16.4',
availabilityZones: [
"us-east-1a",
],
databaseName: `${name}`,
dbSubnetGroupName: rdsAuroraDbSubnetGroup.name,
vpcSecurityGroupIds: [rdsAuroraSg.id],
masterUsername: "postgresql",
masterPassword: rdsConfig.require("rootPassword"),
backupRetentionPeriod: 5,
preferredBackupWindow: "07:00-09:00",
});
const postgresqlInstance = new aws.rds.ClusterInstance(`${name}-${env}-postgresql-instance`, {
clusterIdentifier: postgresqlCluster.id,
identifier: `${name}-${env}-postgresql-instance`,
instanceClass: 'db.r5.large',
engine: aws.rds.EngineType.AuroraPostgresql,
engineVersion: '16.4',
publiclyAccessible: false,
});