Failed to download module
I've configured terrareg (v3.12) to force auth on all users and download. I have configured to following var :
PUBLIC_URL=https://internal.domain
DOMAIN_NAME=internal.domain
ADMIN_AUTHENTICATION_TOKEN=secret
ALLOW_UNAUTHENTICATED_ACCESS=False
TERRAFORM_PRESIGNED_URL_SECRET=secret
TERRAFORM_OIDC_IDP_SUBJECT_ID_HASH_SALT=secret
TERRAFORM_OIDC_IDP_SIGNING_KEY_PATH=/path/to/key.pem
DISABLE_ANALYTICS=True
ALLOW_MODULE_HOSTING=Enforce
DEFAULT_TERRAFORM_VERSION=1.9.5
Got a few modules uploaded (using S3 for storage).
I can run the following command successfully : terraform login internal.domain
. Browser pops up, I can login using the value from ADMIN_AUTHENTICATION_TOKEN
and terraform sets the auth token properly in ~/.terraform.d/credentials.tfrc.json
However when running terraform init
I get the following error message :
Error: Failed to download module
Could not download module "module" from https://internal.domain/v1/terrareg/modules/namespace/module/provider/version/source.zip//modules/module?presign=xxxxxxxxxxxxxxxxxxxx: bad response code: 403.
Without auth terraform init works fine but I wanted to required some auth quickly before going for OIDC.
Should this work? Am I missing some conf?
Github reference: https://github.com/MatthewJohn/terrareg/issues/64