Issue with empty list passed to functions #2153
Unanswered
sheikhanish
asked this question in
Q&A
Replies: 1 comment 2 replies
-
The lack of formatting makes this post very hard to read. If you have You can either fix your module so that it's valid with the default variable values or override the defaults so that you have a valid module: https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md#variables
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am getting an error with var.control_plane_subnet_ids as empty list of string,
var.subnet_ids as empty list of string.
Call to function "coalescelist" failed: no non-null arguments.
Here is the how we are calling coalescelist and variable declaration of control_plane_subnet_ids
variable "control_plane_subnet_ids" {
description = "List of subnet IDs where the EKS cluster control plane (ENIs) will be provisioned. Used for expanding the pool of subnets used by nodes/node groups without replacing the EKS control plane"
type = list(string)
default = []
}
variable "subnet_ids" {
description = "List of subnet IDs where the nodes/node groups will be provisioned. If
control_plane_subnet_ids
is not provided, the EKS cluster control plane (ENIs) will be provisioned in these subnets"type = list(string)
default = []
}
control_plane_subnet_ids = var.network_state_file != null ? coalescelist(local.vpc.private_subnet_ids, local.vpc.snx_subnet_ids) : coalescelist(var.control_plane_subnet_ids, var.subnet_ids)
This error comes cause tflint considers that we might pass empty list to coalescelist function. we do not want to change the the coding logic. Hence we want to suppress only this warning but I am not finding a appropriate role which can do this.
Can you let me know how to deal with this ?
Beta Was this translation helpful? Give feedback.
All reactions