blob: ea446cb824df4c69080b723e48dbfdb21954e64b [file] [log] [blame]
Arthur She68e717e2021-12-07 14:41:23 -08001{
2 "variables": {
Saheer Babu5013e9d2025-02-05 12:04:59 +00003 "vpc_region": "eu-west-1",
4 "ssh_username": "ubuntu",
5 "vpc_id": "{{env `VPC_ID`}}",
6 "subnet_id": "{{env `SUBNET_ID`}}"
Arthur She68e717e2021-12-07 14:41:23 -08007 },
8 "builders": [
9 {
10 "type": "amazon-ebs",
11 "name": "ubuntu-20.04-mbedtls",
Saheer Babu5013e9d2025-02-05 12:04:59 +000012 "vpc_id": "{{user `vpc_id`}}",
13 "subnet_id": "{{user `subnet_id`}}",
Arthur She68e717e2021-12-07 14:41:23 -080014 "region": "{{user `vpc_region`}}",
15 "source_ami_filter": {
16 "filters": {
17 "virtualization-type": "hvm",
18 "name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
19 "root-device-type": "ebs"
20 },
21 "owners": ["099720109477"],
22 "most_recent": true
23 },
24 "instance_type": "m5a.large",
25 "ssh_username": "{{user `ssh_username`}}",
26 "ami_name": "jenkins-amd64-{{isotime \"2006-01-02-1504\"}}",
Arthur She68e717e2021-12-07 14:41:23 -080027 "launch_block_device_mappings": [
28 {
29 "device_name": "/dev/sda1",
Arthur She646f87c2023-02-06 23:00:20 -080030 "volume_type": "gp3",
Arthur She165f2c72023-02-08 13:55:41 -080031 "volume_size": "50",
Arthur She68e717e2021-12-07 14:41:23 -080032 "delete_on_termination": true
33 }
Saheer Babu5013e9d2025-02-05 12:04:59 +000034 ],
35 "run_tags": {
36 "Name": "packer_builder"
37 }
Arthur She68e717e2021-12-07 14:41:23 -080038 }
39 ],
40 "provisioners": [
41 {
42 "type": "shell",
43 "inline": [ "sleep 60" ]
44 },
45 {
46 "type": "shell",
47 "script": "ubuntu.sh",
48 "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'"
49 }
50 ]
51}