-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for private terraform modules #3723
Comments
@wagnst 💯 we're working on adding support right now 👍 |
We shipped support for Terraform private registries. You can find out more in github/docs#6808, #3790, #3821, #3811, #3790, #3756. Please give it a try and let us know what you think. https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#terraform-registry |
@xlgmokha @feelepxyz tried it for terraform cloud, but it doesnt work. I created a secret under my personal user (added it as github dependabot org secret) - my user is owner in TFC. I get the following:
My dependabot.yml:
Where When i personally open up the upper pages (like |
Should fix it |
awesome @jurre thanks a lot, works with that! Was not aware of that introduced option as it wasnt part of the PR ocmment of github/docs#6808 |
Yeah tbh it trips up more people, it's in the docs but it can be confusing. Happy it's working now! |
Does this only work for Terraform registries or also for modules that are directly stored in git. For example:
and
|
I have the same questions as @norman-zon ! Did anyone figure this out yet? |
Dependabot does not seem to support this. So I use renovate for this use-case instead. |
Thanks for the quick response! |
For modules directly stored in git, any reason why you can't use the |
Could you share some example of how your using renovate ? |
I can confirm that it works for modules stored in git. Here is the configuration for it: version: 2
updates:
- package-ecosystem: "terraform"
directory: "/"
schedule:
interval: "weekly"
registries:
- git-terraform-modules
registries:
git-terraform-modules:
type: git
url: https://github.com
username: x-access-token
password: ${{ secrets.GITHUB_PAT }} |
Please support private terraform modules hosted in registries that need authentication:
Running the latest dependabot (which now supports HCL 2 - #1176), reveals:
terraform-google-modules/project-factory/google
is public, working finelhsystems/serviceaccount/google
is a private module hosted on Terraform EnterpriseIts called like this:
The dependabot logs show:
Dependabot needs to authenticate against the private module registry e.g. via
terraform login
or via the API token (TF_API_TOKEN
) which can be supplied via ENV var, some example is also described hereThe text was updated successfully, but these errors were encountered: