-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-ami.json
37 lines (36 loc) · 957 Bytes
/
aws-ami.json
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
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-004346fb62378a538",
"source_ami_filter": {
"most_recent": true
},
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "ubuntu {{timestamp}}"
}],
"provisioners": [
{
"type": "file",
"source": "/home/ubuntu/.ssh/id_rsa.pub",
"destination": "~/.ssh/"
},
{
"type": "shell",
"inline":[
"cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys"
]
},
{
"type": "shell",
"script": "scripts/docker.sh"
}
]
}