-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Description
When a coderd_organization resource is destroyed, the deletion fails if the organization contains any resources (workspaces, templates, members, groups, or provisioner keys). This requires manual cleanup before Terraform can successfully remove the organization, which breaks the declarative infrastructure-as-code workflow.
Current Behavior
resource "coderd_organization" "example" {
name = "example-org"
}Expected Behavior
Add a force_delete attribute to the coderd_organization resource that cascades deletion to all organization resources when the organization is destroyed.
resource "coderd_organization" "example" {
name = "example-org"
force_delete = true # Cascade delete all resources on destroy
}Dependencies
This feature depends on coder/coder#21893, which adds force deletion support to the Coder API.
Usecases
- Ephemeral environments: Spin up and tear down entire organizations for testing/demos
- Automated cleanup: CI/CD pipelines that create temporary organizations
- Full infrastructure management: Manage organizations entirely through Terraform without manual intervention
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels