-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 759 Bytes
/
Makefile
File metadata and controls
44 lines (30 loc) · 759 Bytes
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
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env make
##
## make commands - packer
##
packer: validate build
validate:
packer validate ubuntu/ubuntu-ami.json
build:
packer build ubuntu/ubuntu-ami.json
##
## terraform and scripts configuration
##
export TF_VAR_ami_id=ami-0a19861ae0360586d
export TF_VAR_aws_region=us-east-2
export TF_VAR_name_tag=dev-server
##
## make commands - terraform and scripts
##
init:
cd terraform; terraform init;
apply:
cd terraform; terraform apply; ../scripts/print-instance-public-dns.sh
# we do not care about key_name when we destroy
# exporting key_name as foo prevents tf promting for it
destroy:
TF_VAR_key_name=foo cd terraform; terraform destroy;
connect:
./scripts/connect-to-instance.sh
dns:
./scripts/print-instance-public-dns.sh