[Enhancement] Vendor pull from terraform private registries
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 175
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 134
Description
### Describe the Feature
This feature is an enhancement for `Atmos Components` to be able to fetch terraform modules from private registries based on https.
### Expected Behavior
Ability to fetch terraform modules from private terraform registries
### Use Case
Many companies use private registries and repositories to:
- Decoupled from vendor servers.
- Fasten their pipeline builds.
- Avoid breaking routine work when problems appear with vendor servers.
- Improve security.
- etc...
E.g:
- Docker
- Apt
- Rpm
- Npm
- Maven
- Helm
- Terraform
- etc...
### Describe Ideal Solution
**Option 1:**
After running `terraform login `, credentials file being created under `~/.terraform.d/credentials.tfrc.json` .
If Atmos can look for this path on component initialization, it might solve the problem for any terraform registry use case as long as it work with native terraform registry authentication.
Reference: ==> [Terraform Credentials Storage](https://developer.hashicorp.com/terraform/cli/commands/login#credentials-storage)
**Option 2 (might be the preferred):**
Atmos will fetch the following environment variable in case of private registries `TF_TOKEN_cloudposse_jfrog_io=` , terraform translate the uri to `cloudposse.jfrog.io` .
Reference: ==> [Environment Variables Credentials](https://developer.hashicorp.com/terraform/cli/config/config-file#environment-variable-credentials)
### Alternatives Considered
_No response_
### Additional Context
_No response_
Contributor guide
Research direction
Start by tracing Atmos Components initialization and the Terraform module fetch path. Review how Terraform credentials from ~/.terraform.d/credentials.tfrc.json and TF_TOKEN_* environment variables are represented, then define how private HTTPS registry authentication should work. Done means Atmos can fetch Terraform modules from private registries using native Terraform authentication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100