Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions modules/eks-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ module "eks_managed_node_group" {
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines if a security group is created | `bool` | `true` | no |
| <a name="input_credit_specification"></a> [credit\_specification](#input\_credit\_specification) | Customize the credit specification of the instance | <pre>object({<br/> cpu_credits = optional(string)<br/> })</pre> | `null` | no |
| <a name="input_desired_size"></a> [desired\_size](#input\_desired\_size) | Desired number of instances/nodes | `number` | `1` | no |
| <a name="input_disable_api_stop"></a> [disable\_api\_stop](#input\_disable\_api\_stop) | If true, enables EC2 instance stop protection | `bool` | `null` | no |
| <a name="input_disable_api_termination"></a> [disable\_api\_termination](#input\_disable\_api\_termination) | If true, enables EC2 instance termination protection | `bool` | `null` | no |
| <a name="input_disk_size"></a> [disk\_size](#input\_disk\_size) | Disk size in GiB for nodes. Defaults to `20`. Only valid when `use_custom_launch_template` = `false` | `number` | `null` | no |
| <a name="input_ebs_optimized"></a> [ebs\_optimized](#input\_ebs\_optimized) | If true, the launched EC2 instance(s) will be EBS-optimized | `bool` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ resource "aws_launch_template" "this" {
default_version = var.launch_template_default_version
description = var.launch_template_description
disable_api_termination = var.disable_api_termination
disable_api_stop = var.disable_api_stop
ebs_optimized = var.ebs_optimized

dynamic "enclave_options" {
Expand Down
6 changes: 6 additions & 0 deletions modules/eks-managed-node-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ variable "update_launch_template_default_version" {
nullable = false
}

variable "disable_api_stop" {
description = "If true, enables EC2 instance stop protection"
type = bool
default = null
}

variable "disable_api_termination" {
description = "If true, enables EC2 instance termination protection"
type = bool
Expand Down
1 change: 1 addition & 0 deletions modules/self-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ module "self_managed_node_group" {
| <a name="input_default_instance_warmup"></a> [default\_instance\_warmup](#input\_default\_instance\_warmup) | Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data | `number` | `null` | no |
| <a name="input_desired_size"></a> [desired\_size](#input\_desired\_size) | The number of Amazon EC2 instances that should be running in the autoscaling group | `number` | `1` | no |
| <a name="input_desired_size_type"></a> [desired\_size\_type](#input\_desired\_size\_type) | 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` | `string` | `null` | no |
| <a name="input_disable_api_stop"></a> [disable\_api\_stop](#input\_disable\_api\_stop) | If true, enables EC2 instance stop protection | `bool` | `null` | no |
| <a name="input_disable_api_termination"></a> [disable\_api\_termination](#input\_disable\_api\_termination) | If true, enables EC2 instance termination protection | `bool` | `null` | no |
| <a name="input_ebs_optimized"></a> [ebs\_optimized](#input\_ebs\_optimized) | If true, the launched EC2 instance will be EBS-optimized | `bool` | `null` | no |
| <a name="input_efa_indices"></a> [efa\_indices](#input\_efa\_indices) | The indices of the network interfaces that should be EFA-enabled. Only valid when `enable_efa_support` = `true` | `list(number)` | <pre>[<br/> 0<br/>]</pre> | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/self-managed-node-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ variable "update_launch_template_default_version" {
nullable = false
}

variable "disable_api_stop" {
description = "If true, enables EC2 instance stop protection"
type = bool
default = null
}

variable "disable_api_termination" {
description = "If true, enables EC2 instance termination protection"
type = bool
Expand Down
2 changes: 2 additions & 0 deletions node_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ module "eks_managed_node_group" {

ebs_optimized = each.value.ebs_optimized
key_name = each.value.key_name
disable_api_stop = each.value.disable_api_stop
disable_api_termination = each.value.disable_api_termination
kernel_id = each.value.kernel_id
ram_disk_id = each.value.ram_disk_id
Expand Down Expand Up @@ -486,6 +487,7 @@ module "self_managed_node_group" {
instance_type = each.value.instance_type
key_name = each.value.key_name

disable_api_stop = each.value.disable_api_stop
disable_api_termination = each.value.disable_api_termination
instance_initiated_shutdown_behavior = each.value.instance_initiated_shutdown_behavior
kernel_id = each.value.kernel_id
Expand Down
1 change: 1 addition & 0 deletions tests/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ module "eks" {

ebs_optimized = true
disable_api_termination = false
disable_api_stop = false
enable_monitoring = true

block_device_mappings = {
Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ variable "self_managed_node_groups" {
ami_id = optional(string)
instance_type = optional(string)
key_name = optional(string)
disable_api_stop = optional(bool)
disable_api_termination = optional(bool)
instance_initiated_shutdown_behavior = optional(string)
kernel_id = optional(string)
Expand Down Expand Up @@ -1314,6 +1315,7 @@ variable "eks_managed_node_groups" {
tag_specifications = optional(list(string))
ebs_optimized = optional(bool)
key_name = optional(string)
disable_api_stop = optional(bool)
disable_api_termination = optional(bool)
kernel_id = optional(string)
ram_disk_id = optional(string)
Expand Down
Loading