diff --git a/website/source/docs/modules/sources.html.markdown b/website/source/docs/modules/sources.html.markdown index b30cab033..240dd21a4 100644 --- a/website/source/docs/modules/sources.html.markdown +++ b/website/source/docs/modules/sources.html.markdown @@ -87,7 +87,7 @@ module "private-infra" { ## Bitbucket -Terraform will automatically recognize Bitbucket URLs and turn them into a link to the specific Git or Mercurial repository, for example: +Terraform will automatically recognize public Bitbucket URLs and turn them into a link to the specific Git or Mercurial repository, for example: ```hcl module "consul" { @@ -107,6 +107,25 @@ 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. + +```hcl +module "consul" { + source = "git::https://bitbucket.org/foocompany/module_name.git +} +``` + +You can also specify branches and version withs the ?ref query + +```hcl +module "consul" { + source = "git::https://bitbucket.org/foocompany/module_name.git?hotfix +} +``` + +You will need to run a `terraform get -update=true` if you want to pull the latest versions. This can be handy when you are rapidly iterating on a module in development. + ## Generic Git Repository Generic Git repositories are also supported. The value of `source` in this case should be a complete Git-compatible URL. Using generic Git repositories requires that Git is installed on your system. @@ -141,6 +160,8 @@ 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::`.