Skip to content

Commit

Permalink
Remove unnecessary null check on list(string) param
Browse files Browse the repository at this point in the history
  • Loading branch information
cbruno10 committed Oct 16, 2023
1 parent c1c6f1c commit 9127a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipelines/ec2/describe_ec2_instances.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline "describe_ec2_instances" {

cmd = concat(
["ec2", "describe-instances"],
param.instance_ids != null && try(length(param.instance_ids), 0) > 0 ? concat(["--instance-ids"], param.instance_ids) : [],
try(length(param.instance_ids), 0) > 0 ? concat(["--instance-ids"], param.instance_ids) : [],
param.instance_type != null ? ["--filters", "Name=instance-type,Values=${param.instance_type}"] : [],
param.ebs_optimized != null ? ["--filters", "Name=ebs-optimized,Values=${param.ebs_optimized}"] : []
)
Expand Down

0 comments on commit 9127a2d

Please sign in to comment.