-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload git ssh public key to git user
We want to upload the generated SSH key to the created git user. We use the resource `aws_iam_user_ssh_key` from terraform, implemented in hashicorp/terraform#5744 so this requires an updated version of terraform. We retrieve the generated key as a s3 resource and pass it to terraform as a TF_VAR_ variable. After the key is uploaded, AWS assigns it a unique id which must be used as user for SSH when connecting to the codecommit git repositories. We render and output a full url with that ssh_key_id and the ssh url of the repository, using scp like connect strings.
- Loading branch information
Showing
5 changed files
with
26 additions
and
0 deletions.
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
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 @@ | ||
Empty file git_ssh_key_id to avoid terraform fail during the first run. |
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