Skip to content

Commit

Permalink
Create launch template for EKS node groups; disable IMDS
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk-tbot committed Jan 23, 2024
1 parent 176d455 commit 79da298
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aws/cluster/modules/eks-node-group/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
resource "aws_launch_template" "this" {
name = "flightdeck-eks-launch-template"
metadata_options {
http_endpoint = "disabled"
}
}

resource "aws_eks_node_group" "this" {
for_each = local.subnets

Expand All @@ -8,6 +15,10 @@ resource "aws_eks_node_group" "this" {
node_role_arn = var.role.arn
subnet_ids = [each.value.id]

launch_template {
id = aws_launch_template.this.id
}

scaling_config {
desired_size = local.min_size_per_node_group
max_size = local.max_size_per_node_group
Expand Down

0 comments on commit 79da298

Please sign in to comment.