github.com/terraform-modules-krish/terratest@v0.29.0/examples/packer-basic-example/build.json (about) 1 { 2 "min_packer_version": "1.0.4", 3 "variables": { 4 "aws_region": "us-east-1", 5 "ami_base_name": "", 6 "gcp_project_id": "", 7 "gcp_zone": "us-central1-a", 8 "oci_availability_domain": "", 9 "oci_base_image_ocid": "", 10 "oci_compartment_ocid": "", 11 "oci_pass_phrase": "", 12 "oci_subnet_ocid": "" 13 }, 14 "builders": [{ 15 "type": "amazon-ebs", 16 "ami_name": "{{user `ami_base_name`}}-terratest-packer-example", 17 "ami_description": "An example of how to create a custom AMI on top of Ubuntu", 18 "instance_type": "t2.micro", 19 "region": "{{user `aws_region`}}", 20 "source_ami_filter": { 21 "filters": { 22 "virtualization-type": "hvm", 23 "architecture": "x86_64", 24 "name": "*ubuntu-xenial-16.04-amd64-server-*", 25 "block-device-mapping.volume-type": "gp2", 26 "root-device-type": "ebs" 27 }, 28 "owners": ["099720109477"], 29 "most_recent": true 30 }, 31 "ssh_username": "ubuntu", 32 "encrypt_boot": false 33 }, { 34 "type": "googlecompute", 35 "image_name": "terratest-packer-example-{{isotime | clean_resource_name}}", 36 "image_family": "terratest", 37 "project_id": "{{user `gcp_project_id`}}", 38 "source_image_family": "ubuntu-1804-lts", 39 "zone": "{{user `gcp_zone`}}", 40 "ssh_username": "ubuntu" 41 }, { 42 "type": "oracle-oci", 43 "image_name": "terratest-packer-example-{{isotime}}", 44 "availability_domain": "{{user `oci_availability_domain`}}", 45 "base_image_ocid": "{{user `oci_base_image_ocid`}}", 46 "compartment_ocid": "{{user `oci_compartment_ocid`}}", 47 "pass_phrase": "{{user `oci_pass_phrase`}}", 48 "shape": "VM.Standard2.1", 49 "ssh_username": "ubuntu", 50 "subnet_ocid": "{{user `oci_subnet_ocid`}}" 51 }], 52 "provisioners": [{ 53 "type": "shell", 54 "inline": [ 55 "sudo DEBIAN_FRONTEND=noninteractive apt-get update", 56 "sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y" 57 ] 58 }] 59 }