Skip to content

zoitech/terraform-eks-nodegroup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

The following requirements are needed by this module:

Providers

The following providers are used by this module:

  • aws (>=3.25.0)

Modules

No modules.

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

Description: the EKS cluster name

Type: string

Description: a map of objects containing the desired groups (each object name is the nodegroup name)

Type:

map(object(
    {
      node_role_arn           = string,
      subnet_ids              = list(string),
      version                 = string,
      instance_types          = list(string),
      spot                    = bool
      tags                    = map(string),
      launch_template_id      = string,
      launch_template_version = string,
      desired_size            = string,
      max_size                = string,
      min_size                = string,
      taint                   = map(string)
    }
  ))

Optional Inputs

No optional inputs.

Outputs

No outputs.

Usage

module "eks-nodegroups" {
  source                           = "git::https://dummy.git"
  cluster_name                     = var.cluster-name
  nodegroups                       = {
    group1 = {
      node_role_arn           = "arn:aws:iam::111111222222:role/eks_nodes",
      subnet_ids              = ["subnet1", "subnet2", "subnet3"],
      version                 = "1.21",
      instance_types          = ["c5.xlarge"],
      spot                    = false,
      tags                    = {              
        owner = "[email protected]"
        environment = "test"
      },
      launch_template_id      = lt-0e06d290751193123,
      launch_template_version = 2,
      desired_size            = 1,
      max_size                = 5,
      min_size                = 0,
      taint                   = []
    },
    group2 = {
      node_role_arn           = "arn:aws:iam::111111222222:role/eks_nodes",
      subnet_ids              = ["subnet1", "subnet2", "subnet3"],
      version                 = "1.21",
      instance_types          = ["c3.xlarge", "c4.xlarge", "c5.xlarge"],
      spot                    = true,
      tags                    = {              
        owner = "[email protected]"
        environment = "test"
      },
      launch_template_id      = "lt-0e06d290751193123",
      launch_template_version = 2,
      desired_size            = 1,
      max_size                = 5,
      min_size                = 0,
      taints                  = [{
        key = "key1"
        value = "value1"
        effect = "NO_SCHEDULE" ## Valid values: NO_SCHEDULE, NO_EXECUTE, PREFER_NO_SCHEDULE
      }]
    }
  }
}

About

terraform module to create EKS node groups

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages