Introduction
In some cases, the Explorer may display duplicate entries for the same Terraform module and version when viewing the modules page or attempting downloads. This behavior can cause confusion and affect module management workflows.
Expected Outcome
After completing the steps, the duplicate module entries will be cleared from the Explorer and download views, and all workspaces will reference the correct, currently-published module.
Prerequisites (if applicable)
Access to the affected Terraform workspaces.
Permissions to perform runs or applies in each workspace.
Terraform modules hosted in a private or public registry.
Use Case
Duplicate module entries appear in the Explorer due to internal metadata mismatches caused by previously deleted and re-published modules.
Procedure
Step 1: Understand the Cause
The duplicate modules result from mismatched internal IDs. This mismatch occurs when modules are deleted from the registry and then re-published using the same version, leaving stale metadata in some workspaces. Workspaces with recent runs will have refreshed metadata, while others will continue to reference outdated module data, leading to duplicate entries.
Step 2: Perform New Runs to Refresh Metadata
Initiate new runs or applies in all workspaces using the affected module versions. This action refreshes workspace metadata and transitions all workspaces from the deleted module version to the currently-published one.
Step 3: Verify Resolution
Once runs are completed across all affected workspaces, confirm that duplicate module entries are no longer visible in the Explorer or during module downloads.