This repository is concerned with the provisioning of infrastructure for any of my personal projects using Terraform.
Currently, the cloud services used to host my projects are AWS, GCP and Cloudflare.
This section guides you on how to setup and use this Terraform monorepo in your local machine.
Technically there's a chicken and egg situation here because using this code assumes you already have S3 and DynamoDB set up as a remote backend. So, the instructions here just assume you already have that set up, and you're just Terraforming from another computer with a fresh install of everything.
-
First, ensure Terraform is installed on your dev computer.
-
Ensure the AWS CLI is also installed on your dev computer.
-
Configure the AWS CLI to authenticate with your account. Two options:
- Use SSO and set up an AWS Profile to access your user (recommended)
- Run
aws configure
in your terminal to use the Terraform IAM user. (not recommended)
-
In your desired project folder, clone the repo.
-
Finally, run
terraform init
in any Terraform directory to set up the Terraform backend.