fix: Pass nodeadm user data variables from root module down to nodegroup sub-modules (#2981)

This commit is contained in:
Bryant Biggs
2024-03-20 21:33:00 -04:00
committed by GitHub
parent 1627231af6
commit 84effa0e30
8 changed files with 59 additions and 1 deletions

View File

@@ -89,6 +89,8 @@ module "self_managed_node_group" {
| <a name="input_bootstrap_extra_args"></a> [bootstrap\_extra\_args](#input\_bootstrap\_extra\_args) | Additional arguments passed to the bootstrap script. When `platform` = `bottlerocket`; these are additional [settings](https://github.com/bottlerocket-os/bottlerocket#settings) that are provided to the Bottlerocket user data | `string` | `""` | no |
| <a name="input_capacity_rebalance"></a> [capacity\_rebalance](#input\_capacity\_rebalance) | Indicates whether capacity rebalance is enabled | `bool` | `null` | no |
| <a name="input_capacity_reservation_specification"></a> [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Targeting for EC2 capacity reservations | `any` | `{}` | no |
| <a name="input_cloudinit_post_nodeadm"></a> [cloudinit\_post\_nodeadm](#input\_cloudinit\_post\_nodeadm) | Array of cloud-init document parts that are created after the nodeadm document part | <pre>list(object({<br> content = string<br> content_type = optional(string)<br> filename = optional(string)<br> merge_type = optional(string)<br> }))</pre> | `[]` | no |
| <a name="input_cloudinit_pre_nodeadm"></a> [cloudinit\_pre\_nodeadm](#input\_cloudinit\_pre\_nodeadm) | Array of cloud-init document parts that are created before the nodeadm document part | <pre>list(object({<br> content = string<br> content_type = optional(string)<br> filename = optional(string)<br> merge_type = optional(string)<br> }))</pre> | `[]` | no |
| <a name="input_cluster_auth_base64"></a> [cluster\_auth\_base64](#input\_cluster\_auth\_base64) | Base64 encoded CA of associated EKS cluster | `string` | `""` | no |
| <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint of associated EKS cluster | `string` | `""` | no |
| <a name="input_cluster_ip_family"></a> [cluster\_ip\_family](#input\_cluster\_ip\_family) | The IP family used to assign Kubernetes pod and service addresses. Valid values are `ipv4` (default) and `ipv6` | `string` | `"ipv4"` | no |

View File

@@ -35,6 +35,9 @@ module "user_data" {
post_bootstrap_user_data = var.post_bootstrap_user_data
bootstrap_extra_args = var.bootstrap_extra_args
user_data_template_path = var.user_data_template_path
cloudinit_pre_nodeadm = var.cloudinit_pre_nodeadm
cloudinit_post_nodeadm = var.cloudinit_post_nodeadm
}
################################################################################

View File

@@ -74,6 +74,28 @@ variable "user_data_template_path" {
default = ""
}
variable "cloudinit_pre_nodeadm" {
description = "Array of cloud-init document parts that are created before the nodeadm document part"
type = list(object({
content = string
content_type = optional(string)
filename = optional(string)
merge_type = optional(string)
}))
default = []
}
variable "cloudinit_post_nodeadm" {
description = "Array of cloud-init document parts that are created after the nodeadm document part"
type = list(object({
content = string
content_type = optional(string)
filename = optional(string)
merge_type = optional(string)
}))
default = []
}
################################################################################
# Launch template
################################################################################