jmccann / drone-terraform

Drone plugin for triggering Terraform deployments
http://plugins.drone.io/jmccann/terraform/
Apache License 2.0
86 stars 93 forks source link

not able to get root_dir working #45

Closed aswinvg closed 7 years ago

aswinvg commented 7 years ago

trying to use root_dir and the set the directory to run the terraform commands.

But it does not work - even though others in the pipeline mentioned in drone work which does not have root dir.. Root Dir is a directory called dir1 within a git repo.

Wondering whats being missed..

Example drone yml

pipeline:
  plan-1:
    image: "jmccann/drone-terraform:latest"
    plan: true
    pull: true
    sensitive: true
    remote:
        backend: consul
        config:
          path: "folder/key"
          address: "ip:8500"
    vars:
        .......
        .......
  plan-2:
    image: "jmccann/drone-terraform:latest"
    plan: true
    pull: true
    root_dir: dir1
    sensitive: false
    vars: 
        .....
        .....

Wondering what am i missing here. Appreciate your help.

aswinvg commented 7 years ago

it fails at

time="2017-05-26T17:20:41Z" level=info msg="Drone Terraform Plugin Version" Revision=<> 

$ terraform get

exit code 1

without any other info..

jmccann commented 7 years ago

Turns out it was working fine