Define node names from node groups

人走茶凉 提交于 2020-03-05 02:42:48

问题


I'm using nodegroups into my terraform script and I was wondering how can I set the name of instances from nodegroups:

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]
  ...
}

Without nodegroups I was doing:

resource "aws_launch_configuration" "nodes" {

  name_prefix = var.cluster-name
}

来源:https://stackoverflow.com/questions/60004229/define-node-names-from-node-groups

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!