Garden plugin terraform *-action commands don't ac...
# 🌱|help-and-getting-started
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
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.
Perfect! That's the trick, thanks so much!
Excellent! 🙂