Commit Graph

20488 Commits

Author SHA1 Message Date
Martin Atkins 46af0c9493 Update CHANGELOG.md 2017-09-26 14:03:41 -07:00
Martin Atkins 2c782e60fa website: documentation for the shell tab-completion support 2017-09-26 14:01:13 -07:00
Martin Atkins ece06c35b8 command: parameter autocomplete for "terraform workspace ..."
Shell tab completion for all of the subcommands under
"terraform workspace", providing the appropriate kind of auto-complete for
each argument, along with completion for for any flags.
2017-09-26 14:01:13 -07:00
Martin Atkins 793da43a72 command: workspace name autocomplete helper
This helper is a Predictor for the "complete" package that tries to
auto-complete workspace names from the current backend, if it's
initialized and operable.
2017-09-26 14:01:13 -07:00
Martin Atkins e4f18c3f4d command: multi-argument autocomplete helper
The predictors built in to the "complete" package assume that the same
type of argument is repeated indefinitely, but most Terraform commands
don't work like that, so this helper allows us to define a sequence of
predictors that apply to each argument in turn.
2017-09-26 14:01:13 -07:00
Martin Atkins 2ed9aa6077 command: autocomplete data for "terraform init" 2017-09-26 14:01:13 -07:00
Martin Atkins 82fefbc599 command: add some common autocomplete predictors
We use boolean flags and module sources in a lot of places, so we'll
define global predictors for these which we can use across many commands.
2017-09-26 14:01:13 -07:00
Martin Atkins 9b5ae9143a main: enable basic subcommand autocomplete
The CLI package has automatic support for shell autocomplete (bash and
zsh, at time of writing) for subcommands, so all we need to do here is
just opt into it.

Users can install this into their shells by running:
    terraform -install-autocomplete
2017-09-26 14:01:13 -07:00
Martin Atkins 564f5134e3 govendor fetch github.com/mitchellh/cli/... 2017-09-26 14:01:13 -07:00
James Bardin d78b575536 Merge pull request #16160 from hashicorp/jbardin/get-subdir
Handle module source subdirectories in Terraform
2017-09-26 09:23:19 -04:00
James Bardin 2b3e48aa70 fix test comments 2017-09-26 09:12:14 -04:00
Chris Marchesi 53f34ff80a Merge pull request #16169 from hashicorp/f-validation-no-zero-values
helper/validation: Add NoZeroValues
2017-09-25 17:35:00 -07:00
Chris Marchesi edb8e8904c
helper/validation: Add NoZeroValues
This adds NoZeroValues, a small SchemaValidateFunc that checks that a
defined value is not a zero value. It's useful for situations where you
want to keep someone from explicitly entering a zero value (ie:
literally "0", or an empty string) on a required field, and want to
catch it in the validation stage, versus during apply using GetOk.
2017-09-25 17:19:23 -07:00
Martin Atkins a716fe2d90 Update CHANGELOG.md 2017-09-25 14:20:50 -07:00
Krzysztof Wilczynski 6e7e03f4ea config: new "abs" interpolation function
This new function returns the absolute value for a given number.
2017-09-25 14:19:18 -07:00
Radek Simko b86967099f Merge pull request #16172 from roidelapluie/patch-2
mons-months: fix typo in maintainer-etiquette
2017-09-25 18:06:04 +01:00
Julien Pivotto a4f4c70c60 mons-months: fix typo in maintainer-etiquette 2017-09-25 17:29:19 +02:00
James Bardin f6e89bb8c3 record the subdirectory in the FolderStorage
Module detection currently requires calling the registry to determine
the subdirectory. Since we're not directly accessing the subdirectory
through FolderStorage, and now handling it within terraform so modules can
reference sibling paths, we need to call out to the registry every
time we load a configuration to verify the subdirectory for the module,
which is returned during the Detect.

Record the subdirectories for each module in the top-level of the
FolderStorage path for retrieval during Tree.Load. This lets us bypass
Detection altogether, modules can be loaded without redetecting.
2017-09-22 22:03:38 -04:00
James Bardin 1b01f18920 handle go-getter subdirs in Tree.Load
In order to remain backward compatible with some modules, we need to
handle subdirs during Load. This means duplicating part of the go-getter
code path for subDir handling so we can resolve any subDirs and globs
internally, while keeping the entire remote directory structure within
the file storage.
2017-09-22 20:32:44 -04:00
James Bardin 606b71048d update go-getter 2017-09-22 18:00:32 -04:00
James Bardin 59089ef461 add test loading an archive with `//*` subdir
The registry uses the `//*` subdir format to unpack github archives. Add
a test to cover this pattern.
2017-09-21 15:32:55 -05:00
James Bardin 38569c8508 add tests for get from tar subdir
Test that we can get a subdirectory from a tarball (or any other
"packed" source that we support).

