-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 788 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
run: stop start exec
start:
docker run -it -d -v /var/run/docker.sock:/var/run/docker.sock -v $$(pwd):/work -v $$PWD/creds:/root/.aws -v terraform-plugin-cache:/plugin-cache -w /work --name pawst bryandollery/terraform-packer-aws-alpine
exec:
docker exec -it pawst bash || true
stop:
docker rm -f pawst 2> /dev/null || true
fmt:
time terraform fmt -recursive
plan:
time terraform plan -out plan.out -var-file=terraform.tfvars
apply:
time terraform apply plan.out
up:
time terraform apply -auto-approve -var-file=terraform.tfvars
down:
time terraform destroy -auto-approve
test:
ssh -i ssh/id_rsa ubuntu@$$(terraform output -json | jq '.nodes.value[0]' | xargs)
init:
rm -rf .terraform ssh
mkdir ssh
time terraform init
ssh-keygen -t rsa -f ./ssh/id_rsa -q -N ""