From 8d46f853c55862b7dc7ecceaf78340f77a17848b Mon Sep 17 00:00:00 2001 From: Jacob McCann Date: Thu, 11 Feb 2016 11:32:55 -0600 Subject: [PATCH] Move ca_certs from 'remote' to 'terraform' Did this as the CA Cert if needed for all terraform commands, not just remote. So just made more sense to move it to base of vargs. --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 1bc4e0d..27c08b3 100644 --- a/main.go +++ b/main.go @@ -14,12 +14,12 @@ type terraform struct { Remote remote `json:"remote"` Plan bool `json:"plan"` Vars map[string]string `json:"vars"` + Cacert string `json:"ca_cert"` } type remote struct { Backend string `json:"backend"` Config map[string]string `json:"config"` - Cacert string `json:"ca_cert"` } func main() { @@ -33,8 +33,8 @@ func main() { var commands []*exec.Cmd remote := vargs.Remote - if remote.Cacert != "" { - commands = append(commands, installCaCert(remote.Cacert)) + if vargs.Cacert != "" { + commands = append(commands, installCaCert(vargs.Cacert)) } if remote.Backend != "" { commands = append(commands, remoteConfigCommand(remote))