TODO
- public_key [string]: ssh public key to be added to the created instance
- availability_zone [string]: availability zone in which the instance and volume will be created
To get availability zones from a region:
aws ec2 describe-availability-zones --region <region>
You can save the variables in a .tfvars
file and use the -var-file
argument to terraform.
To create and prepare the environment run:
-
Inside
10-terraform
directory:terraform apply -var-file=".tfvars"
-
Inside
20-ansible
directory:ansible-playbook -i hosts playbook.yml
To remove everything run:
- Inside
10-terraform
directory:terraform destroy -var-file=".tfvars"