-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer-centos.json
60 lines (60 loc) · 1.7 KB
/
packer-centos.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"iam_instance_profile": "{{env `PACKER_BUILDER_INSTANCE_PROFILE`}}",
"region": "us-east-1"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "packer-nifi-{{timestamp}}",
"associate_public_ip_address": false,
"availability_zone": "us-east-1a",
"iam_instance_profile": "{{user `iam_instance_profile`}}",
"instance_type": "m5.large",
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 100,
"volume_type": "gp2",
"delete_on_termination": true
}
],
"region": "{{user `region`}}",
"secret_key": "{{user `aws_secret_key`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "CIS Centos Linux 7 Benchmark *",
"root-device-type": "ebs"
},
"owners": ["679593333241"],
"most_recent": true
},
"ssh_username": "centos",
"tags": {
"base-ami-name": "{{ .SourceAMIName }}",
"Name": "nifi",
"os-version": "centos"
},
"type": "amazon-ebs"
}
],
"provisioners": [
{
"type": "file",
"source": "s3fs-bucket.txt",
"destination": "/tmp/s3fs-bucket.txt"
},
{
"type": "file",
"source": "tf-packer.pem.pub",
"destination": "/tmp/tf-packer.pem.pub"
},
{
"type": "shell",
"script": "./remote-setup.sh"
}
]
}