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

Dive in the possibility to use outputs to improve vars validation #22

Open
ianaya89 opened this issue Nov 8, 2024 · 0 comments
Open

Comments

@ianaya89
Copy link
Member

ianaya89 commented Nov 8, 2024

Example:

output "validate_cidr_and_availability_zones_length" {
  value = length(var.eks_public_cidr)

  precondition {
    condition     = length(var.eks_public_cidr) == length(var.eks_availability_zones)
    error_message = "The length of eks_public_cidr (${length(var.eks_public_cidr)}) must match the length of eks_availability_zones (${length(var.eks_availability_zones)})."
  }
}
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