forked from hashicorp/terraform-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
37 lines (37 loc) · 1.02 KB
/
packer.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_id": "{{ env `AWS_ACCESS_KEY_ID` }}",
"aws_secret_access_key": "{{ env `AWS_SECRET_ACCESS_KEY` }}",
"aws_region": "{{ env `AWS_REGION` }}",
"website_environment": "production",
"fastly_api_key": "{{ env `FASTLY_API_KEY` }}"
},
"builders": [
{
"type": "docker",
"image": "hashicorp/middleman-hashicorp:0.3.28",
"discard": "true",
"volumes": {
"{{ pwd }}/ext": "/ext",
"{{ pwd }}/content": "/website"
}
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"AWS_ACCESS_KEY_ID={{ user `aws_access_key_id` }}",
"AWS_SECRET_ACCESS_KEY={{ user `aws_secret_access_key` }}",
"AWS_REGION={{ user `aws_region` }}",
"DEPLOY_ENV={{ user `website_environment` }}",
"FASTLY_API_KEY={{ user `fastly_api_key` }}"
],
"inline": [
"bundle check || bundle install",
"bundle exec middleman build",
"/bin/bash ./scripts/deploy.sh"
]
}
]
}