-
Notifications
You must be signed in to change notification settings - Fork 473
Open
Labels
bugSomething isn't workingSomething isn't working
Description
TL;DR
I'm pretty agnostic about the time windows for my dev databases with a db-f1-micro machine type. It would be great to be able to set "Any" upgrade window for them.
Also, it looks better to me to have it by default, don't you think?
Expected behavior
In case, I didn't specify maintenance_window_day nor maintenance_window_hour, or manually specified them to 0, do not pass settings.maintenance_window to the google provider at all, which will mean "Any" maintenance window.
Observed behavior
not possible to not pass settings.maintenance_window, setting maintenance_window_hour and maintenance_window_day to 0 lead to validation error:
│ Error: expected settings.0.maintenance_window.0.day to be in the range (1 - 7), got 0
│
│ with module.postgres.google_sql_database_instance.default,
│ on .terraform/modules/backstage/modules/postgresql/main.tf line 79, in resource "google_sql_database_instance" "default":
│ 79: settings {
Terraform Configuration
module "postgres" {
source = "GoogleCloudPlatform/sql-db/google//modules/postgresql"
version = "~> 26.2"
name = "postgres"
availability_type = "ZONAL"
database_version = "POSTGRES_16"
project_id = var.project_id
zone = "europe-west4-a"
region = "europe-west4"
tier = "db-f1-micro"
user_name = "test"
user_password = "test"
db_name = "test"
create_timeout = "30m"
maintenance_window_day = 0
maintenance_window_hour = 0
maintenance_window_update_track = "canary"
}Terraform Version
Terraform v1.14.0
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v7.12.0
+ provider registry.terraform.io/hashicorp/google-beta v7.12.0
+ provider registry.terraform.io/hashicorp/null v3.2.4
+ provider registry.terraform.io/hashicorp/random v3.7.2Terraform Provider Versions
Providers required by configuration:
.
├── provider[registry.terraform.io/hashicorp/google] ~> 7.12
├── provider[registry.terraform.io/hashicorp/google-beta] ~> 7.12
├── provider[terraform.io/builtin/terraform]
├── module.private-service-access
│ ├── provider[registry.terraform.io/hashicorp/null] ~> 3.1
│ ├── provider[registry.terraform.io/hashicorp/google] >= 5.38.0, < 8.0.0
│ └── provider[registry.terraform.io/hashicorp/google-beta] >= 5.38.0, < 8.0.0
└── module.backstage
├── provider[registry.terraform.io/hashicorp/google-beta] >= 6.31.0, < 8.0.0
├── provider[registry.terraform.io/hashicorp/null] ~> 3.1
├── provider[registry.terraform.io/hashicorp/random] ~> 3.1
└── provider[registry.terraform.io/hashicorp/google] >= 6.31.0, < 8.0.0
Providers required by state:
provider[terraform.io/builtin/terraform]
provider[registry.terraform.io/hashicorp/google]
provider[registry.terraform.io/hashicorp/google-beta]
provider[registry.terraform.io/hashicorp/null]
provider[registry.terraform.io/hashicorp/random]Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working