website: Special considerations about the "scp-like" git address syntax
We've seen in the past that some users try to use this form with the ssh:// URL prefix, so we'll mention explicitly that this is invalid and show a working example of how to use it without the URL scheme prefix.
This commit is contained in:
parent
f5a7f45ffb
commit
abdd680fd2
|
@ -230,6 +230,26 @@ module "vpc" {
|
||||||
The value of the `ref` argument can be any reference that would be accepted
|
The value of the `ref` argument can be any reference that would be accepted
|
||||||
by the `git checkout` command, including branch and tag names.
|
by the `git checkout` command, including branch and tag names.
|
||||||
|
|
||||||
|
### "scp-like" address syntax
|
||||||
|
|
||||||
|
When using Git over SSH, we recommend using the `ssh://`-prefixed URL form
|
||||||
|
for consistency with all of the other URL-like git address forms.
|
||||||
|
You may opt to use the alternative "scp-like" syntax instead, in which case you
|
||||||
|
must omit the `ssh://` scheme part and include only the `git::` part.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
module "storage" {
|
||||||
|
source = "git::username@example.com:storage.git"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
If you use the `ssh://` URL scheme then Terraform will assume that the colon
|
||||||
|
marks the beginning of a port number, rather than the beginning of the path.
|
||||||
|
This matches how Git itself interprets these different forms, aside from
|
||||||
|
the Terraform-specific `git::` selector prefix.
|
||||||
|
|
||||||
## Generic Mercurial Repository
|
## Generic Mercurial Repository
|
||||||
|
|
||||||
You can use arbitrary Mercurial repositories by prefixing the address with the
|
You can use arbitrary Mercurial repositories by prefixing the address with the
|
||||||
|
|
Loading…
Reference in New Issue