Loading test_files/packer.jsondeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line { "builders": [ { "access_key": "{{user `access_key`}}", "ami_name": "packer-example {{timestamp}}", "instance_type": "t1.micro", "region": "us-east-1", "secret_key": "{{user `access_key`}}", "source_ami": "ami-de0d9eb7", "ssh_username": "ubuntu", "type": "amazon-ebs" } ], "variables": { "access_key": "{{env `AWS_ACCESS_KEY_ID`}}", "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" } } test_files/template.pkr.hcl +9 −19 Original line number Diff line number Diff line # vi: ft=tf packer { required_plugins { amazon = { version = ">= 0.0.2" source = "github.com/hashicorp/amazon" docker = { version = ">= 1.0.8" source = "github.com/hashicorp/docker" } } } source "amazon-ebs" "ubuntu" { ami_name = "learn-packer-linux-aws" instance_type = "t2.micro" region = "us-west-2" source_ami_filter { filters = { name = "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*" root-device-type = "ebs" virtualization-type = "hvm" } most_recent = true owners = ["099720109477"] } ssh_username = "ubuntu" source "docker" "ubuntu" { image = "ubuntu:jammy" commit = true } build { name = "learn-packer" sources = [ "source.amazon-ebs.ubuntu" "source.docker.ubuntu" ] } Loading
test_files/packer.jsondeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line { "builders": [ { "access_key": "{{user `access_key`}}", "ami_name": "packer-example {{timestamp}}", "instance_type": "t1.micro", "region": "us-east-1", "secret_key": "{{user `access_key`}}", "source_ami": "ami-de0d9eb7", "ssh_username": "ubuntu", "type": "amazon-ebs" } ], "variables": { "access_key": "{{env `AWS_ACCESS_KEY_ID`}}", "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" } }
test_files/template.pkr.hcl +9 −19 Original line number Diff line number Diff line # vi: ft=tf packer { required_plugins { amazon = { version = ">= 0.0.2" source = "github.com/hashicorp/amazon" docker = { version = ">= 1.0.8" source = "github.com/hashicorp/docker" } } } source "amazon-ebs" "ubuntu" { ami_name = "learn-packer-linux-aws" instance_type = "t2.micro" region = "us-west-2" source_ami_filter { filters = { name = "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*" root-device-type = "ebs" virtualization-type = "hvm" } most_recent = true owners = ["099720109477"] } ssh_username = "ubuntu" source "docker" "ubuntu" { image = "ubuntu:jammy" commit = true } build { name = "learn-packer" sources = [ "source.amazon-ebs.ubuntu" "source.docker.ubuntu" ] }