-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB Instance: can't ignore changes to 'diskSize' - blocks all updates to DB instance with diskAutoresize: true #549
Comments
Can you provide some code to reproduce the issue? |
Sure. Create postgresql instance, db and user with: const instance = new gcp.sql.DatabaseInstance(
`postgres-instance`,
{
databaseVersion: "POSTGRES_13",
settings: {
tier: "db-custom-1-4096",
availabilityType: "ZONAL",
activationPolicy: "ALWAYS",
diskAutoresize: true,
diskType: "PD_SSD",
ipConfiguration: {
ipv4Enabled: true,
}
}
},
{
ignoreChanges: [
"diskSize"
],
}
);
const user = new gcp.sql.User(
`my-user`,
{
instance: instance.name,
name: "my-user",
password: "my-password",
}
);
const database = new gcp.sql.Database(
`my-database`,
{
instance: instance.name,
name: `my-database`,
charset: "UTF8",
collation: "en_US.UTF8",
}
); Connect to that database with your favorite SQL client and generate 15 GB of data in that database: CREATE TABLE test_data(
col1 bigint
);
INSERT INTO test_data (col1) SELECT generate_series(1, 503316480); This is going to run for a while - writing 15 GB in 32 byte rows takes some time. Run |
Any updates or workarounds for this? I'm facing the same exact issue |
Seeing this aswell, Error, failed to update instance settings for : googleapi: Error 400: Invalid request: The disk size cannot decrease. Current size: 3803 GB, requested: 628 GB.., invalid Using typescript with autoresize = true and disk_size not set. It appears running the refresh step unblocks updates to the database instance. |
Same problem here. As @thomas-gallop mentioned, using |
Passing |
I think this is by design. The |
Cloud SQL (PostgreSQL) instance created with
diskAutoresize: true
and emptydiskSize
will fail to update if autoresize has increased storage size beyond the default 10 GB, even ifignoreChanges: [ "diskSize" ]
:Error, failed to update instance settings for : googleapi: Error 400: Invalid request: The disk size cannot decrease. Current size: 37 GB, requested: 10 GB.., invalid
Expected behavior
ignoreChanges
allows to ignore a change to diskSize that got increased by GCP because ofdiskAutoresize: true
Current behavior
ignoreChanges: [ "diskSize" ]
doesn't cause diskSize changes to be ignoredSteps to reproduce
diskSize
(will default to 10),diskAutoresize: true
andignoreChanges: [ "diskSize" ]
The text was updated successfully, but these errors were encountered: