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

tfValidate vars and var-file argument removal #106

Closed gsingh1 closed 5 years ago

gsingh1 commented 5 years ago

This PR updates the tfValidate function so it does not pass any -var or -var-file arguments to the validate command as it seems to be deprecated in 0.12 and warnings like below are raised.

Tested on 6.1-0.12.11:

$ terraform validate -var-file=config/test/terraform.tfvars -var build_number=4237

Warning: The -var and -var-file flags are not used in validate. Setting them has no effect.

These flags will be removed in a future version of Terraform.

Success! The configuration is valid, but there were some validation warnings as shown above.

Also adds tfValidate test.

gsingh1 commented 5 years ago

bump @jmccann

jmccann commented 5 years ago

fixes #108

jmccann commented 5 years ago

Actually, I cleaned this up and pushed to master. Thanks!

jmccann commented 5 years ago

released in jmccann/drone-terraform:6.2-0.12.11