Commit Graph

46 Commits

Author SHA1 Message Date
Robert Liebowitz
8d98fdecac Autoload only .auto.tfvars files 2017-07-05 17:24:17 -07:00
Robert Liebowitz
006744bfe0 Use all tfvars files in working directory
As a side effect, several commands that previously did not have a failure
state can now fail during meta-parameter processing.
2017-07-05 17:24:17 -07:00
James Bardin
000e860706 Add plugin dir scaffolding
add pluginDir to command.Meta, the flag to initialize it, and the
methods to save and restore it.
2017-06-15 14:26:12 -04:00
James Bardin
718ede0636 have Meta.Backend use a Config rather than loading
Instead of providing the a path in BackendOpts, provide a loaded
*config.Config instead. This reduces the number of places where
configuration is loaded.
2017-06-09 14:03:59 -07:00
James Bardin
5eca913b14 add cli flags for -lock-timeout
Add the -lock-timeout flag to the appropriate commands.
Add the -lock flag to `init` and `import` which were missing it.
Set both stateLock and stateLockTimeout in Meta.flagsSet, and remove the
extra references for clarity.
2017-04-01 17:09:21 -04:00
James Bardin
eb8e5ac739 Change CLI flag to '-lock' 2017-02-06 10:07:32 -05:00
James Bardin
07903189f1 s/Meta.lockState/Meta.stateLock/g 2017-02-06 09:58:04 -05:00
James Bardin
a157ebbccd add -lock-state usage to plan/refresh/apply/destr 2017-02-03 14:17:17 -05:00
James Bardin
dd19cb202d add locking to plan and refresh commands 2017-02-02 18:08:28 -05:00
Mitchell Hashimoto
ad7b063262
command: convert to use backends 2017-01-26 14:33:49 -08:00
Mitchell Hashimoto
d429e82661
command: show shadow errors to the user 2016-11-03 18:14:07 -07:00
James Nugent
0e4e94a86f core: Fix -module for terraform output command
The behaviour whereby outputs for a particular nested module can be
output was broken by the changes for lists and maps. This commit
restores the previous behaviour by passing the module path into the
outputsAsString function.

We also add a new test of this since the code path for indivdual output
vs all outputs for a module has diverged.
2016-07-29 16:39:59 -05:00
James Nugent
6a20e8927d core: Fix issues from rebasing dev-0.7 onto master
- Fix sensitive outputs for lists and maps
- Fix test prelude which was missed during conflict resolution
- Fix `terraform output` to match old behaviour and not have outputs
  header and colouring
- Bump timeout on TestAtlasClient_UnresolvableConflict
2016-05-10 15:43:50 -04:00
James Nugent
b62f6af158 core: Add support for marking outputs as sensitive (#6559)
* core: Add support for marking outputs as sensitive

This commit allows an output to be marked "sensitive", in which case the
value is redacted in the post-refresh and post-apply list of outputs.

For example, the configuration:

```
variable "input" {
    default = "Hello world"
}

output "notsensitive" {
    value = "${var.input}"
}

output "sensitive" {
    sensitive = true
    value = "${var.input}"
}
```

Would result in the output:

```
terraform apply

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

  notsensitive = Hello world
  sensitive    = <sensitive>
```

The `terraform output` command continues to display the value as before.

Limitations: Note that sensitivity is not tracked internally, so if the
output is interpolated in another module into a resource, the value will
be displayed. The value is still present in the state.
2016-05-09 15:46:07 -04:00
James Nugent
50b5e7c1a5 Validate context after input of vars on refresh
Fixes #4013.
2015-11-23 10:33:40 +02:00
Kevin Nuckolls
fc60b2858c Added -parallelism to refresh and plan cli UI 2015-09-29 22:41:26 -07:00
Paul Hinze
ad680b1832 core: show outputs after terraform refresh
closes #25
2015-06-15 10:41:42 -05: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
0c6d133d61 command/refresh: get rid of remote package 2015-02-23 15:13:55 -08: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
Kevin van Zonneveld
07505ed159 Fix typo: expacts -> expects 2015-01-03 17:59:55 +01:00
Armon Dadgar
b6265cf1a2 command/refresh: Remote enable 2014-12-10 13:27:09 -08:00
Armon Dadgar
5b745e5d46 command: Run validation before asking for input. Fixes #602 2014-12-08 18:32:03 -08:00
Mitchell Hashimoto
16b023bd2b command: ask for the proper level of input 2014-10-08 10:29:54 -07:00
Mitchell Hashimoto
817f0d9f30 command: don't ask for input if terraform.tfvars file given [GH-346] 2014-10-01 08:37:57 -07:00
Mitchell Hashimoto
63453f3f1a command: apply and refresh ask for input 2014-09-29 12:46:58 -07:00
Mitchell Hashimoto
ed538a9594 command: Get command, not functional yet. Converted to use modules. 2014-09-22 10:56:50 -07:00
Alex Gaynor
46154ca1d3 Fixed a ton of typos in docs and comments 2014-08-07 00:19:56 -07:00
Mitchell Hashimoto
642fed0356 command: terraform.tfvars loaded by default if it exists 2014-08-05 09:32:01 -07:00
Mitchell Hashimoto
b172f45b94 command: make state unexported on Meta 2014-07-27 22:58:35 -07:00
Mitchell Hashimoto
80ce9ad513 command: f.Close instead of defer 2014-07-27 22:56:55 -07:00
Armon Dadgar
f26f432f4c command/refresh: Testing backup option 2014-07-27 22:58:12 -04:00
Armon Dadgar
54cc66367d command: Adding backup of state file 2014-07-27 18:09:04 -04:00
Mitchell Hashimoto
ef6fba754d command: refactor so Context never plans 2014-07-26 17:51:15 -07:00
Mitchell Hashimoto
3534470ca3 command: -var flag works 2014-07-18 11:37:27 -07:00
Mitchell Hashimoto
6c8c09c784 command/*: only Plan on the Apply 2014-07-14 11:48:03 -07:00
Mitchell Hashimoto
3a851bece0 command: convert all to use the new Meta thing 2014-07-12 20:37:30 -07:00
Mitchell Hashimoto
6c736bd3c4 command: introduce Meta and "-no-color" option 2014-07-12 20:21:46 -07:00
Mitchell Hashimoto
3d35158170 command: update synopsis to be better 2014-07-12 19:28:38 -07:00
Mitchell Hashimoto
e39378b254 command/refresh: better comment 2014-07-11 22:01:33 -07:00
Mitchell Hashimoto
ff75d15f51 command/refresh: better error message if bad state 2014-07-11 22:00:55 -07:00
Mitchell Hashimoto
9a6f1e594b command/refresh: default state path, optional args 2014-07-11 21:56:43 -07:00
Mitchell Hashimoto
d3d45ca064 command: fix some issues with refresh, tests passing 2014-07-07 21:12:12 -07:00
Mitchell Hashimoto
43889a8c59 command: validate context 2014-07-03 13:12:45 -07:00
Mitchell Hashimoto
a6ae7230d1 command: use new API 2014-07-03 11:46:40 -07:00
Mitchell Hashimoto
1819b6fb34 command/refresh 2014-06-27 11:09:01 -07:00