Skip to content
Snippets Groups Projects
Commit 4f9e6040 authored by nimrod's avatar nimrod
Browse files

Test: Fix the Packer test template.

parent 176464d2
No related branches found
No related tags found
No related merge requests found
Pipeline #3701 failed
{
"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`}}"
}
}
# vi: ft=tf
packer { packer {
required_plugins { required_plugins {
amazon = { docker = {
version = ">= 0.0.2" version = ">= 1.0.8"
source = "github.com/hashicorp/amazon" source = "github.com/hashicorp/docker"
} }
} }
} }
source "amazon-ebs" "ubuntu" { source "docker" "ubuntu" {
ami_name = "learn-packer-linux-aws" image = "ubuntu:jammy"
instance_type = "t2.micro" commit = true
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"
} }
build { build {
name = "learn-packer" name = "learn-packer"
sources = [ sources = [
"source.amazon-ebs.ubuntu" "source.docker.ubuntu"
] ]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment