- code to spin up ec2 instance in stockholm region (because of that extra core in t3.micro for free)
- Clone this repository
- Install terraform &
cd ec2
- Run
terraform init
- Run
terraform plan -out ec2_plan
- Run
terraform apply -auto-approve
- To terminate the instance run
terraform destroy -auto-approve
- Use datasources for getting AMIs instead of hardcoding(ec2/vars.tf/line_21)