Commit Graph

6 Commits

Author SHA1 Message Date
Mitchell Hashimoto 609219fc65 command/meta: validate config immediately
* config: test for validating multi-vars (passes)

* command/plan: test invalid run

* command/meta: validate module on load
2016-09-03 15:26:49 -07:00
James Bardin 0c714592f0 Fix variable handling on subsequent pushes
The handling of remote variables was completely disabled for push.
We still need to fetch variables from atlas for push, because if the
variable is only set remotely the Input walk will still prompt the user
for a value. We add the missing remote variables to the context
to disable input.

We now only handle remote variables as atlas.TFVar and explicitly pass
around that type rather than an `interface{}`.

Shorten the text fixture slightly to make the output a little more
readable on failures.
2016-07-28 15:06:53 -04:00
James Bardin b4b70193d2 whitespace fixes 2016-07-27 12:08:59 -04:00
James Bardin 8038e60a20 Add a function to quote HCL strings
The strings we have in the variables may contain escaped double-quotes,
which have already been parsed and had the `\`s removed. We need to
re-escape these, but only if we are in the outer string and not inside an
interpolation.
2016-07-27 10:03:04 -04:00
James Bardin de87267697 Add tf_vars to the variables sent in push
Add tf_vars to the data structures sent in terraform push.

This takes any value of type []interface{} or map[string]interface{} and
marshals it as a string representation of the equivalent HCL. This
prevents ambiguity in atlas between a string that looks like a json
structure, and an actual json structure.

For the time being we will need a way to serialize data as HCL, so the
command package has an internal encodeHCL function to do so. We can
remove this if we get complete package for marshaling HCL.
2016-07-26 20:38:50 -04:00
Mitchell Hashimoto 000d28c489 command/push: read terraform.tfvars 2015-04-07 15:34:06 -07:00