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

Variable host_labels too restrictive #82

Open
draper7 opened this issue Oct 21, 2021 · 0 comments
Open

Variable host_labels too restrictive #82

draper7 opened this issue Oct 21, 2021 · 0 comments

Comments

@draper7
Copy link

draper7 commented Oct 21, 2021

Issue:

When attempting to use labels that include dashes, host_labels validation fails.

https://github.com/terraform-ibm-modules/terraform-ibm-satellite/blob/main/modules/host/variables.tf#L12

Solution

Support dashes:

variable "host_labels" {
  description = "Host labels to assign host to control plane "
  type        = list(string)
  default     = null

  validation {
    condition     = can([for s in var.host_labels : regex("^[a-zA-Z0-9-:]+$", s)])
    error_message = "Label must be of the form `key:value`."
  }
}
@ocofaigh ocofaigh transferred this issue from terraform-ibm-modules/terraform-ibm-satellite Jul 8, 2022
@ocofaigh ocofaigh transferred this issue from terraform-ibm-modules/terraform-ibm-issue-tracker Aug 18, 2023
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

No branches or pull requests

1 participant