Git
Progress checklist
Git is used to clone the Terraform infrastructure repo used by this walkthrough. Install it, set your identity, and clone the infra repo before running any Terraform from the repo.
-
Install Git. Required
macOS ships with a system Git, but Homebrew’s version is kept up to date:
Terminal window brew install gitTerminal window sudo apt-get update && sudo apt-get install -y gitVerify:
Terminal window git --version -
Configure your identity.
Git requires a name and email for commits. This matters if you push any changes later (for example to your own fork of the Terraform repo).
Terminal window git config --global user.name "Your Name"git config --global user.email "you@example.com"Confirm the settings:
Terminal window git config --global --list -
Clone the Terraform infrastructure repo. Required
The Terraform code for this walkthrough lives in a separate repository. Clone it into your workspace directory.
Terminal window cd ~/workspacegit clone https://github.com/jajera/terraform-aws-lambda-managed-instance.gitcd terraform-aws-lambda-managed-instanceConfirm the clone worked:
Terminal window lsYou should see
README.md,modules/,examples/waf-loki/, and other Terraform files as described in that repository. -
Optional: use SSH instead of HTTPS.
If you have an SSH key configured with GitHub, use SSH to avoid entering your credentials on every
git pull:Terminal window git clone git@github.com:jajera/terraform-aws-lambda-managed-instance.gitTo set up an SSH key: GitHub docs - generating a new SSH key.
-
Verify the remote.
Terminal window git remote -vExpected output:
origin https://github.com/jajera/terraform-aws-lambda-managed-instance.git (fetch)origin https://github.com/jajera/terraform-aws-lambda-managed-instance.git (push)
Next step
Section titled “Next step”Continue to What else for region, cost, and Terraform state considerations before starting infrastructure.