Summary
When attempting to delete a specific version of a Terraform module from the Terraform Cloud UI, it is possible to encounter a situation where clicking Delete does not remove the module version. This behavior occurs when the module version is still in active use by one or more workspaces.
Symptoms
• Clicking the Delete button for a module version in the UI does not remove the version.
• The module version continues to appear in the module registry after attempting to delete it.
• No explicit error message is shown, but the deletion action fails silently.
Cause
This issue occurs because the module version you are attempting to delete is currently referenced by one or more workspace runs. Terraform Cloud prevents deletion of any in-use module version to ensure that workspace configurations remain stable and reproducible.
Resolution
To successfully delete the module version, step one must be completed. Step two is an additional recommendation if the module’s use is widespread and it needs to be phased out.
1. Complete All Runs Using the Module Version
Identify all workspaces currently using the affected module version.
Allow any in-progress or pending runs that reference the version to complete.
Confirm that no active runs or configurations continue to use that module version.
2. Deprecate the Module Version
Follow your organization’s module deprecation process to mark the version as deprecated.
Deprecation indicates to users that the version should no longer be used in future workspaces or configurations.
Once the version is deprecated and no runs are using it, return to the UI and delete the module version.