GitHub source URLs require that Git is installed on your system and that you have access to the repository.
You can use the same parameters to GitHub repositories as you can generic Git repositories (such as tags or branches). See the documentation for generic Git repositories for more information.
You can use the same parameters to GitHub repositories as you can generic Git repositories (such as tags or branches). See [the documentation for generic Git repositories](#parameters) for more information.
### Private GitHub Repos
@ -134,7 +134,7 @@ module "consul" {
Bitbucket URLs will require that Git or Mercurial is installed on your system, depending on the type of repository.
## Private Bitbucket Repos
Private bitbucket repositories must be specified similar to the Generic Git Respository section below.
Private bitbucket repositories must be specified similar to the [Generic Git Repository](#generic-git-repository) section below.
```hcl
module "consul" {
@ -176,6 +176,10 @@ module "ami" {
If you do not specify the type of `source` then Terraform will attempt to use the closest match, for example assuming `https://hashicorp.com/consul.git` is a HTTP URL.
Terraform will cache the module locally by default `terraform get` is run, so successive updates to master or a specified branch will not be factored into future plans. Run `terraform get -update=true` to get the latest version of the branch. This is handy in development, but potentially bothersome in production if you don't have control of the repository.
### Parameters
The URLs for Git repositories support the following query parameters:
* `ref` - The ref to checkout. This can be a branch, tag, commit, etc.
@ -186,8 +190,6 @@ module "consul" {
}
```
Terraform will cache the module locally by default `terraform get` is run, so successive updates to master or a specified branch will not be factored into future plans. Run `terraform get -update=true` to get the latest version of the branch. This is handy in development, but potentially bothersome in production if you don't have control of the repository.
## Generic Mercurial Repository
Generic Mercurial repositories are supported. The value of `source` in this case should be a complete Mercurial-compatible URL. Using generic Mercurial repositories requires that Mercurial is installed on your system. You must tell Terraform that your `source` is a Mercurial repository by prefixing it with `hg::`.
@ -223,7 +225,7 @@ Terraform then looks for the resulting module URL in the following order: