5 source = "github.com/hashicorp/amazon"
10 variable "first_run_commands" {
11 description = "Commands to run before deployment via remote-exec"
18 variable "last_run_commands" {
19 description = "Commands to run after deployment via remote-exec"
22 "sudo sed -i 's/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g' /etc/apt/apt.conf.d/20auto-upgrades"
26 variable "ansible_file_path" {
27 description = "Path to Ansible playbook"
29 default = "../../fdio.infra.ansible/site.yaml"
32 variable "ansible_python_executable" {
33 description = "Path to Python interpreter"
35 default = "/usr/bin/python3"
38 variable "ansible_topology_path" {
39 description = "Path to Ansible playbook which creates a topology file"
41 default = "../../fdio.infra.ansible/cloud_topology.yaml"
44 variable "ansible_provision_pwd" {
45 description = "Password used for ansible provisioning (ansible_ssh_pass)"
50 source "amazon-ebs" "csit_ubuntu_jammy_arm_sut" {
51 ami_name = "csit_ubuntu_jammy_arm_sut"
52 ami_description = "CSIT SUT image based on Ubuntu jammy"
54 instance_type = "c6gn.4xlarge"
55 launch_block_device_mappings {
56 device_name = "/dev/sda1"
60 force_deregister = true
61 region = "eu-central-1"
62 skip_create_ami = false
63 source_ami = "ami-0329d3839379bfd15"
64 ssh_username = "ubuntu"
68 name = "csit_ubuntu_jammy_arm_sut-packer"
70 "source.amazon-ebs.csit_ubuntu_jammy_arm_sut"
73 inline = var.first_run_commands
75 provisioner "ansible" {
76 playbook_file = var.ansible_file_path
80 "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
81 "--extra-vars", "ansible_python_interpreter=${var.ansible_python_executable}",
82 "--extra-vars", "aws=true"
86 inline = var.last_run_commands