Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
Saheer Babu | 5013e9d | 2025-02-05 12:04:59 +0000 | [diff] [blame] | 3 | "vpc_region": "eu-west-1", |
| 4 | "ssh_username": "ec2-user", |
| 5 | "vpc_id": "{{env `VPC_ID`}}", |
| 6 | "subnet_id": "{{env `SUBNET_ID`}}" |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 7 | }, |
| 8 | "builders": [ |
| 9 | { |
| 10 | "type": "amazon-ebs", |
Kelley Spoon | fcad2fe | 2025-07-17 12:33:51 -0500 | [diff] [blame] | 11 | "name": "freebsd-14.3-mbedtls", |
Saheer Babu | 5013e9d | 2025-02-05 12:04:59 +0000 | [diff] [blame] | 12 | "vpc_id": "{{user `vpc_id`}}", |
| 13 | "subnet_id": "{{user `subnet_id`}}", |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 14 | "region": "{{user `vpc_region`}}", |
| 15 | "source_ami_filter": { |
| 16 | "filters": { |
Kelley Spoon | fcad2fe | 2025-07-17 12:33:51 -0500 | [diff] [blame] | 17 | "image-id": "ami-0533685f87f5b6c96" |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 18 | }, |
Kelley Spoon | fcad2fe | 2025-07-17 12:33:51 -0500 | [diff] [blame] | 19 | "owners": ["782442783595"], |
Saheer Babu | f797875 | 2025-02-05 12:06:56 +0000 | [diff] [blame] | 20 | "most_recent": true, |
| 21 | "include_deprecated": true |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 22 | }, |
Arthur She | 9540c4b | 2022-04-08 10:42:40 -0700 | [diff] [blame] | 23 | "instance_type": "t3.medium", |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 24 | "ssh_username": "{{user `ssh_username`}}", |
Saheer Babu | f797875 | 2025-02-05 12:06:56 +0000 | [diff] [blame] | 25 | "ssh_timeout": "10m", |
Arthur She | 9540c4b | 2022-04-08 10:42:40 -0700 | [diff] [blame] | 26 | "ami_name": "jenkins-freebsd-amd64-{{isotime \"2006-01-02-1504\"}}", |
Kelley Spoon | fcad2fe | 2025-07-17 12:33:51 -0500 | [diff] [blame] | 27 | "ami_regions": ["eu-central-1"], |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 28 | "launch_block_device_mappings": [ |
| 29 | { |
| 30 | "device_name": "/dev/sda1", |
Kelley Spoon | fcad2fe | 2025-07-17 12:33:51 -0500 | [diff] [blame] | 31 | "volume_type": "gp3", |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 32 | "volume_size": "30", |
| 33 | "delete_on_termination": true |
| 34 | } |
Saheer Babu | 5013e9d | 2025-02-05 12:04:59 +0000 | [diff] [blame] | 35 | ], |
| 36 | "run_tags": { |
| 37 | "Name": "packer_builder" |
| 38 | } |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 39 | } |
| 40 | ], |
| 41 | "provisioners": [ |
| 42 | { |
| 43 | "type": "shell", |
| 44 | "inline": [ "sleep 60" ] |
| 45 | }, |
| 46 | { |
| 47 | "type": "shell", |
Arthur She | 8f5c18b | 2022-04-12 11:07:32 -0700 | [diff] [blame] | 48 | "execute_command": "chmod +x {{.Path}}; /bin/sh {{.Path}}", |
| 49 | "inline": [ |
| 50 | "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 She | f056835 | 2022-04-13 12:11:44 -0700 | [diff] [blame] | 51 | "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 She | 8f5c18b | 2022-04-12 11:07:32 -0700 | [diff] [blame] | 52 | "chmod 600 /home/ec2-user/.ssh/authorized_keys" |
| 53 | ] |
| 54 | }, |
| 55 | { |
| 56 | "type": "shell", |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 57 | "script": "freebsd.sh", |
Arthur She | ccae1df | 2022-04-08 19:36:04 -0700 | [diff] [blame] | 58 | "execute_command": "{{.Vars}} su root -c '{{.Path}}'" |
Kelley Spoon | 9865015 | 2022-04-07 20:53:30 -0500 | [diff] [blame] | 59 | } |
| 60 | ] |
| 61 | } |