Closed IgorEulalio closed 1 year ago
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
post_bootstrap_user_data
is only applicable on self-managed nodegroups or when using a custom AMI on managed nodegroups. In those scenarios, you need to specify enable_bootstrap_user_data = true
, to tell the module that you want to inject the bootstrap command. On managed nodegroups this is provided by EKS as the last step which is why only pre_bootstrap_user_data
is applicable
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/user_data.md
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
post_bootstrap_user_data depends on the enable_bootstrap_user_data parameter being set to true, whereas pre_bootstrap_user_data doesn't.
⚠️ Note
Before you submit an issue, please perform the following first:
Versions
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
That could should configure the user_data with those 3 lines in the end of the user data bootstrap script: yum install -y pip pip install --upgrade pyyaml touch /tmp/userdata.txt
Actual behavior
Including post_bootstrap_user_data without enable_bootstrap_user_data set to true doesn't trigger any change in the terraform plan.
Additional context
I'm wondering if we have any motivation to couple post_bootstrap_user_data with enable_bootstrap_user_data. It is weird though, because pre_bootstrap_user_data is executed indepently of enable_bootstrap_user_data value.
Most of the deployments that I've worked in the past were using post bootstrap script instead of pre so we can have minimum time to join of new nodes.
If that makes sense, I'd appreciate opening a PR to fix this behavior: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v19.16.0/templates/linux_user_data.tpl