terraform init
docker-compose run --rm --entrypoint terraform terraform init -upgrade
#validate
docker-compose run --rm --entrypoint terraform terraform validate
#plan
docker-compose run --rm --entrypoint terraform terraform plan
#apply
docker-compose run --rm --entrypoint terraform terraform apply --auto-approve
#Output
docker-compose run --rm --entrypoint terraform terraform output
# Destroy the infrastructure.
docker-compose run --rm --entrypoint terraform terraform apply -destroy -auto-approve
#configure kubectl
aws eks --region us-east-2 update-kubeconfig --name $(docker-compose run --rm --entrypoint terraform terraform output -raw cluster_name)
- create user with programmatic access
- create group with policy "AmazonEC2FullAccess" (or more restrictive)
- add user to group
- aws > cost explorer > budget > create budget
- name: "terraform"
- budget type: cost
- budgeted amount: $1
docker-compose run --rm ansible ansible-playbook main.yml --check