- AWS cli
- Terraform
- Ansible
- JQ to parse JSON
- Create your key-pair locally.
# create your key-pair
ssh-keygen -t ed25519 -C ubuntu
- Give the private key proper permissions
# Make sure the key is not too open
chmod 600 ~/.ssh/ansible-key
- Export Ansible's config file to prevent ssh from checking our key.
# export Ansible's config file
export ANSIBLE_CONFIG=./ansible.cfg
- Initialize Terraform.
# run terraform init
terraform init
- Deploy.
# run terraform plan or terraform apply
# don't forget to adjust the variables before doing so
terraform apply --auto-approve