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

Extend hcl2 support with more functions #491

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Dec 23, 2020

Ref. tonistiigi/binfmt#14

More utility functions that could be useful in the HCL definition.

In a follow-up PR I would like to add value types accepted for a variable (currently limited to string type) like terraform does and maybe some basic validation:

variable "slugs" {
  type = list(string)
  default = [
    "crazymax/diun",
    "ghcr.io/crazy-max/diun"
  ]
  validation {
    condition = length(var.slugs) > 0
    error_message = "At least one slug is required."
  }
}

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max marked this pull request as ready for review December 23, 2020 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants