Skip to content

Commit

Permalink
Enable user data selection by node group name
Browse files Browse the repository at this point in the history
  • Loading branch information
OlamideOl1 committed Aug 14, 2024
1 parent 41a6616 commit b8e18fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module "node_groups" {
role = module.node_role.instance
subnets = values(data.aws_subnet.private)
tags = var.tags
user_data = var.user_data
user_data = lookup(var.user_data, each.key, null)

depends_on = [module.node_role]
}
Expand Down
4 changes: 2 additions & 2 deletions aws/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ variable "tags" {
}

variable "user_data" {
type = string
type = map(string)
description = "Optional user data script for the launch template"
default = null # Default to an empty string if no user data is provided
default = {} # Default to an empty string if no user data is provided
}

0 comments on commit b8e18fa

Please sign in to comment.