pulumi-digitalocean
pulumi-digitalocean copied to clipboard
DB Cluster maintenance window always showing as needing an update
Given a cluster configuration like this:
const pgCluster = new digitalocean.DatabaseCluster(
"do-pg-cluster",
{
name: pgClusterName,
engine: "pg",
nodeCount: isProduction ? cluster.prod.nodes : cluster.dev.nodes,
region: "sgp1",
size: isProduction ? cluster.prod.size : cluster.dev.size,
version: "12",
maintenanceWindows: [
{
day: "friday", // saturday 00:00 +07
hour: "18:00",
},
],
},
resourceOptions
);
Pulumi is showing the following diff on every update even though the window has been applied.
pulumi:pulumi:Stack platform-dev-austinrivas
└─ DigitalOcean digitalocean
~ └─ digitalocean:index:DatabaseCluster do-pg-cluster updated [diff: ~maintenanceWindows]
The terraform provider also seems to throw some errors when removing a maintenance window that was already created.
Hi @austinrivas
My apologies for this - please can you show me the diff - what is the value changed from / to
You can get it when using "pulumi up" and then looking at the details
Paul
My mistake, its was a time format issue.
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:dev::platform::pulumi:pulumi:Stack::platform-dev]
~ digitalocean:index/databaseCluster:DatabaseCluster: (update)
[id=ba969d15-848f-4fe6-b97d-08a088f3f05b]
[urn=urn:pulumi:dev::platform::DigitalOcean$digitalocean:index/databaseCluster:DatabaseCluster::do-pg-cluster]
[provider=urn:pulumi:dev::platform::pulumi:providers:digitalocean::default_3_5_0::3fb024d6-a3e2-4d8b-a5b0-f84e834ac0f3]
~ maintenanceWindows: [
~ [0]: {
~ hour: "18:00:00" => "18:00"
}
]
However do still see an error when removing all maintenance windows.
What error are you seeing @austinrivas ?
Exact same issue still happens today. My repro:
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const pgCluster = new digitalocean.DatabaseCluster("do-pg-cluster", {
name: "test",
engine: "mysql",
nodeCount: 1,
region: "nyc3",
size: "db-s-1vcpu-1gb",
version: "8",
maintenanceWindows: [
{
day: "friday", // saturday 00:00 +07
hour: "18:00",
},
],
});
Diff:
maintenanceWindows: [
~ [0]: {
~ hour: "18:00:00" => "18:00"
}
]
The workaround is very simple though, just change your code to
hour: "18:00:00",
I'm quite sure it's an upstream issue, and given how simple the workaround is, I'm inclined to close this issue as won't fix.