The 'tar-subdir-to-parent' test highlights a regression where the
subdirectory module references a module in its parent directory. This
breaks the intended use ofr the subdirectory and the implementation in
go-getter. We need to fix this in terraform, and possible plan warnings
and deprecations for this type of source.
2017-09-21 13:12:33 -05:00
Martin Atkins f846beecbc Update CHANGELOG.md 2017-09-20 12:49:22 -07:00
Sunny 8928c5a60a command/state-rm: tell the user how many items were removed 2017-09-20 12:48:27 -07:00
Martin Atkins 4daf624459 website: correct the version when Terraform Registry support was added 2017-09-19 09:54:45 -07:00
Martin Atkins b0bf92d5e1 Update CHANGELOG.md 2017-09-19 09:46:56 -07:00
Nick Fagerlund 817399d4fa website: Add TFE beta to sidebar nav 2017-09-19 07:41:37 -07:00
Nick Fagerlund e71fb8649a website: Add TFE beta to sidebar nav 2017-09-19 07:40:05 -07:00
Martin Atkins 2360f48a7d release: clean up after v0.10.6 2017-09-19 14:08:54 +00:00
Martin Atkins 8712b03839
v0.10.6 2017-09-19 13:56:27 +00:00
Paul Banks 72631b34bd Add version warning to registry docs
Checked locally here by me and Jack
2017-09-19 08:54:22 -05:00
Martin Atkins 17b9405fa8 update CHANGELOG.md 2017-09-19 06:41:46 -07:00
James Bardin 50005ec817 Merge branch 'f-registry-docs' into v0.10.6-release 2017-09-18 15:30:31 -05:00
James Bardin 74955ffd4a Merge branch 'jbardin/module-registry' into v0.10.6-release 2017-09-18 15:30:21 -05:00
Martin Atkins 466968456b Update CHANGELOG.md 2017-09-18 11:42:35 -07:00
Jack Bruno 3f2136d7ee cli: terraform import -ignore-missing-config
This new option allows importing without configuration present.

Configuration is required by default as a confirmation that the provided resource name is correct, but it can be useful to override this in tools that wrap Terraform to do more involved operations.
2017-09-18 11:41:30 -07:00
Paul Banks dadb8be289 Add query params to endpoint docs 2017-09-18 12:06:25 -05:00
Paul Banks 89ac68808a Fix docs to use pagniated response format and document pagination meta 2017-09-18 12:00:34 -05:00
Paul Banks d52dbae2a0 Add back Support page with info about getting help. 2017-09-15 22:59:03 +01:00
Paul Banks e6b7490ed8 Fix broken links and update publish gif 2017-09-15 22:42:38 +01:00
James Bardin 3d3992454e Add basic ACC test
This just does a lookup in the registry to verify that the download api
works.
2017-09-15 16:16:29 -04:00
James Bardin ba14cf9511 add test fixture for new getter discovery behavior 2017-09-15 16:16:29 -04:00
James Bardin f9fb2b4c9e move local module detection ahead of the registry
The getter.FileDetector was intended to be the final detector, only
converting a path to a file URL and returning a true in all cases. We
want to check for a local module before checking the registry so no
local modules that happen to match a registry module are broken.

Wrap the getter.FileDetector to check the module source's existence
before delegating the search to the registry.
2017-09-15 16:16:28 -04:00
James Bardin d216d19f21 change the FolderStorage key
updating the key will cause the FolderStorage hash to change forcing
modules to be re-fetched. This is required because any configurations
using the subDir notation will have the configuration in the wrong
directory.
2017-09-15 16:16:28 -04:00
James Bardin 6c20141c30 remove subdir handling from Tree.Load
Terraform was redundantly handling `//dir` notation which should be
handled by go-getter. Rather than allowing go-getter to unpack a subdir
as expected, the subdir was stripped off and accessed through the module
configuration.

This scheme will no longer works now that go-getter supports `*`
subdirectories
    (e.g. `//*` would be analogous to `tar --strip-components=1`).

Even though this allows Terraform to use go-getter's native unpacking,
detection is still done separately because Detect requires a `pwd` which
is dependent on the configuration directory and not known to the
global FolderStorage.
2017-09-15 16:16:28 -04:00
James Bardin a83ff57aea Add registry detector
Add a getter.Detector for detecting registry modules and looking up
the download location of the latest version. This is essentially a
temporary API until constraint solving is supported by the registry, as
then we'll have to supply the full set of known contraints to the
registry at once for resolution and we will fetch specific versions of
modules.
2017-09-15 16:16:28 -04:00
Jearvon Dharrie 5afe1d39d1 Add `/downloads` to the outdated version message 2017-09-15 12:58:40 -07:00
Paul Banks 197bbc6114 Add screenshots, make registry the default module source example, remove dead support link in registry submenu 2017-09-15 17:50:22 +01:00
Paul Banks 722b3c6708 API examples updated to use Consul modules 2017-09-15 16:26:37 +01:00
Martin Atkins 67bdadf5c6 release: clean up after v0.10.5 2017-09-14 21:40:05 +00:00