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

Fix bug with remote states and implement secrets for remote state #28

Closed edwinavalos closed 7 years ago

edwinavalos commented 7 years ago

I think I found a bug in the plugin, it looks for terraform.remote for the remote configuration. It should just be looking under the "remote" key. Otherwise remote state configuration was being skipped.

Updated the documentation in the Dockerfile so that people can build this locally and test

Updated plugin.go -- Implemented exportSecrets terraform remote configuration in some cases requires AWS credentials to grab the remote state, the current implementation did not allow for the secure use of those secrets.

Updated DOCS.md -- Adding documentation to use secrets for aws s3 remote configuration

I also ran go fmt on my stuff and it touched a few more places than I thought it would, but it's legit changes.

edwinavalos commented 7 years ago

@jmccann Do you want the other fixes in a separate PR until a decision is made on the upstream secrets management?

jmccann commented 7 years ago

@edwinavalos It's always best to make multiple smaller PRs for such reasons. ;)

edwinavalos commented 7 years ago

I did some terrible things to my github branch to try and clean up my fork. I'm going to close this, and open a new PR with this as a reference. Sorry about that...