diff --git a/terraform/infrastructure/aws/main.tf b/terraform/infrastructure/aws/main.tf index 06970f716..05d042fd8 100644 --- a/terraform/infrastructure/aws/main.tf +++ b/terraform/infrastructure/aws/main.tf @@ -218,7 +218,7 @@ module "jump_host" { lb_internal_ip = aws_lb.front_end.dns_name ports = [for port in local.load_balancer_ports : port.port] iam_instance_profile = var.iam_instance_profile_worker_nodes - security_group_id = aws_security_group.security_group.id + security_groups = [aws_security_group.security_group.id] } # TODO(31u3r): Remove once 2.12 is released diff --git a/terraform/infrastructure/aws/modules/jump_host/main.tf b/terraform/infrastructure/aws/modules/jump_host/main.tf index d0541079d..ab9177e45 100644 --- a/terraform/infrastructure/aws/modules/jump_host/main.tf +++ b/terraform/infrastructure/aws/modules/jump_host/main.tf @@ -23,9 +23,9 @@ resource "aws_instance" "jump_host" { instance_type = "c5a.large" associate_public_ip_address = true - iam_instance_profile = var.iam_instance_profile - subnet_id = var.subnet_id - security_groups = [var.security_group_id] + iam_instance_profile = var.iam_instance_profile + subnet_id = var.subnet_id + vpc_security_group_ids = var.security_groups tags = { "Name" = "${var.base_name}-jump-host" diff --git a/terraform/infrastructure/aws/modules/jump_host/variables.tf b/terraform/infrastructure/aws/modules/jump_host/variables.tf index 89f5e16fd..b050b887b 100644 --- a/terraform/infrastructure/aws/modules/jump_host/variables.tf +++ b/terraform/infrastructure/aws/modules/jump_host/variables.tf @@ -23,7 +23,7 @@ variable "ports" { type = list(number) } -variable "security_group_id" { - description = "Security group to attach to the jump host" - type = string +variable "security_groups" { + type = list(string) + description = "List of IDs of the security groups for an instance." }