Expected Outcome
The current Terraform Enterprise Private registry modules need to be refreshed against an updated VCS provider connection.
Use Case
A VCS connection has been updated and subsequently, the associated Terraform Cloud Private Registry modules need to then be refreshed against the updated VCS provider connection to the repo.
Procedure
Currently, it's not possible to re-configure a private registry module once it has been created. Upon creation the original specified VCS connection will be used regardless if the VCS connection has been updated, no auto-syncing of new credentials will take place.
To update the modules against the new VCS connections will require deleting all associated modules and then re-add the modules against the updated VCS provider, this may be possible through the TFE/TFC UI or API.
Using the API (recommended if there is an excess of modules to be refreshed):
- Use the API to List all registry modules and use their source property to determine which ones came from the old VCS connection.
- Delete each affected module, then create a new module from the new connection's version of the relevant repo.
Otherwise utilize the GUI:
-
Within the TFC/TFE GUI access, <https://app.terraform.io/app/$Orgname/registry/private/modules>and click on the module in question
a. Then click onManage Module for Organization
and
b. Next click onDelete Module
. A popup page Delete Module from Organization: autoscaling-group should appear.
c. Finally click in the dropdown on the page and selectDelete all versions for this provider for this module
and follow the rest of the instructions.
Alternatively, you can use the tfe provider and the tfe_registry_module resource to manage your registry modules via Terraform.
Additional Information
- For additional assistance please contact HashiCorp Support