Skip to content
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

Error: error while fetching dbaas cluster xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: is not a valid PoolMode #681

Closed
mway-niels opened this issue Sep 30, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mway-niels
Copy link

Description

Upgrading the Terraform provider is not possible if the state contains old managed PostgreSQL clusters.

terraform plan returns the error message Error: error while fetching dbaas cluster xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: is not a valid PoolMode on old managed PostgreSQL clusters.

Expected behavior

When upgrading the IONOS Terraform provider, new API properties/fields shouldn't cause terraform plan/apply to return an error.

Environment

Terraform version:

v1.9.3

Provider version:

v6.5.6

OS:

macOS 14.6.1

How to Reproduce

As I'm not able to create a managed PostgreSQL using the old IONOS API, I'm not sure how to reproduce this bug with new configurations.

Error and Debug Output

╷
│ Error: error while fetching dbaas cluster xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:  is not a valid PoolMode
│ 
│   with module.base[0].ionoscloud_pg_cluster.database,
│   on base/resources-postgresql.tf line 1, in resource "ionoscloud_pg_cluster" "database":
│    1: resource "ionoscloud_pg_cluster" "database" {
│ 
╵
@mway-niels mway-niels added the bug Something isn't working label Sep 30, 2024
@cristiGuranIonos
Copy link
Collaborator

Can you share the cluster in the tf plan? Between what versions is the upgrade?
Thanks!

@mway-niels
Copy link
Author

From version 6.3.1 to 6.5.6.

Here's the database resource:

resource "ionoscloud_pg_cluster" "database" {
  display_name         = "${var.resource_base_name}_1"
  location             = ionoscloud_datacenter.dc.location
  postgres_version     = var.postgres_version
  cores                = 6
  ram                  = 20480
  instances            = 2
  storage_type         = "SSD"
  storage_size         = 307200
  synchronization_mode = "ASYNCHRONOUS"
  connections {
    datacenter_id = ionoscloud_datacenter.dc.id
    lan_id        = ionoscloud_lan.lan.id
    cidr          = "XXX.XXX.XXX.XXX/24"
  }
  credentials {
    username = var.database_user
    password = var.database_password
  }
  maintenance_window {
    day_of_the_week = var.maintenance_day
    time            = var.maintenance_time_postgresql
  }
  lifecycle {
    prevent_destroy = true
  }
}

@adeatcu-ionos
Copy link
Contributor

adeatcu-ionos commented Oct 2, 2024

@mway-niels we investigated and the issue is not from our side (Terraform provider), it is from the DBaaS API, we discussed with our colleagues from the DBaaS team and they will come up with a solution for this. If you want to find out more information about this, such as when it will be solved or other details, please send an e-mail to one of the addresses listed here: https://docs.ionos.com/support/general-information/contact-information.

We will close this issue since there is nothing to do on our side.

L.E: I will reopen the issue since we want to make sure that the fix from DBaaS team will actually solve this.

Thank you!

@cristiGuranIonos
Copy link
Collaborator

Problem was fixed on some of the clusters, not all. You can try to upgrade and see what happens.

@mway-niels
Copy link
Author

Yes, it's working as expected now. Thank you for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants