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

Test: Fix the Packer test template.

parent 176464d2
Branches
Tags
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 {
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"
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment