Commit Graph

130 Commits

Author SHA1 Message Date
Dan Carley 1b967e612f command/fmt: Accept optional directory argument
So that you can operate on files in a directory other than your current
working directory.
2016-03-07 15:07:14 +00:00
Dan Carley c753390399 command/fmt: Default write and list to true
The most common usage usage will be enabling the `-write` and `-list`
options so that files are updated in place and a list of any modified files
is printed. This matches the default behaviour of `go fmt` (not `gofmt`). So
enable these options by default.

This does mean that you will have to explicitly disable these if you want to
generate valid patches, e.g. `terraform fmt -diff -write=false -list=false`
2016-03-07 15:07:14 +00:00
Dan Carley cc41c7cfa0 command/fmt: Add new fmt command
This uses the `fmtcmd` package which has recently been merged into HCL. Per
the usage text, this rewrites Terraform config files to their canonical
formatting and style.

Some notes about the implementation for this initial commit:

- all of the fmtcmd options are exposed as CLI flags
- it operates on all files that have a `.tf` suffix
- it currently only operates on the working directory and doesn't accept a
  directory argument, but I'll extend this in subsequent commits
- output is proxied through `cli.UiWriter` so that we write in the same way
  as other commands and we can capture the output during tests
- the test uses a very simple fixture just to ensure that it is working
  correctly end-to-end; the fmtcmd package has more exhaustive tests
- we have to write the fixture to a file in a temporary directory because it
  will be modified and for this reason it was easier to define the fixture
  contents as a raw string
2016-03-07 15:07:04 +00:00
gamename 3bc09db7e0 docs(variables): redundant wording 2016-03-01 17:13:05 -06:00
gamename c6b350b98e docs(variables): describe order of evaluation with files 2016-03-01 17:08:57 -06:00
Radek Simko 7fed07a0a2 docs: Clarify use cases in docs for the validate cmd 2016-02-08 12:36:30 +00:00
Soren Mathiasen db69a2959b Added verify command 2016-02-08 12:48:14 +01:00
Paul Hinze e67fc0fe9b command: Change module-depth default to -1
This means that terraform commands like `plan`, `apply`, `show`, and
`graph` will expand all modules by default.

While modules-as-black-boxes is still very true in the conceptual design
of modules, feedback on this behavior has consistently suggested that
users would prefer to see more verbose output by default.

The `-module-depth` flag and env var are retained to allow output to be
optionally limited / summarized by these commands.
2016-01-20 13:58:02 -06:00
Radek Simko f2ffff33eb docs: Create new section for remote state backends 2016-01-18 08:08:19 +00:00
Seth Vargo ef30df002a Fix broken link 2016-01-14 17:13:14 -05:00
Seth Vargo 8dbc43639d Use HTTPS + www. for links 2016-01-14 16:03:26 -05:00
John E. Vincent 0e664c8c20 making note of artifactory env vars that are supported 2016-01-13 07:48:50 -05:00
Sander van Harmelen 9b27db6fea Add the option to specify a custom (AWS compatible) S3 endpoint
Same fix/option as I added in Vault not too long ago:
https://github.com/hashicorp/vault/pull/750
2016-01-11 14:28:52 +01:00
James Nugent 562b7dfab7 Add documentation for Artifactory remote state 2015-12-21 17:46:55 -05:00
Paul Hinze 1a19f43ee1 core: support HTTP basic auth in consul remote state
Closes #1663
2015-12-04 07:15:18 -06:00
Chad Thompson d309f8b82b Update remote-config.html.markdown
Replace "shared storaged" with "shared storage".  (Very minor change.)
2015-11-11 13:09:26 -06:00
Martin Atkins 484d6f8765 Merge pull request #3487 from nathan7/etcd
Etcd remote state backend
2015-10-19 18:42:29 -07:00
David Adams 3021069207 Update init and remote config command docs
* Update init docs to be correct, and provide an example.
* Update remote config docs to provide more details about the Consul
  backend and to provide another example.
2015-10-18 18:23:13 -05:00
Nathan Zadoks 362a2035c0 Document the etcd remote state backend 2015-10-18 23:24:56 +02:00
Julian C. Dunn 3143d1703d Graphviz Workspace appears to be dead, so remove it from the docs. 2015-10-09 01:19:14 -04:00
Paul Hinze 374070d066 website: docs for parallelism setting
/cc @stack72 @knuckolls @mitchellh
2015-10-05 17:21:29 -05:00
Radek Simko 4f7f20ba23 remote/s3: Add some docs for supported parameters 2015-09-14 10:40:53 +01:00
Anthony Scalisi 198e1a5186 remove various typos 2015-09-11 11:56:20 -07:00
Radek Simko 3f7c3a92c3 docs: Fix typo (hyphen -> underscore) in remote-config 2015-08-29 11:30:11 +01:00
Radek Simko 5560f8a8d2 Merge pull request #3057 from jszwedko/patch-1
Fix remote state AWS configuration key names
2015-08-29 11:19:39 +01:00
Mark Turner c9ec10d71a Altered Consul variable from 'access-token' to 'access_token' so it's the same as in the codebase 2015-08-28 17:18:35 +01:00
Jesse Szwedko 43e6a14290 Fix remote state AWS configuration key names 2015-08-21 21:03:20 -07:00
Mitchell Hashimoto 3cc5252b9d website: update copy 2015-06-29 13:59:25 -07:00
Mitchell Hashimoto 9d9bcc2f6e command/push: update flag to -overwrite, update docs 2015-06-29 13:53:05 -07:00
Mitchell Hashimoto 82028a7667 website: update push docs 2015-06-29 13:45:35 -07:00
Paul Hinze a75095aa69 docs: clarify wording around destroy/apply args
inspired by #2360 with clarification on args vs flags

/cc @catsby
2015-06-17 10:10:23 -05:00
Kirill Shirinkin b945d1ee0b Update docs 2015-05-27 17:11:31 +02: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
Martin Atkins 53e93d6f63 S3 remote stage storage backend, against the new remote state API.
Stores state in a particular key in a given S3 bucket.
2015-04-30 09:21:49 -07: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
Mitchell Hashimoto c9fe0c1b34 website: fix remote config docs 2015-04-07 14:50:10 -07:00
Ryan Uber 4df04e0878 website: document detailed exit codes for plan 2015-04-01 09:49:36 -07:00
Paul Hinze 91a3d22a9f docs: resource addressing 2015-03-31 18:48:54 -05:00
Paul Hinze 23d005b0e8 core: docs for targeted operations 2015-03-31 14:49:38 -05:00
Mitchell Hashimoto 4a7b554cf7 command/remote-config: do a pull with `terraform remote config` 2015-03-26 17:57:45 -07:00
Mitchell Hashimoto 27f4f5889b website: clarify docs on -var-file and terraform.tfvars [GH-1280] 2015-03-25 16:31:22 -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 d7aeb01360 website: remove localhost link 2015-03-24 17:40:12 -07:00
Mitchell Hashimoto 395dd04861 command/push: accept -vcs 2015-03-24 17:03:59 -07:00
Mitchell Hashimoto 20a81a9d05 website: update docs 2015-03-24 17:00:24 -07:00
Mitchell Hashimoto f857363aac website: document push 2015-03-24 13:30:23 -07:00
Joshua Lund 0d13cd1f54 Typo fix. 2015-03-13 17:37:05 -06:00
Mitchell Hashimoto 4306405af8 website: docs for new remote commands 2015-03-04 16:35:42 -08:00
Mitchell Hashimoto d411e2939f command/taint: -allow-missing 2015-02-26 10:56:45 -08:00
Mitchell Hashimoto d43c88f5f3 website: update docs for tainted 2015-02-26 10:45:39 -08:00
Mitchell Hashimoto fa9b655fd1 website: docs for tainted command 2015-02-26 10:37:08 -08:00
Emil Hessman 28d39cd0bc website: address spelling mistakes, casing and links 2015-01-03 19:31:53 +01:00
Don Johnson e02c62347d Usage info for graph command was actually that of output 2014-12-14 17:21:43 +09:00
Armon Dadgar 4e503d1d64 website: Adding documentation for new commands 2014-12-10 13:27:11 -08:00
Armon Dadgar 8ceabbd8e6 website: Document missing flag 2014-12-10 13:27:11 -08:00
Armon Dadgar 5f35c7852f website: Update CLI flags for existing commands 2014-12-10 13:27:11 -08:00
Armon Dadgar 493eaa3f21 website: add links to new commands 2014-12-10 13:27:11 -08:00
Dave Dash 5eb216226b Update output.html.markdown 2014-11-20 23:00:02 -08:00
Seth Vargo c1a6a48892 Update version of middleman-hashicorp 2014-11-17 20:54:29 -05:00
Seth Vargo 70a7d14e19 Fix image links 2014-11-17 20:33:49 -05:00
Seth Vargo 073a0f76c5 Add meta descriptions to all pages 2014-10-21 23:21:56 -04:00
Igor Vuk 08d017057a Fix a typo: The -> This 2014-10-16 18:16:52 +02:00
Mitchell Hashimoto d4a2010983 website: destroy command 2014-09-30 22:08:32 -07:00
Mitchell Hashimoto 0649c62616 website: update apply docs 2014-09-29 15:58:45 -07:00
Mitchell Hashimoto f760c14332 website: document init 2014-09-27 12:28:07 -07:00
Mitchell Hashimoto 03f630bdb8 website: document modules 2014-09-26 14:23:38 -07:00
Alex Gaynor 46154ca1d3 Fixed a ton of typos in docs and comments 2014-08-07 00:19:56 -07:00
borgified b5590ee6da spellchecked all the *.markdown
ran this command:
find . -iname *.markdown -type f -exec aspell check {} \;
and manually checked each problem that aspell found
2014-07-28 23:51:24 -07:00
Jamie Alessio 3e844301c5 Fixing incorrect use of "it's" in docs. 2014-07-28 13:09:32 -07:00
Armon Dadgar 8fbcd65eb1 website: Document the -backup flag 2014-07-27 23:40:18 -04:00
Mitchell Hashimoto 63c0ff9260 website: update docs for apply command 2014-07-26 17:51:17 -07:00
Mitchell Hashimoto a03af7809c website: warning that plan files are insecure 2014-07-25 21:42:06 -07:00
Jack Pearkes d4c998e0d5 website: graphiz link 2014-07-25 15:41:27 -04:00
Armon Dadgar 11b4ebea9a website: apply docs 2014-07-24 18:57:47 -04:00
Armon Dadgar 9727916cdf website: more docs 2014-07-24 18:57:47 -04:00
Armon Dadgar 890178e655 website: document plan 2014-07-24 18:57:46 -04:00
Armon Dadgar 1a94a239e4 website: documenting the CLI 2014-07-24 12:02:13 -04:00
Jack Pearkes 7b72a9defb website: initial commit 2014-07-16 17:51:48 -04:00