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

Database termination fails if DB is in Maintenance state #327

Closed
emerkle826 opened this issue Nov 22, 2023 · 0 comments · Fixed by #328
Closed

Database termination fails if DB is in Maintenance state #327

emerkle826 opened this issue Nov 22, 2023 · 0 comments · Fixed by #328

Comments

@emerkle826
Copy link
Contributor

emerkle826 commented Nov 22, 2023

Terraform Version

Terraform v1.6.4

Affected Resource(s)

astra_database

Terraform Configuration Files

terraform {
  required_providers {
    astra = {
      source  = "datastax/astra"
      version = "2.2.4"
    }
  }
}

resource "astra_database" "issue327" {
  name           = "issue327"
  keyspace       = "testks"
  cloud_provider = "gcp"
  regions        = ["us-east1"] 
  deletion_protection = false
}

resource "astra_keyspace" "ks1" {
  name = "ks1"
  database_id = astra_database.issue327.id
}

resource "astra_keyspace" "ks2" {
  name = "ks2"
  database_id = astra_database.issue327.id
}

resource "astra_keyspace" "ks3" {
  name = "ks3"
  database_id = astra_database.issue327.id
}

Debug Output

Panic Output

Expected Behavior

If the DB is in Maintenance state, Terraform should retry the Delete up until the Delete timeout occurs

Actual Behavior

Terraform provider errors out on the first attempt to terminate a DB if the DB is in Maintenance state. For example, if a Keyspace is being removed when the DB termination attempt is made. This also seems to happen if you try to delete keyspaces and the database in the same script/terraform run.

Steps to Reproduce

  1. Create a Database via Terraform script with 3 keyspaces
  2. Delete the keyspaces and DB in the script

Important Factoids

References

pull bot pushed a commit to kokizzu/terraform-provider-astra that referenced this issue Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant