> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/terraform-aws-modules/terraform-aws-eks/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-Managed Node Group

> Input variables and outputs for the self-managed-node-group sub-module.

The `self-managed-node-group` sub-module manages EC2 Auto Scaling Groups for use as EKS worker nodes. It is invoked for each entry in the `self_managed_node_groups` map on the root module.

## Inputs

### General

Determines whether to create self managed node group or not.

A map of tags to add to all resources.

Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration.

### Autoscaling Group

Name of the Self managed Node Group.

Determines whether to use `name` as is or create a unique name beginning with the `name` as the prefix.

Determines whether to create autoscaling group or not.

A list of one or more availability zones for the group. Used for EC2-Classic and default subnets when not specified with `subnet_ids` argument. Conflicts with `subnet_ids`.

A list of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availability_zones`.

The minimum size of the autoscaling group.

The maximum size of the autoscaling group.

The number of Amazon EC2 instances that should be running in the autoscaling group.

The unit of measurement for the value specified for `desired_size`. Supported for attribute-based instance type selection only. Valid values: `units`, `vcpu`, `memory-mib`.

Indicates whether capacity rebalance is enabled.

Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics.

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

The name of the placement group into which you'll launch your instances.

`EC2` or `ELB`. Controls how health checking is done.

Time (in seconds) after instance comes into service before checking health.

Whether to ignore failed Auto Scaling scaling activities while waiting for capacity.

Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate.

A list of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`.

A list of processes to suspend for the Auto Scaling Group.

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

A list of metrics to collect.

The granularity to associate with the metrics to collect. The only valid value is `1Minute`.

One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched.

If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Contains `max_healthy_percentage` and `min_healthy_percentage`.

If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated.

**instance\_refresh fields**

The strategy to use for instance refresh. Only `Rolling` is supported.

Set of additional property names that will trigger an Instance Refresh.

Override default parameters for Instance Refresh. Contains `min_healthy_percentage`, `max_healthy_percentage`, `instance_warmup`, `checkpoint_delay`, `checkpoint_percentages`, `skip_matching`, `auto_rollback`, `scale_in_protected_instances`, `standby_instances`, and `alarm_specification`.

Determines whether to use a mixed instances policy in the autoscaling group or not.

Configuration block containing settings to define launch targets for Auto Scaling groups.

**mixed\_instances\_policy fields**

Distribution of on-demand and spot instances. Contains `on_demand_allocation_strategy`, `on_demand_base_capacity`, `on_demand_percentage_above_base_capacity`, `spot_allocation_strategy`, `spot_instance_pools`, and `spot_max_price`.

Launch template configuration with `override` list for multiple instance types or requirements.

Timeout configurations for the autoscaling group. Contains `delete`.

A map of additional tags to add to the autoscaling group created. Tags are applied to the autoscaling group only and are NOT propagated to instances.

### AMI and Instance

The AMI from which to launch the instance.

Type of Amazon Machine Image (AMI) associated with the node group.

Kubernetes cluster version - used to lookup default AMI ID if one is not provided.

The type of the instance to launch.

The attribute requirements for the type of instance. If present then `instance_type` cannot be present.

The key name that should be used for the instance.

If true, the launched EC2 instance will be EBS-optimized.

A list of security group IDs to associate.

The ID of the EKS cluster primary security group to associate with the instance(s).

Enables/disables detailed monitoring.

Determines whether to enable Elastic Fabric Adapter (EFA) support.

Determines whether to enable EFA (`false`, default) or EFA and EFA-only (`true`) network interfaces. Note: requires vpc-cni version `v1.18.4` or later.

The indices of the network interfaces that should be EFA-enabled. Only valid when `enable_efa_support` = `true`.

### Launch Template

Determines whether to create launch template or not.

The ID of an existing launch template to use. Required when `create_launch_template` = `false`.

Name of launch template to be created.

Determines whether to use `launch_template_name` as is or create a unique name beginning with the `launch_template_name` as the prefix.

Description of the launch template.

Launch template version. Can be version number, `$Latest`, or `$Default`.

Default Version of the launch template.

Whether to update Default Version each update. Conflicts with `launch_template_default_version`.

A map of additional tags to add to the tag\_specifications of launch template created.

The tags to apply to the resources during launch.

If true, enables EC2 instance termination protection.

Shutdown behavior for the instance. Can be `stop` or `terminate`. (Default: `stop`).

The kernel ID.

The ID of the ram disk.

Specify volumes to attach to the instance besides the volumes specified by the AMI.

Targeting for EC2 capacity reservations.

The CPU options for the instance.

Customize the credit specification of the instance.

Enable Nitro Enclaves on launched instances.

The market (purchasing) option for the instance.

The maintenance options for the instance.

A list of license specifications to associate with.

Customize the metadata options for the instance.

Customize network interfaces to be attached at instance boot time.

The placement of the instance.

Determines whether a placement group is created and used by the node group.

The options for the instance hostname. The default values are inherited from the subnet.

### User Data

Name of associated EKS cluster.

Endpoint of associated EKS cluster.

Base64 encoded CA of associated EKS cluster.

The CIDR block (IPv4 or IPv6) used by the cluster to assign Kubernetes service IP addresses.

The IP family used to assign Kubernetes pod and service addresses. Valid values are `ipv4` (default) and `ipv6`.

Additional DNS IP addresses to use for the cluster. Only used when `ami_type` = `BOTTLEROCKET_*`.

User data that is injected into the user data script ahead of the EKS bootstrap script. Not used when `ami_type` = `BOTTLEROCKET_*`.

User data that is appended to the user data script after of the EKS bootstrap script. Not used when `ami_type` = `BOTTLEROCKET_*`.

Additional arguments passed to the bootstrap script.

Path to a local, custom user data template file to use when rendering user data.

Array of cloud-init document parts that are created before the nodeadm document part.

Array of cloud-init document parts that are created after the nodeadm document part.

### IAM Role

Determines whether an IAM instance profile is created or to use an existing IAM instance profile.

Amazon Resource Name (ARN) of an existing IAM instance profile that provides permissions for the node group. Required if `create_iam_instance_profile` = `false`.

ARN of the IAM role used by the instance profile. Required when `create_access_entry = true` and `create_iam_instance_profile = false`.

Name to use on IAM role created.

Determines whether cluster IAM role name is used as a prefix.

IAM role path.

Description of the role.

ARN of the policy that is used to set the permissions boundary for the IAM role.

Whether to attach the `AmazonEKS_CNI_Policy`/`AmazonEKS_CNI_IPv6_Policy` IAM policy to the IAM role.

Additional policies to be added to the IAM role.

A map of additional tags to add to the IAM role created.

Determines whether an IAM role policy is created or not.

A list of IAM policy statements - used for adding specific IAM permissions as needed.

### Access Entry

Determines whether an access entry is created for the IAM role used by the node group.

### Security Group

Determines if a security group is created.

Name to use on security group created.

Determines whether the security group name is used as a prefix.

Description of the security group created.

Security group ingress rules to add to the security group created.

Security group egress rules to add to the security group created.

A map of additional tags to add to the security group created.

***

## Outputs

### Launch Template

**launch\_template\_id** `string`

The ID of the launch template.

**launch\_template\_arn** `string`

The ARN of the launch template.

**launch\_template\_latest\_version** `number`

The latest version of the launch template.

**launch\_template\_name** `string`

The name of the launch template.

### Autoscaling Group

**autoscaling\_group\_arn** `string`

The ARN for this autoscaling group.

**autoscaling\_group\_id** `string`

The autoscaling group id.

**autoscaling\_group\_name** `string`

The autoscaling group name.

**autoscaling\_group\_min\_size** `number`

The minimum size of the autoscaling group.

**autoscaling\_group\_max\_size** `number`

The maximum size of the autoscaling group.

**autoscaling\_group\_desired\_capacity** `number`

The number of Amazon EC2 instances that should be running in the group.

**autoscaling\_group\_default\_cooldown** `number`

Time between a scaling activity and the succeeding scaling activity.

**autoscaling\_group\_health\_check\_grace\_period** `number`

Time after instance comes into service before checking health.

**autoscaling\_group\_health\_check\_type** `string`

EC2 or ELB. Controls how health checking is done.

**autoscaling\_group\_availability\_zones** `list(string)`

The availability zones of the autoscaling group.

**autoscaling\_group\_vpc\_zone\_identifier** `set(string)`

The VPC zone identifier.

### IAM Role

**iam\_role\_name** `string`

The name of the IAM role.

**iam\_role\_arn** `string`

The Amazon Resource Name (ARN) specifying the IAM role.

**iam\_role\_unique\_id** `string`

Stable and unique string identifying the IAM role.

### IAM Instance Profile

**iam\_instance\_profile\_arn** `string`

ARN assigned by AWS to the instance profile.

**iam\_instance\_profile\_id** `string`

Instance profile's ID.

**iam\_instance\_profile\_unique** `string`

Stable and unique string identifying the IAM instance profile.

### Access Entry

**access\_entry\_arn** `string`

Amazon Resource Name (ARN) of the Access Entry.

### Security Group

**security\_group\_arn** `string`

Amazon Resource Name (ARN) of the security group.

**security\_group\_id** `string`

ID of the security group.

### Additional

**image\_id** `string`

ID of the image.

**user\_data** `string`

Base64 encoded user data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.