Mitchell Hashimoto
c5d3c585c6
command/push: update var name
2015-06-29 13:57:58 -07:00
Mitchell Hashimoto
9d9bcc2f6e
command/push: update flag to -overwrite, update docs
2015-06-29 13:53:05 -07:00
Mitchell Hashimoto
8ee3281858
command/push: UX
2015-06-29 13:41:07 -07:00
Mitchell Hashimoto
dc40f044f0
command/push: prefer Atlas over local, add -set flag
2015-06-29 12:24:13 -07:00
Mitchell Hashimoto
8ebdc1e786
terraform: orphans should call post-apply hook [GH-1938]
2015-06-25 20:11:29 -07:00
Mitchell Hashimoto
a76105b0f1
command: make error message clearer for invalid tfvars format [GH-1889]
2015-06-25 17:56:37 -07:00
Mitchell Hashimoto
96b53cc06c
command: ask for input even if tfvars is set [GH-2161]
2015-06-25 15:29:46 -07:00
Radek Simko
b505d15e1e
Add resource sums to terraform plan
...
- closes #2355
2015-06-25 10:25:16 +01:00
Paul Hinze
3f2119c6e7
Merge pull request #2414 from TimeIncOSS/no-color-for-subcommands
...
Add -no-color option for subcommands
2015-06-23 15:43:37 -05:00
Paul Hinze
74fb179127
Merge pull request #2371 from hashicorp/b-fix-tf-show-with-remote-state
...
core: fix `terraform show` with remote state
2015-06-23 15:01:10 -05:00
Radek Simko
b7d41d2eed
Add -no-color to help text
2015-06-22 13:14:01 +01:00
Radek Simko
cdcd11419e
Add -no-color option for subcommands
2015-06-21 21:52:11 +01:00
Paul Hinze
cb5c2567b3
core: fix `terraform show` with remote state
...
fixes #1810
2015-06-16 12:26:04 -05:00
Paul Hinze
ad680b1832
core: show outputs after `terraform refresh`
...
closes #25
2015-06-15 10:41:42 -05:00
Paul Hinze
18924d24fe
command/apply: flatten multierrors
...
Before:
```
Error applying plan:
1 error(s) occurred:
* 1 error(s) occurred:
* 1 error(s) occurred:
* 1 error(s) occurred:
* Error creating ...
```
After:
```
Error applying plan:
1 error(s) occurred:
* Error creating ...
```
Muuuch better! :D
2015-06-07 21:32:00 -05:00
Paul Hinze
aa39dc71de
command/output: fix error msg typo
2015-06-03 09:24:20 -05:00
Kirill Shirinkin
b05e36a6e3
Add module outputs
2015-05-27 16:46:12 +02:00
Mitchell Hashimoto
77a61157fb
command/push: var/var-file supported, note in help [GH-1950]
2015-05-13 20:18:40 -07:00
Paul Hinze
8ce3e1d5b4
command/push: local vars override remote ones
...
Otherwise once you push a variable it becomes very difficult to change.
2015-05-08 18:54:38 -05:00
Andrew Langhorn
bb4f7415ca
Rename "The The" so that they can play songs again
...
Other than the fact that "The the" doesn't really make any sense anywhere
that it's used in Terraform, they're a post-punk band from the UK.
Fixes "The The" so that they can get back to playing songs.
2015-05-06 22:53:11 +01:00
Paul Hinze
29d34cd5a4
command: allow module depth to be set via env var
...
Another convienence env var here with TF_MODULE_DEPTH.
Works like you'd expect it to!
2015-04-30 16:19:43 -05:00
Paul Hinze
d30d88e327
Merge pull request #1655 from hashicorp/f-build-graph-during-plan
...
core: validate on verbose graph to detect some cycles earlier
2015-04-30 16:08:33 -05:00
Paul Hinze
5f1ea7fccc
command: add env var equivalent to -input arg
...
Setting TF_INPUT has the equivalent effect of setting the flag.
I got sick of specifying this when iterating on TF config locally.
2015-04-30 09:59:14 -05:00
Luke Amdor
b08ba78341
adding new AskSecret to ColorizeUi
2015-04-29 13:07:13 -05:00
Paul Hinze
ce49dd6080
core: graph command gets -verbose and -draw-cycles
...
When you specify `-verbose` you'll get the whole graph of operations,
which gives a better idea of the operations terraform performs and in
what order.
The DOT graph is now generated with a small internal library instead of
simple string building. This allows us to ensure the graph generation is
as consistent as possible, among other benefits.
We set `newrank = true` in the graph, which I've found does just as good
a job organizing things visually as manually attempting to rank the nodes
based on depth.
This also fixes `-module-depth`, which was broken post-AST refector.
Modules are now expanded into subgraphs with labels and borders. We
have yet to regain the plan graphing functionality, so I removed that
from the docs for now.
Finally, if `-draw-cycles` is added, extra colored edges will be drawn
to indicate the path of any cycles detected in the graph.
A notable implementation change included here is that
{Reverse,}DepthFirstWalk has been made deterministic. (Before it was
dependent on `map` ordering.) This turned out to be unnecessary to gain
determinism in the final DOT-level implementation, but it seemed
a desirable enough of a property that I left it in.
2015-04-27 09:23:47 -05:00
Paul Hinze
d4b9362518
core: validate on verbose graph to detect some cycles earlier
...
Most CBD-related cycles include destroy nodes, and destroy nodes were
all being pruned from the graph before staring the Validate walk.
In practice this meant that we had scenarios that would error out with
graph cycles on Apply that _seemed_ fine during Plan.
This introduces a Verbose option to the GraphBuilder that tells it to
generate a "worst-case" graph. Validate sets this to true so that cycle
errors will always trigger at this step if they're going to happen.
(This Verbose option will be exposed as a CLI flag to `terraform graph`
in a second incoming PR.)
refs #1651
2015-04-23 11:07:13 -05:00
Mitchell Hashimoto
e91b5136bf
Merge pull request #1356 from koendc/b-remote-plugin-case
...
command/state: fix for state files containing an upper case remote type
2015-04-14 08:34:28 -07:00
Paul Hinze
a2cb77058c
command: fix push tests when running outside repo
...
VCS detection was on by default, and blows up when the tests are run in
a copy of the Terraform source that is not a git repository, like - say
- during a Homebrew formula install, just to pick a random example. :)
2015-04-09 18:46:25 -05:00
Mitchell Hashimoto
650a9f372b
command: implement proper module.Storage interface
2015-04-07 16:46:56 -07:00
Mitchell Hashimoto
000d28c489
command/push: read terraform.tfvars
2015-04-07 15:34:06 -07:00
Mitchell Hashimoto
1fac7b6488
state: cache should use State.Equal to check equality
...
reflect.DeepEqual was returning false, sometimes.
2015-04-07 15:03:04 -07:00
Koen De Causmaecker
428fd98ba0
Handles upper case characters in the cached state file's remote type
...
If the cached state file contains a remote type field with upper case
characters, eg 'Consul', it was no longer possible to find the 'consul'
remote plugin.
2015-04-01 21:42:39 +02:00
Ryan Uber
9a091ffa78
command: plan supports detailed exit code
2015-04-01 09:38:19 -07:00
Paul Hinze
97acccd3ed
core: targeted operations
...
Add `-target=resource` flag to core operations, allowing users to
target specific resources in their infrastructure. When `-target` is
used, the operation will only apply to that resource and its
dependencies.
The calculated dependencies are different depending on whether we're
running a normal operation or a `terraform destroy`.
Generally, "dependencies" refers to ancestors: resources falling
_before_ the target in the graph, because their changes are required to
accurately act on the target.
For destroys, "dependencies" are descendents: those resources which fall
_after_ the target. These resources depend on our target, which is going
to be destroyed, so they should also be destroyed.
2015-03-31 14:49:38 -05:00
Mitchell Hashimoto
da7f307e56
command/remote-config: failing tests
2015-03-26 18:14:24 -07:00
Mitchell Hashimoto
4a7b554cf7
command/remote-config: do a pull with `terraform remote config`
2015-03-26 17:57:45 -07:00
Mitchell Hashimoto
6379a888fb
command/remote-{pull,push}: colorize and show success output
2015-03-26 17:40:39 -07:00
Mitchell Hashimoto
38b1a727bf
command/remote-config: lowercase the type so that Atlas works, for
...
example
2015-03-26 17:37:05 -07:00
Mitchell Hashimoto
7bfa5afd00
command/remote-config: show flag parse errors
...
/cc @sethvargo
2015-03-26 17:33:58 -07:00
Mitchell Hashimoto
35da19cc1f
command/remote-config: remove weird error case that shows no error
...
message
/cc @sethvargo
2015-03-26 17:31:50 -07:00
Seth Vargo
1adb3fbfa0
command: when setting up state, only write back if local is newer
2015-03-26 17:16:54 -07:00
Mitchell Hashimoto
83cb277583
command/output: don't panic if no root module in state [GH-1263]
2015-03-25 16:35:27 -07:00
Mitchell Hashimoto
431f5e6706
command/remote-config: syntax
2015-03-25 15:26:38 -07:00
Mitchell Hashimoto
2796f83950
command/remote-config: make the error message nicer for remote init
...
/cc @sethvargo - based on UX issues you ran into yesterday
2015-03-25 15:23:04 -07:00
Mitchell Hashimoto
280635d2b0
command/push: add -atlas-address
2015-03-24 17:45:19 -07:00
Mitchell Hashimoto
51614b6365
command/push: upload-modules
2015-03-24 17:42:40 -07:00
Mitchell Hashimoto
8d47f26bb7
command/push: address PR comments
2015-03-24 17:41:26 -07:00
Mitchell Hashimoto
0229852e48
command/push: change wording on error message
2015-03-24 17:39:37 -07:00
Mitchell Hashimoto
395dd04861
command/push: accept -vcs
2015-03-24 17:03:59 -07:00
Mitchell Hashimoto
86f92119e2
command/push: no version on GET should be okay
2015-03-24 13:59:13 -07:00
Mitchell Hashimoto
19c1771438
command/push: integrate atlas push client
2015-03-24 13:42:48 -07:00
Mitchell Hashimoto
1c0ffbd7bf
command/push: output the name/version of the pushed configuration
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
ee1ad49829
command/push: rename -module-lock to -module-upload
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
da46e16f4f
command/push: can set the name on the CLI
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
5e27bfc040
command/push: read name from the config
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
9062bfda89
command/meta: fix test
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
eebd7b8aa3
command/push: ask for only variables that are unset
2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
bf14143369
command/push: test that input is asked
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
d37d9ea6ef
command/push: send the context variables up
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
a1b424d53f
command/push: properly copy the data directory no matter what
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
22087181af
command/push: archive, upload
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
ca8e2085f3
command/push: archiving
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
c4dc9af120
command: add DataDir
2015-03-24 13:30:21 -07:00
Mitchell Hashimoto
cdde9149ff
command/push: start it
2015-03-24 13:30:21 -07:00
Paul Hinze
4fc5ebf47e
command: warnings should not exit
...
also properly colorize error/warnings
depends on https://github.com/mitchellh/cli/pull/15
2015-03-05 14:22:34 -06:00
Mitchell Hashimoto
89e7438f0f
command/remote
2015-03-04 16:25:11 -08:00
Mitchell Hashimoto
01cd761023
command: move remote configuration stuff
2015-03-04 16:17:30 -08:00
Mitchell Hashimoto
71315076c3
command: autoload terraform.tfvars.json as well [GH-1030]
2015-03-02 09:22:28 -08:00
Mitchell Hashimoto
8e76a02a56
command: disable backup with "-" [GH-1072]
...
/cc @phinze
2015-03-02 09:11:49 -08:00
Mitchell Hashimoto
6f9a358cc4
command/taint: fix comment
2015-02-26 14:30:02 -08:00
Mitchell Hashimoto
d411e2939f
command/taint: -allow-missing
2015-02-26 10:56:45 -08:00
Mitchell Hashimoto
01aa4236c0
command/taint: support tainting resources in modules
2015-02-26 10:44:25 -08:00
Mitchell Hashimoto
fa9b655fd1
website: docs for tainted command
2015-02-26 10:37:08 -08:00
Mitchell Hashimoto
4ec31ecb95
command/taint: new command
2015-02-26 10:29:23 -08:00
Mitchell Hashimoto
95cf69aa32
command: StateHook for continous state updates
2015-02-23 21:57:17 -08:00
Mitchell Hashimoto
a655c1619a
command: update help text
2015-02-23 15:13:56 -08:00
Mitchell Hashimoto
0299e60e83
command/init: -backend-config
2015-02-23 15:13:56 -08:00
Mitchell Hashimoto
84a0e512d3
command/remote: general `-config` flag
2015-02-23 15:13:56 -08:00
Mitchell Hashimoto
189e7e700a
command: remove remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
2c2b560d7f
command/remote: no more remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
0fcc417ddd
command/apply: remove remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
0c6d133d61
command/refresh: get rid of remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
0d39a5d9a7
command/push: no more remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
f2c6c12535
command/pull: remove remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
b8a66cb6ca
command: remove more remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
622690583c
command/init: remove dependency on remote package
2015-02-23 15:13:55 -08:00
Mitchell Hashimoto
3550f7ac3a
command: FlagVar => FlagKV
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
4f91b98a3e
command: default path should be the local path
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
f81110c2fe
command: backup stuff works better
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
4ec63bc2ef
command: deal with plan states
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
579f102f37
command: start migrating to new state package
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
c2593f6ada
terraform: re-enable dot-graphs
2015-02-19 23:00:29 -08:00
Mitchell Hashimoto
b1e5b32322
terraform: Graph returns *Graph for now
2015-02-19 12:08:32 -08:00
Radek Simko
6c8dd9e8fa
Unreachable code removed
2015-02-18 18:28:09 +00:00
lalyos
92540d3d88
fixing version numbers RCs should be labeled x.x.x-rcx
...
see conversation with ryanuber: https://github.com/hashicorp/go-checkpoint/issues/2#issuecomment-73199209
2015-02-07 16:56:56 +01:00
Emil Hessman
b40c2fe997
command: fix test failure on Windows
...
URLs are `/`-based. Windows path Separator is `\`.
Convert `\` in test fixture path to `/` with filepath.ToSlash
such that proper URLs are constructed even on Windows.
Fixes a test failure on Windows.
2015-01-28 08:13:44 +01:00
Emil Hessman
92e68c1ee6
command: fix test failure on Windows
...
Adjust the laddr argument to net.Listen to the form host:port,
as documented for net.Dial.
Fixes a test failure on Windows.
2015-01-28 08:10:52 +01:00
Phil Kates
b211d69dde
Fix typo in refresh command error
...
Noticed this while I was digging around to see how the commands work.
2015-01-17 15:43:04 -08:00
Mitchell Hashimoto
fb3f10efb0
command/apply: ask for user variables before validation [GH-736]
2015-01-16 10:46:38 -08:00
Mitchell Hashimoto
90138825a2
command/apply: don't init if no args given [GH-780]
...
I really don't know how to unit test this since I don't know what input
triggers this except that it has been reporting a few times in the wild.
2015-01-16 10:22:20 -08:00
Armon Dadgar
b69239e7f8
command/meta: Adding additional nil guards
2015-01-07 13:28:15 -08:00
Armon Dadgar
408ae62306
command/apply: Handle remote state in a plan file
2015-01-07 13:08:32 -08:00
Kevin van Zonneveld
07505ed159
Fix typo: expacts -> expects
2015-01-03 17:59:55 +01:00
Emil Hessman
fc36b1cd94
command: vet fix
...
Fixes the following vet report:
command/remote.go:165: wrong number of args for format in Sprintf call: 1 needed but 2 args
2014-12-17 13:02:19 +01:00
Armon Dadgar
cce881aadd
command/show: enable printing of remote state
2014-12-10 13:27:11 -08:00
Armon Dadgar
07e5f3ff41
command/remote: Improve UI output for remote
2014-12-10 13:27:11 -08:00
Armon Dadgar
bcd348aebd
command: updating tests
2014-12-10 13:27:10 -08:00
Armon Dadgar
6a84be0686
command: updating for pluggable backends
2014-12-10 13:27:10 -08:00
Armon Dadgar
ba01e27026
command: Refresh remote state when loading
2014-12-10 13:27:09 -08:00
Armon Dadgar
dab47b0d48
command/plan: remote enable
2014-12-10 13:27:09 -08:00
Armon Dadgar
b6265cf1a2
command/refresh: Remote enable
2014-12-10 13:27:09 -08:00
Armon Dadgar
0fb87e499d
command: Meta provides the state output path
2014-12-10 13:27:09 -08:00
Armon Dadgar
0c9436f37b
command/output: Remote enable
2014-12-10 13:27:09 -08:00
Armon Dadgar
53704db4ee
command: Enable reading remote-enabled state
2014-12-10 13:27:09 -08:00
Armon Dadgar
bf10111745
command/apply: Move state persistence to Meta
2014-12-10 13:27:09 -08:00
Armon Dadgar
c24123ff8a
command/remote: Adding tests
2014-12-10 13:27:08 -08:00
Armon Dadgar
b4b44dd0a8
command/remote: Refresh state before the disable
2014-12-10 13:27:08 -08:00
Armon Dadgar
6e7cffd60b
command/init: Only initialize a blank state with remote
2014-12-10 13:27:08 -08:00
Armon Dadgar
9168a0f1ce
command: Simplify push/pull, depend on remote command for setup
2014-12-10 13:27:08 -08:00
Armon Dadgar
1945e2099a
command/remote: Use PersistState
2014-12-10 13:27:08 -08:00
Armon Dadgar
4e44443aa3
command/remote: Working on the details
2014-12-10 13:27:08 -08:00
Armon Dadgar
b3871c0c5a
command/remote: Adding skeleton
2014-12-10 13:27:08 -08:00
Armon Dadgar
09d7fb7c27
command: cleanup test function names
2014-12-10 13:27:08 -08:00
Armon Dadgar
7ba0c003f2
command/push: Allow existing state file to enable remote
2014-12-10 13:27:08 -08:00
Armon Dadgar
38002904f4
command/push: Adding the push command
2014-12-10 13:27:08 -08:00
Armon Dadgar
722a885113
command/init: Testing remote flags
2014-12-10 13:27:07 -08:00
Armon Dadgar
34df217514
command/pull: Adding the pull command
2014-12-10 13:27:07 -08:00
Armon Dadgar
d332b8ad58
remote: implement refresh state
2014-12-10 13:27:07 -08:00
Armon Dadgar
29b3310a49
command/init: integrate remote state storage
2014-12-10 13:27:06 -08:00
Armon Dadgar
5b745e5d46
command: Run validation before asking for input. Fixes #602
2014-12-08 18:32:03 -08:00
Emil Hessman
31dd7d8391
command/init: use a more semantic name to identiy the test routine for issue 518
2014-11-20 19:17:04 +01:00
Emil Hessman
82e4bab178
command/init: test for issue 518
2014-11-04 21:19:39 +01:00
Panagiotis Moustafellos
3d51bae4b2
switch phrasing
2014-10-15 18:57:24 +03:00
Panagiotis Moustafellos
08515edc43
fixed typo on terraform destroy
2014-10-15 11:17:56 +03:00
Mitchell Hashimoto
70191d22a6
Add checkpoint
2014-10-13 14:05:43 -07:00
Mitchell Hashimoto
5f6fe1f931
command: put the modules in ".terraform/modules"
...
This also fixes a case where tests wre leaking files
2014-10-13 12:05:28 -07:00
Mitchell Hashimoto
c6a165f8c6
command: prov UI should trim only right spaces
2014-10-12 09:59:08 -07:00
Mitchell Hashimoto
fbeb99ee83
command: make sure the output has a line from a provisioner to output
2014-10-11 17:40:28 -07:00
Mitchell Hashimoto
8fc134caa1
command/destroy: don't show outputs
2014-10-11 17:37:28 -07:00
Mitchell Hashimoto
bb698217f8
command: split on \r too
2014-10-11 17:35:32 -07:00
Mitchell Hashimoto
0914e17a2a
command/apply: more than one ctrl-c properly exits immediately
2014-10-11 13:23:15 -07:00
Mitchell Hashimoto
dac5f0e3df
command/show: update help
2014-10-11 12:57:47 -07:00
Mitchell Hashimoto
069f758efb
command/show: show default state with no args [GH-349]
2014-10-11 12:56:55 -07:00
Mitchell Hashimoto
16b023bd2b
command: ask for the proper level of input
2014-10-08 10:29:54 -07:00
Mitchell Hashimoto
28cd738edc
command: provisioner output should prefix every line
2014-10-05 23:29:13 -07:00
Mitchell Hashimoto
c1fbf46a33
command: send the provisioner output to the prompt
2014-10-04 16:33:47 -07:00
Mitchell Hashimoto
063e727491
command: compilej:wq
2014-10-04 16:24:57 -07:00
Mitchell Hashimoto
b2342866c9
command: UIOutput is functinal
2014-10-04 10:25:54 -07:00
Mitchell Hashimoto
6d9463bfa8
command: set UIOutput
2014-10-04 10:20:35 -07:00
Mitchell Hashimoto
a5f70ead2d
command: destroy should ask for confirmation always
2014-10-03 16:08:50 -07:00