CircleCI-Public / terraform-orb

Deploy your infrastructure via a CircleCI pipeline using the Terraform orb. Integrate Infrastructure-as-Code (IaC) to help provision and manage any cloud, infrastructure, or service of your choice.
https://circleci.com/orbs/registry/orb/circleci/terraform
MIT License
10 stars 44 forks source link

Can't use List(String) varible type in parameter var #84

Open IWB-jdetournay opened 2 years ago

IWB-jdetournay commented 2 years ago

Orb Version 3.0.1

Describe the bug Using a List(String) type is not permit with the parameter var since it use a , to separate value. i.e. foo=[bar,foo] is separated as -var foo=[bar -var foo] Giving the error: -var option foo] is not correctly specified.

To Reproduce

- terraform/apply:
    var: 'foo=[bar,foo]'

Expected behavior

foo=[bar,foo] is separated as -var foo=[bar,foo]

Additional context

In the code a tr is use to replace , by a \n

for var in $(echo "${TF_PARAM_VAR}" | tr ',' '\n'); do
    PLAN_ARGS="$PLAN_ARGS -var $(eval echo "$var")"
done