Mention how to use git modules over SSH (#11467)

This commit is contained in:
Jason Felice 2017-02-13 13:40:14 -05:00 committed by Paul Stack
parent fb025d4046
commit 91f309528e
1 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,14 @@ module "consul" {
} }
``` ```
These will fetch the modules using HTTPS. If you want to use SSH instead:
```
module "consul" {
source = "git@github.com:hashicorp/example.git//subdir"
}
```
**Note:** The double-slash, `//`, is important. It is what tells Terraform that that is the separator for a subdirectory, and not part of the repository itself. **Note:** The double-slash, `//`, is important. It is what tells Terraform that that is the separator for a subdirectory, and not part of the repository itself.
GitHub source URLs require that Git is installed on your system and that you have access to the repository. GitHub source URLs require that Git is installed on your system and that you have access to the repository.