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

feature required - block or pause step #51

Closed ozbillwang closed 6 years ago

ozbillwang commented 7 years ago

I'd like to run a dry-run command first, then I can check the log, if everything goes fine, then click a "unblock" button or confirm with y/n, then apply the change.

Step 1: terraform plan
step 2: block or pause, wait for confirmation
step 3: terraform apply
roobert commented 6 years ago

@ozbillwang - I'm not sure if this work-flow would work for you but how about running plan when you open a PR then plan and apply when you merge to the master branch?

Something like this:

pipeline:
  plan:
    image: jmccann/drone-terraform:5.0
    actions:
       - validate
       - plan
    branches:
      exclude:
        - master

  apply:
    image: jmccann/drone-terraform:5.0
    actions:
       - plan
       - apply
    when:
      branch: master
jmccann commented 6 years ago

I do exactly what @roobert mentioned. I don't think you can pause and wait for manual confirmation with drone in general currently also.