Skip to content

Latest commit

 

History

History
146 lines (115 loc) · 6.04 KB

File metadata and controls

146 lines (115 loc) · 6.04 KB
page_title duploai_node_group Resource - duploai
subcategory
description Manages a DuploCloud AI Helpdesk AWS EKS managed node group.

duploai_node_group (Resource)

Manages a DuploCloud AI Helpdesk AWS EKS managed node group.

Example Usage

# Basic on-demand node group
resource "duploai_node_group" "basic" {
  workspace_id      = "<workspace-id>"
  name              = "app-nodes"
  scope_ids         = ["<scope-id>"]
  resource_group_id = "<eks-resource-group-id>"
  environment_id    = "<environment-id>"

  instance_types = ["t3.medium"]
  min_size       = 1
  max_size       = 3
  desired_size   = 2
}

# Spot node group with disk sizing, labels, and a taint
resource "duploai_node_group" "spot" {
  workspace_id      = "<workspace-id>"
  name              = "batch-spot"
  scope_ids         = ["<scope-id>"]
  resource_group_id = "<eks-resource-group-id>"
  environment_id    = "<environment-id>"

  instance_types = ["m5.large", "m5a.large"]
  min_size       = 0
  max_size       = 10
  desired_size   = 2
  disk_size_gb   = 100
  capacity_type  = "<capacity-type>"
  ami_type       = "<ami-type>"

  additional_labels = {
    workload = "batch"
  }

  taints = [
    {
      key    = "dedicated"
      value  = "batch"
      effect = "<taint-effect>"
    }
  ]

  allocation_tag = "batch"

  timeouts {
    create = "30m"
    update = "30m"
    delete = "20m"
  }
}

Schema

Required

  • desired_size (Number) Desired number of nodes (between min_size and max_size).
  • environment_id (String) ID of the environment that owns the resource group.
  • instance_types (List of String) EC2 instance types for the node group (e.g. t3.medium).
  • max_size (Number) Maximum number of nodes.
  • min_size (Number) Minimum number of nodes.
  • name (String) Name of the node group.
  • resource_group_id (String) ID of the resource group (EKS cluster, under an environment) this node group belongs to.
  • scope_ids (List of String) Scope IDs that link this node group to a cloud provider account.
  • workspace_id (String) ID of the workspace that owns this node group.

Optional

  • additional_labels (Map of String) Kubernetes labels applied to the nodes.
  • allocation_tag (String) Allocation tag used to target workloads to this node group.
  • ami_type (String) AMI type for the nodes. Accepted values are defined by the backend EksNodeGroupAmiType enum; confirm the exact value against your tenant.
  • capacity_type (String) Capacity type (e.g. on-demand vs. spot). Accepted values are defined by the backend EksNodeGroupCapacityType enum; confirm the exact value against your tenant.
  • description (String) Optional description.
  • disk_size_gb (Number) Root EBS volume size in GiB for each node.
  • failure_retries (Number) Number of extra polls to tolerate a transient failure status during provisioning before treating it as terminal. Overrides the resource's default; leave unset to use it.
  • instance_visibility (String) Node placement visibility (public vs. private subnets). Accepted values are defined by the backend InstanceVisibilityType enum; confirm the exact value against your tenant.
  • provisioner_type (String) Provisioner type: Cli, IacNativeTf, IacDuploTf, or DirectApiCall.
  • provisioner_version (String) Optional provisioner version.
  • taints (Attributes List) Kubernetes taints applied to the nodes. (see below for nested schema)
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • asg_name (String) Name of the backing Auto Scaling group.
  • id (String) Composite resource identifier (workspace_id/id).
  • kubernetes_version (String) Kubernetes version of the node group.
  • node_group_arn (String) ARN of the provisioned node group.
  • node_group_id (String) ID of this node group, for reference by dependent resources.
  • node_group_name (String) Provisioned EKS node group name.
  • release_version (String) AMI release version of the node group.
  • stack_id (String) ID of the underlying provisioning stack.
  • status (String) Current provisioning status.
  • subnet_ids (List of String) Subnets the node group is deployed into.

Nested Schema for taints

Required:

  • effect (String) Taint effect. Accepted values are defined by the backend EksNodeGroupTaintEffect enum (e.g. NoSchedule/PreferNoSchedule/NoExecute); confirm the exact value against your tenant.
  • key (String) Taint key.

Optional:

  • value (String) Taint value.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Import an existing node group resource.
#  - WORKSPACE_ID is the unique identifier of the workspace (e.g. 69b2aa30675718845bfe87a0)
#  - NODE_GROUP_ID is the unique identifier of the node group (e.g. 6a2258e94703bc957a1b824e)
terraform import duploai_node_group.mynodes WORKSPACE_ID/NODE_GROUP_ID
# Example:
# terraform import duploai_node_group.mynodes 69b2aa30675718845bfe87a0/6a2258e94703bc957a1b824e