-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE-173 added documentation on ssh-agent usage (#156)
* ISSUE-173 added documentation on ssh-agent usage * Update docs/user-guide/leverage-cli/reference/private-repos.md Co-authored-by: Angelo Fenoglio <[email protected]> * Update docs/user-guide/leverage-cli/reference/private-repos.md Co-authored-by: Angelo Fenoglio <[email protected]> * Update docs/user-guide/leverage-cli/reference/private-repos.md Co-authored-by: Angelo Fenoglio <[email protected]> * Update docs/user-guide/leverage-cli/shell.md Co-authored-by: Angelo Fenoglio <[email protected]> * ISSUE-173 Added example * ISSUE-173 Improved example * ISSUE-173 Added notes on reconfiguring terraform creds * Update docs/user-guide/leverage-cli/reference/private-repos.md Co-authored-by: Francisco Rivera <[email protected]> * cambios new landing page (#160) * new langing page * se agrega tipografias telegraphs, textos en un mismo tamaño y btn en tamaño grande --------- Co-authored-by: polijt223 <[email protected]> * ISSUE-173 added documentation on ssh-agent usage --------- Co-authored-by: Angelo Fenoglio <[email protected]> Co-authored-by: Francisco Rivera <[email protected]> Co-authored-by: Pablo Tulian <[email protected]> Co-authored-by: polijt223 <[email protected]>
- Loading branch information
1 parent
3c2f5e7
commit 8226ecc
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Working with Terraform modules in private repos | ||
|
||
If it is the case that the layer is using a module from a private repository read the following. | ||
|
||
E.g.: | ||
|
||
```yaml | ||
module "themodule" { | ||
source = "[email protected]:some-org/some-project/the-private-repo.git//modules/the-module?ref=v0.0.1" | ||
... | ||
} | ||
``` | ||
where `gitlab.com:some-org/some-project/the-private-repo.git` is a private repo. | ||
|
||
|
||
## SSH accessed repository | ||
|
||
To source a Terraform module from a private repository in a layer via an SSH connection these considerations have to be kept in mind. | ||
|
||
Leverage CLI will mount the host's SSH-Agent socket into the Leverage Toolbox container, this way your keys are accessed in a secure way. | ||
|
||
So, if an SSH private repo has to be reached, the keys for such repo should be loaded in the SSH-Agent. | ||
|
||
If the agent is automatically started and the needed keys added in the host system, it should work as it is. | ||
|
||
These steps should be followed otherwise: | ||
|
||
- start the SSH-Agent: | ||
```shell | ||
$ eval "$(ssh-agent -s)" | ||
``` | ||
|
||
- add the keys to it | ||
```shell | ||
$ ssh-add ~/.ssh/<private_ssh_key_file> | ||
``` | ||
(replace `private_ssh_key_file` with the desired file, the process can request the passphrase if it was set on key creation step) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters