github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/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 "instance_type": "t2.micro" 14 }, 15 "builders": [{ 16 "type": "amazon-ebs", 17 "ami_name": "{{user `ami_base_name`}}-terratest-packer-example", 18 "ami_description": "An example of how to create a custom AMI on top of Ubuntu", 19 "instance_type": "{{user `instance_type`}}", 20 "region": "{{user `aws_region`}}", 21 "source_ami_filter": { 22 "filters": { 23 "virtualization-type": "hvm", 24 "architecture": "x86_64", 25 "name": "*ubuntu-xenial-16.04-amd64-server-*", 26 "block-device-mapping.volume-type": "gp2", 27 "root-device-type": "ebs" 28 }, 29 "owners": ["099720109477"], 30 "most_recent": true 31 }, 32 "ssh_username": "ubuntu", 33 "encrypt_boot": false 34 }, { 35 "type": "googlecompute", 36 "image_name": "terratest-packer-example-{{isotime | clean_resource_name}}", 37 "image_family": "terratest", 38 "project_id": "{{user `gcp_project_id`}}", 39 "source_image_family": "ubuntu-1804-lts", 40 "zone": "{{user `gcp_zone`}}", 41 "ssh_username": "ubuntu" 42 }, { 43 "type": "oracle-oci", 44 "image_name": "terratest-packer-example-{{isotime}}", 45 "availability_domain": "{{user `oci_availability_domain`}}", 46 "base_image_ocid": "{{user `oci_base_image_ocid`}}", 47 "compartment_ocid": "{{user `oci_compartment_ocid`}}", 48 "pass_phrase": "{{user `oci_pass_phrase`}}", 49 "shape": "VM.Standard2.1", 50 "ssh_username": "ubuntu", 51 "subnet_ocid": "{{user `oci_subnet_ocid`}}" 52 }], 53 "provisioners": [{ 54 "type": "shell", 55 "inline": [ 56 "sudo DEBIAN_FRONTEND=noninteractive apt-get update", 57 "sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y" 58 ], 59 "pause_before": "30s" 60 }] 61 }