Can I destroy Postgres database or cluster via flyctl?

I’m looking into setting up staging/preview apps that are created via GitHub actions. The setup works well, but I’m struggling with the teardown part. Ideally we’d be able to destroy the application and its database when a PR is merged, but I don’t see any way to remove the postgres database or cluster with flyctl.

Is there a way to either share a cluster between staging/preview apps and destroy the app’s database or create a new cluster and destroy it when it’s no longer needed? Either one seems fine, but I’d prefer to not have to do this manually via the UI.

I figured out you can delete a cluster through the fly apps destroy CLUSTER_NAME command. Confusing, but it works for what I need.

Yes this is correct! Postgres on Fly is just an app like anything else. :slight_smile: