You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
I set the rds_application_database_names to ['a','b','c'] and the 3 db created, but when I update the variable to ['a','b'] and run the terraform again , I came into such issue
│ Error: Cycle: aws_rds_cluster_instance.rio-dev[0], provider"[registry.terraform.io/cyrilgdn/postgresql"], postgresql_database.rio_dbs["c"] (destroy)
expected result
the db c is destroyed
The text was updated successfully, but these errors were encountered:
xzGithu
changed the title
Can not destroy a db
Can not destroy a db [Error: Cycle: aws_rds_cluster_instance]
Jan 17, 2025
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.terraform 1.1.5
provider version
postgresql = {
source = "cyrilgdn/postgresql"
version = "~> 1.20.0"
}
terraform code
provider "postgresql" {
host = aws_rds_cluster_instance.rio-dev[0].endpoint
username = var.rds_master_username
password = var.rds_master_password
}
resource "postgresql_database" "rio_dbs" {
for_each = toset( var.rds_application_database_names )
name = each.key
owner = var.rds_master_username
}
I set the rds_application_database_names to ['a','b','c'] and the 3 db created, but when I update the variable to ['a','b'] and run the terraform again , I came into such issue
│ Error: Cycle: aws_rds_cluster_instance.rio-dev[0], provider"[registry.terraform.io/cyrilgdn/postgresql"], postgresql_database.rio_dbs["c"] (destroy)
expected result
the db c is destroyed
The text was updated successfully, but these errors were encountered: