Problem:
When publishing a new module version on Terraform Enterprise, it fails with no clear error messaging in the UI.
Solutions:
You can often verify the reason for your module version failing to upload by reviewing the logs in tfe-sidekiq
. The below list is not an exhaustive list of reasons, but provides some examples that can be searched for.
WARN: ActiveRecord::RecordInvalid: Validation failed: Version has already been taken
To resolve, try a different version number.
"status":"reg_ingress_failed","error":"error loading the module: Invalid configuration_aliases value: Configuration aliases must be prefixed with the provider name. Expected \"azurerm\", but found \"$WRONGALIAS\" (in providers.tf on line 5)"},
To resolve, refer to the invalid configuration_aliases
error line as it will indicate the line and file where the error occurs. In the example above, the error is in providers.tf
on line 5.
Outcome:
If you're unable to determine the cause of the error, please generate a support bundle and open a ticket with Hashicorp Support.