Skip to content

Clarify what all sources are supported for Terraform Dependency Updates #30619

Description

@captn3m0

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

What part(s) of the article would you like to see updated?

Background Information

Unlike other package managers, Terraform is a multi-sourcetype package managers with private registry support (that only applies to a few of these source types).

The following are various sample combinations of what all counts as a "module source" in Terraform:

NoSourceSample SourceIs this a Terraform RegistryPrivate Access SupportedUpdate Possible
1Local Path../consulNANo
2Terraform Registryhashicorp/consul/awsYes, https://registry.terraform.io/NoYes
3Terraform Private Registryapp.terraform.io/example-corp/k8s-cluster/azurermYesYesYes
4GitHubgithub.com/hashicorp/exampleNoYesYes
5GitHub (SSH)git@github.com:hashicorp/example.gitNoYesYes
6BitBucketbitbucket.org/hashicorp/terraform-consul-awsNoYesYes
7Generic Gitgit::https://example.com/vpc.git (Other Valid Git URLs also work)NoYesYes
8Generic Mercurialhg::http://example.com/vpc.hgNoYesYes
9HTTP URlshttps://example.com/terraform-sourceNoYesNo
10S3 Bucket URLs3::https://s3-eu-west-1.amazonaws.com/examplecorp-terraform-modules/vpc.zipNoYesNo
11GCS Bucket URLgcs::https://www.googleapis.com/storage/v1/modules/foomodule.zipNoYesNo

Current Documentation Status

The following is all of the text* that is present on the docs website about Dependabot Terraform setups:

The table tells us that Terraform integration supports both Private Repositories and Private registries (and not vendoring):

image

The second page tells us about terraform registry configuration.

The terraform-registry type supports a token.

registries:
terraform-example:
type: terraform-registry
url: https://terraform.example.com
token: ${{secrets.MY_TERRAFORM_API_TOKEN}}

Unanswered Questions

There are 7 different kinds of sources in the above table that support updates. Of these, 2 are well documented (Terraform Registry / Terraform Private Registry) with clear documentation on how it supports Private registries as well.

The other 5 are left very unclear, across each of their public/private variant (so 10 possibilities).

The core change in #30139:

You can give Dependabot access to private package registries hosted by GitLab or Bitbucket by specifying a type of git.

does not clarify if this works with Terraform. It is unclear if Mercurial repositories are updated.

Suggested Change

Similar to how swift in the table links to a clear indication of what is supported, a similar section should be added for Terraform. Something like:

Only modules hosted on Terraform Registry or a publicly reachable Git repository are supported. Private Terraform Registry is supported, and you can configure access for private git repositories by configuring a git registry.

Additional information

This is a re-opening of #8419. The relevant PR #30139 does not answer the important questions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

contentThis issue or pull request belongs to the Docs Content teamdependabotContent related to Dependabotwaiting for reviewIssue/PR is waiting for a writer's review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions