https://garden.io logo
#🌱|help-and-getting-started
Garden plugin terraform *-action commands don't accept arguments
# 🌱|help-and-getting-started
c

clean-kite-99549

08/30/2023, 7:33 PM
Hi again! Using Garden 0.13.12, I'm trying to isolate an individual terraform deploy action so that I correctly order cleanup operations and their dependencies. When trying to pass the name of the terraform deploy action to the commands: -
garden plugin terraform destroy-action fsx-csi-driver-tf
-
garden plugin terraform apply-action fsx-csi-driver-tf
-
garden plugin terraform plan-action fsx-csi-driver-tf
I receive the following error:
Unexpected positional argument "fsx-csi-driver-tf" (expected only plugin and command)
Based upon the CLI output for the commands, I would expect to pass an argument with the name of the action to the command.
Runs terraform apply for the specified terraform Deploy action, with variables automatically configured as inputs. Use the action name as first argument, followed by any arguments you want to pass to the command. If necessary, terraform init is run first.
Am I using this wrong or could there possibly be an issue with the CLI parser not accepting positional arguments from the plugin? Thanks, Jess
b

big-solstice-45894

08/30/2023, 9:31 PM
To pass things in to the terraform plugin you need to prefix your arguments for terraform with -- For example I use this for things like garden plugin terraform apply-root -- -auto-approve The -- lets garden know to pass those arguments down to the plugin itself. Not sure if this solves your issue, but it may help you make headway.
c

clean-kite-99549

08/30/2023, 10:26 PM
Perfect! That's the trick, thanks so much!
b

big-solstice-45894

08/30/2023, 10:51 PM
Excellent! 🙂
4 Views