forked from aws/amazon-ecs-ami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
al2022neu.pkr.hcl
33 lines (31 loc) · 1.03 KB
/
al2022neu.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
locals {
ami_name_al2022neu = "${var.ami_name_prefix_al2022}-neuron-hvm-2022.0.${var.ami_version}${var.kernel_version_al2022}-x86_64"
}
source "amazon-ebs" "al2022neu" {
ami_name = "${local.ami_name_al2022neu}"
ami_description = "Amazon Linux AMI 2022.0.${var.ami_version} x86_64 ECS HVM EBS"
instance_type = "inf1.xlarge"
launch_block_device_mappings {
volume_size = var.block_device_size_gb
delete_on_termination = true
volume_type = "gp3"
device_name = "/dev/xvda"
}
region = var.region
source_ami_filter {
filters = {
name = "${var.source_ami_al2022}"
}
owners = ["amazon"]
most_recent = true
}
ssh_username = "ec2-user"
tags = {
os_version = "Amazon Linux 2022"
source_image_name = "{{ .SourceAMIName }}"
ecs_runtime_version = "Docker version ${var.docker_version_al2022}"
ecs_agent_version = "${var.ecs_agent_version}"
ami_type = "al2022neu"
ami_version = "2022.0.${var.ami_version}"
}
}