blob: f80ee07fb48225841e830c4004de4ad4bb2282cc [file] [log] [blame]
Kelley Spoon98650152022-04-07 20:53:30 -05001{
2 "variables": {
Saheer Babuad414d12025-02-05 12:04:59 +00003 "vpc_region": "eu-west-1",
4 "ssh_username": "ec2-user",
5 "vpc_id": "{{env `VPC_ID`}}",
6 "subnet_id": "{{env `SUBNET_ID`}}"
Kelley Spoon98650152022-04-07 20:53:30 -05007 },
8 "builders": [
9 {
10 "type": "amazon-ebs",
11 "name": "freebsd-12.3-mbedtls",
Saheer Babuad414d12025-02-05 12:04:59 +000012 "vpc_id": "{{user `vpc_id`}}",
13 "subnet_id": "{{user `subnet_id`}}",
Kelley Spoon98650152022-04-07 20:53:30 -050014 "region": "{{user `vpc_region`}}",
15 "source_ami_filter": {
16 "filters": {
Saheer Babufd64ea42025-02-05 12:06:56 +000017 "image-id": "ami-0ce4290dab6773fdd",
Arthur She9540c4b2022-04-08 10:42:40 -070018 "product-code": "ejmg4fgac56dgb0xac6m4fpis"
Kelley Spoon98650152022-04-07 20:53:30 -050019 },
Arthur She9540c4b2022-04-08 10:42:40 -070020 "owners": ["aws-marketplace"],
Saheer Babufd64ea42025-02-05 12:06:56 +000021 "most_recent": true,
22 "include_deprecated": true
Kelley Spoon98650152022-04-07 20:53:30 -050023 },
Arthur She9540c4b2022-04-08 10:42:40 -070024 "instance_type": "t3.medium",
Kelley Spoon98650152022-04-07 20:53:30 -050025 "ssh_username": "{{user `ssh_username`}}",
Saheer Babufd64ea42025-02-05 12:06:56 +000026 "ssh_timeout": "10m",
Arthur She9540c4b2022-04-08 10:42:40 -070027 "ami_name": "jenkins-freebsd-amd64-{{isotime \"2006-01-02-1504\"}}",
Saheer Babuad414d12025-02-05 12:04:59 +000028 "ami_regions": ["eu-west-1"],
Kelley Spoon98650152022-04-07 20:53:30 -050029 "launch_block_device_mappings": [
30 {
31 "device_name": "/dev/sda1",
32 "volume_type": "gp2",
33 "volume_size": "30",
34 "delete_on_termination": true
35 }
Saheer Babuad414d12025-02-05 12:04:59 +000036 ],
37 "run_tags": {
38 "Name": "packer_builder"
39 }
Kelley Spoon98650152022-04-07 20:53:30 -050040 }
41 ],
42 "provisioners": [
43 {
44 "type": "shell",
45 "inline": [ "sleep 60" ]
46 },
47 {
48 "type": "shell",
Arthur She8f5c18b2022-04-12 11:07:32 -070049 "execute_command": "chmod +x {{.Path}}; /bin/sh {{.Path}}",
50 "inline": [
51 "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDUkTXHpvPd6doR4vBDEY2t7D0PqSvZEv/D6mavMhztZHkf3TupVS2hTtiZdMwccFpP2RlCnQa7njV02Dx0JEcQwyklIOaSDqFx6LqVDEw0UidoNYrMDdqFOjQsGHThZ09DogPvJ3DUqdYOiTq3vI4OaQzFet+x/JJzJo/iXmNHf8vONCjSiqLIUWw8cgImvvFnVJPy1Rh6x6y6+CfAkDsG4HraDQkzcZzZE4wLs5Fddmdyw5dk8UHH2UH6q/yN9tT3Z36BjumStytYFAcVjiZrkk7da+N5tmjpg/7tbJrQVB9b5sNEjFjyg6zCsc8wktLVk472MuIuHiWSYGDWN4Ar4Pmd24pMgraQA513zR1PChTAeI1VKTvVb9nGUt8rWIJpzkSZiXC2rhoU2STfY+3LsGjnIhWc5OQHs//VGxoy2etKbd1y6/+cO+rbgmk5rQO4KXFCRwj6AWZqyg/BCtSr398YmK3xYjCM8T2cJ04gb3I376pB/RbTvGBwvjcTpGUhWrMCt+V8f61NKVHlH/Of/Dv60IpE68iDv/7zmjXJlmZCvnQkDz9I89eM/RRGkcy+JWZvyAkD/Su2eG1/1dPA48jrVoCB5+f7W8/2iO1jnqpjtggKkFmW1eSo5D5wdLnZTuwVBZQmx9fkZqPt+3796hCwM9lWfVkjsprPVQRqxw== tf-staging-key' > /home/ec2-user/.ssh/authorized_keys",
Arthur Shef0568352022-04-13 12:11:44 -070052 "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCSF9HT6oMDD+7ztIlQmUtCz8qcfS+5MUEnABudsKAFW2ih7XyyLD5xXYZIeMvQLo65Mfzi5DGKBs85Kaw7kLCiNkaU4a8OzjipUfjM0QyHbMo5wjChBhMxqIyx9NK8lpcBPeJquUns07sXs+NRxQ/yc9QQ1kLf61vWPim+R+PW2f0aL+GGTYlZq/v4Ik1GHahSM/5g51skGOsUeh1w4qhlNvE3VQFGQT4rqlnzQDmmhdIjfEJhp574ldwOOALm50OWa62auVPAGwcDujqf/GoX/HMugxVaKryDyrTu+5+lMPUbizf8Lhu4UuBfCPeK0K/gbhdn5M4d4mc0Qd4oaRf5' >> /home/ec2-user/.ssh/authorized_keys",
Arthur She8f5c18b2022-04-12 11:07:32 -070053 "chmod 600 /home/ec2-user/.ssh/authorized_keys"
54 ]
55 },
56 {
57 "type": "shell",
Kelley Spoon98650152022-04-07 20:53:30 -050058 "script": "freebsd.sh",
Arthur Sheccae1df2022-04-08 19:36:04 -070059 "execute_command": "{{.Vars}} su root -c '{{.Path}}'"
Kelley Spoon98650152022-04-07 20:53:30 -050060 }
61 ]
62}