Open superflo22 opened 1 week ago
This is a known issue, that is being worked. We will let you know when it is fixed, but it might take a while. Meanwhile, as a workaround maybe you can try:
terraform { required_version = ">= 1.0.0" required_providers { ionoscloud = { source = "ionos-cloud/ionoscloud" version = "6.5.9" } } } resource "ionoscloud_datacenter" "example" { name = "example" location = "de/txl" description = "Datacenter for testing dbaas cluster" }
resource "ionoscloud_lan" "example" { datacenter_id = ionoscloud_datacenter.example.id public = false name = "example" }
resource "ionoscloud_pg_cluster" "example" { postgres_version = "15" instances = 1 cores = 4 ram = 2048 storage_size = 2048 storage_type = "SSD" connections { datacenter_id = ionoscloud_datacenter.example.id lan_id = ionoscloud_lan.example.id cidr = "192.168.100.1/24" } location = ionoscloud_datacenter.example.location display_name = "PostgreSQL_cluster" maintenance_window { day_of_the_week = "Sunday" time = "09:00:00" } synchronization_mode = "ASYNCHRONOUS" }
resource "random_password" "user_password" { length = 16 special = true overridespecial = "!#$%&*()-=+[]{}<>:?" }
resource "ionoscloud_pg_user" "example_pg_user2" { cluster_id = ionoscloud_pg_cluster.example.id username = "exampleuser2" password = random_password.user_password2.result depends_on = [time_sleep.wait_10_seconds, time_sleep.wait_20_seconds] }
resource "ionoscloud_pg_user" "example_pg_user3" { cluster_id = ionoscloud_pg_cluster.example.id username = "exampleuser3" password = random_password.user_password2.result depends_on = [time_sleep.wait_10_seconds, time_sleep.wait_20_seconds] }
resource "random_password" "user_password2" { length = 16 special = true overridespecial = "!#$%&*()-=+[]{}<>:?" }
resource "time_sleep" "wait_10_seconds" { depends_on = [ionoscloud_pg_cluster.example] destroy_duration = "10s" }
resource "time_sleep" "wait_20_seconds" { depends_on = [ionoscloud_pg_cluster.example] create_duration = "20s" }
Description
Running terraform destroy and planning to delete all resources does not succeed when a manged postgres is used.
Expected behavior
The pipeline should not terminate and destroy all resources
Environment
Terraform version:
Provider version:
OS:
Configuration Files
How to Reproduce
Steps to reproduce the behavior:
Error and Debug Output
Additional Notes
The counter of planned resources is off because of removed project sprecifics.
Found that deleting the Postgres Cluster in DCD before restarting the destruction pipeline "fixes" this.
References
none