| .. | ||
| dev.tfvars | ||
| main.tf | ||
| README.md | ||
| secrets.tf | ||
| variables.tf | ||
Infrastructure Terraform Repository
This repository manages the permanent infrastructure behind the assessment model. Key components to this include
- Database
- Blob storage (s3 buckets)
Terraform AWS Deployment
This project uses Terraform to create infrastructure in AWS. This README covers the steps necessary to deploy the resources.
Prerequisites
- AWS CLI v2 installed and configured with profiles
- Terraform v1.2.0 or higher
Deploying
The deployment process can be broken down into the following steps:
- Initialization: This downloads the necessary provider plugins for Terraform.
terraform init
- Planning: This step creates an execution plan, showing what changes Terraform will make to reach the desired state.
terraform plan -var-file=dev.tfvars
Note: replace dev.tfvars with your appropriate variables file. For a production deployment, this would be the prod.tfvars file.
- Apply: This step applies the desired changes to reach the desired infrastructure state.
terraform apply -var-file=dev.tfvars
Note: replace dev.tfvars with your appropriate variables file.
AWS Profiles
This project uses AWS profiles for managing different environments. Ensure you have your profiles set up in your AWS credentials file (~/.aws/credentials). Here is a sample:
[DevAdmin]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
In the given example, DevAdmin is the profile for the development environment. Replace YOUR_ACCESS_KEY and YOUR_SECRET_KEY with your actual AWS credentials.