Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after_cluster_joining_userdata only allows one element #123

Closed
jchanam opened this issue Jul 21, 2022 · 2 comments
Closed

after_cluster_joining_userdata only allows one element #123

jchanam opened this issue Jul 21, 2022 · 2 comments
Labels
bug 🐛 An issue with the system invalid This doesn't seem right

Comments

@jchanam
Copy link

jchanam commented Jul 21, 2022

Describe the Bug

The validation of the variable after_cluster_joining_userdata expects the length of the array to be smaller than 2, but the definition says that it can contain commands in plural.

variable "after_cluster_joining_userdata" {
  type        = list(string)
  default     = []
  description = "Additional `bash` commands to execute on each worker node after joining the EKS cluster (after executing the `bootstrap.sh` script). For more info, see https://kubedex.com/90-days-of-aws-eks-in-production"
  validation {
    condition = (
      length(var.after_cluster_joining_userdata) < 2
    )
    error_message = "You may not specify more than one `after_cluster_joining_userdata`."
  }
}

Expected Behavior

The variable to be a string or the validation to allow more than 1 element.

@jchanam jchanam added the bug 🐛 An issue with the system label Jul 21, 2022
@Nuru
Copy link
Contributor

Nuru commented Aug 17, 2022

@jchanam Sorry if this is confusing, but it follows the pattern that optional data is provided in a list of zero or one items. The userdata can be a multi-line string:

  after_cluster_joining_userdata  = [<<-EOT
    # After joining the cluster, execute a couple of commands
    echo foo
    echo bar
    EOT
  ]

@Nuru Nuru added the invalid This doesn't seem right label Aug 17, 2022
@Nuru
Copy link
Contributor

Nuru commented Aug 2, 2023

Closing due to no response after recommending a solution.

@Nuru Nuru closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants