我在Terraform脚本中使用了节点组,我想知道如何设置节点组中实例的名称:
resource "aws_eks_node_group" "node_group" {
count = length(var.public_subnet_ids)
cluster_name = aws_eks_cluster.cluster.name
node_group_name = "node-group-${count.index}"
node_role_arn = aws_iam_role.nodes.arn
subnet_ids = [var.public_subnet_ids[count.index]]
instance_types = [var.node-instance-type]
...
}
我当时没有节点组:
resource "aws_launch_configuration" "nodes" {
name_prefix = var.cluster-name
}