- Use
brew install terraform
to install terraform for mac
- Add a profile to
~/.aws/credentials
or~/.aws/config
- Create a new keypair inside the AWS region where the instance should be deployed
- Enter
terraform plan
to verify the output andterraform apply
to apply the changes - You will be prompted to enter the
aws_profile
,aws_region
,ami
andkey_name
. Once apply is complete, verify if you can ssh to the instance - Use
terraform destroy
to delete the instance setup in AWS