From 9ad08a46220507fbf404a7c0cfada3e09a9cbc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 23 Apr 2024 14:32:28 +0200 Subject: [PATCH] Fix EC2 instance config --- tf/modules/cloudhsm/main.tf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tf/modules/cloudhsm/main.tf b/tf/modules/cloudhsm/main.tf index 77bf4f02..af988d96 100644 --- a/tf/modules/cloudhsm/main.tf +++ b/tf/modules/cloudhsm/main.tf @@ -32,10 +32,16 @@ resource "aws_security_group" "hsm" { data "aws_ami" "amazon_linux" { most_recent = true + owners = ["amazon"] filter { name = "name" - values = ["debian-12-amd64-*"] + values = ["al2023-ami-*"] + } + + filter { + name = "architecture" + values = ["x86_64"] } filter { @@ -43,14 +49,12 @@ data "aws_ami" "amazon_linux" { values = ["hvm"] } - owners = ["136693071363"] # Debian's official AWS account ID } resource "aws_instance" "codesign_box" { ami = data.aws_ami.amazon_linux.id instance_type = "t3.micro" - subnet_id = var.subnet_id security_groups = [aws_security_group.hsm.name] user_data = <<-EOF