-
Notifications
You must be signed in to change notification settings - Fork 1
/
ubuntu-bionic.pkr.hcl
59 lines (52 loc) · 1.19 KB
/
ubuntu-bionic.pkr.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
source = "github.com/hashicorp/amazon"
}
}
}
variable aws_access_key {
type = string
default = ""
description = "Add your AWS Access Key ID"
sensitive = true
}
variable aws_secret_key {
type = string
default = ""
description = "Add your AWS Secret Access key"
sensitive = true
}
variable aws_region {
type = string
default = ""
}
source "amazon-ebs" "ubuntu" {
ami_name = "tidal-migrations-ubuntu-18-04"
instance_type = "t2.micro"
region = "${var.aws_region}"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
source_ami_filter {
filters = {
name = "ubuntu/images/*ubuntu-bionic-18.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
}
ssh_username = "ubuntu"
force_deregister = true
force_delete_snapshot = true
}
build {
name = "ubuntu-mvp"
sources = [
"source.amazon-ebs.ubuntu"
]
provisioner "shell" {
script = "../scripts/setup.sh"
}
}