From e3b6c6403c3057f5be12046740556fd3b1dc0363 Mon Sep 17 00:00:00 2001 From: drewmullen Date: Thu, 2 Sep 2021 08:29:43 -0400 Subject: [PATCH] include sha example and git docs --- website/docs/language/modules/sources.html.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/website/docs/language/modules/sources.html.md b/website/docs/language/modules/sources.html.md index aa637aa11..b9db802fa 100644 --- a/website/docs/language/modules/sources.html.md +++ b/website/docs/language/modules/sources.html.md @@ -237,16 +237,20 @@ only SSH key authentication is supported, and By default, Terraform will clone and use the default branch (referenced by `HEAD`) in the selected repository. You can override this using the -`ref` argument: +`ref` argument. The value of the `ref` argument can be any reference that would be accepted +by the `git checkout` command, such as branch, SHA-1 hash (short or full), or tag names. The [Git documentation](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#_single_revisions) contains a complete list. ```hcl +# referencing a specific release module "vpc" { source = "git::https://example.com/vpc.git?ref=v1.2.0" } -``` -The value of the `ref` argument can be any reference that would be accepted -by the `git checkout` command, including branch and tag names. +# referencing a specific commit SHA-1 hash +module "storage" { + source = "git::https://example.com/storage.git?ref=51d462976d84fdea54b47d80dcabbf680badcdb8" +} +``` ### "scp-like" address syntax