-
Notifications
You must be signed in to change notification settings - Fork 2
/
ami_x86_64.pkr.hcl
43 lines (43 loc) · 1.41 KB
/
ami_x86_64.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
source "amazon-ebs" "x86_64" {
ami_name = "teamserver-hvm-${local.timestamp}-x86_64-ebs"
ami_regions = var.ami_regions
associate_public_ip_address = true
encrypt_boot = true
instance_type = "t3.small"
kms_key_id = var.build_region_kms
launch_block_device_mappings {
delete_on_termination = true
device_name = "/dev/xvda"
encrypted = true
volume_size = 8
volume_type = "gp3"
}
region = var.build_region
region_kms_key_ids = var.region_kms_keys
skip_create_ami = var.skip_create_ami
source_ami = data.amazon-ami.debian_bookworm_x86_64.id
ssh_username = "admin"
subnet_filter {
filters = {
"tag:Name" = "AMI Build"
}
}
tags = {
Application = "Teamserver"
Architecture = "x86_64"
Base_AMI_Name = data.amazon-ami.debian_bookworm_x86_64.name
GitHub_Release_URL = var.release_url
OS_Version = "Debian Bookworm"
Pre_Release = var.is_prerelease
Release = var.release_tag
Team = "VM Fusion - Development"
}
# Many Linux distributions are now disallowing the use of RSA keys,
# so it makes sense to use an ED25519 key instead.
temporary_key_pair_type = "ed25519"
vpc_filter {
filters = {
"tag:Name" = "AMI Build"
}
}
}