Commit Graph

22074 Commits

Author SHA1 Message Date
James Bardin 68ff5f767c
Merge pull request #17700 from ScottWinkler/master
Fix scrub mistake
2018-03-28 14:15:47 -04:00
James Bardin 545e77e184
Merge pull request #17711 from hashicorp/jbardin/cleanup-temps
cleanup temp files
2018-03-28 14:06:21 -04:00
James Bardin e980156451 cleanup temp files from command tests
Rather than try to modify all the hundreds of calls to the temp helper
functions, and cleanup the temp files at every call site, have all tests
work within a single temp directory that is removed at the end of
TestMain.
2018-03-28 13:08:38 -04:00
James Bardin 15dc75720e don't re-use a TempDir path
Rather than creating and immediately removing a temp directory to get a
random path name, fetch files into a subdirectory.
2018-03-28 11:33:42 -04:00
James Bardin 28c46d1a90 cleanup temp files from backend tests 2018-03-28 11:00:23 -04:00
Martin Atkins 0a5059df15 website: Stronger statements on when to use named workspaces
In an earlier commit we added the "Best Practices" situation to try to
clarify the intended uses of named workspaces and to warn against using
them as an alternative to system decomposition.

However, the prior statement was cautious in its recommendations in the
interests of being pragmatic, and as a result we've seen that users have
in some cases misunderstood or disregarded these recommendations.

The new "When to use Multiple Workspaces" section aims to be more explicit
that having multiple separate Terraform configurations is the preferred
solution for many use-cases, and that workspaces are intended for a
more limited set of use-cases around convenient development and testing.
It also emphasizes the analogy to version control branches that was just
a footnote in the prior text, to help the reader become familiar with the
concept by relating it to a concept and workflow they are hopefully
already familiar with.

This new section also attempts to provide a more elaborate description of
the proposed alternative when the goal is system decomposition. In the
long run some of this content would probably be better placed elsewhere
since it is useful advice even for users who never discover named
workspaces, but it can live here for the time being to limit the scope of
this change until we are ready to make more comprehensive revisions to
the docs in this area.

Finally, the introductory documentation here is adjusted slightly in
preparation for the intended future expansion of workspaces to include
stored variable values and, for more tailored backends like Terraform
Enterprise, a full log of prior operations. More revisions will be
required to cover the specifics of this later, but this new framing will
hopefully help users form a mental model of named workspaces that has
room for these future enhancements and the corresponding concept in
Terraform Enterprise, rather than our previous framing that workspaces
are fundamentally just named states.
2018-03-27 18:36:36 -07:00
ScottWinkler f043954352
Fix scrub mistake
Fixed a bug in which an example custom provider would be saved as "terraform-provider-custom-v0.0.1" instead of "terraform-provider-custom_v0.0.1". Not an issue when running the bundle on TFE, but a problem when trying to run a terraform bundle locally.
2018-03-26 20:22:53 -07:00
Masayuki Morita 1e2bb07504 command: Restore `auto-approve` flag in the output of `apply -help` 2018-03-26 10:21:47 -07:00
AV Jafrey 725281f4aa website: Fix typo in the provider development program guide 2018-03-23 16:09:33 -07:00
James Bardin e9e4ee4940
Merge pull request #17609 from hashicorp/jbardin/remote-command
clean up remote.Cmd api
2018-03-23 17:34:06 -04:00
Matthew Frahry fe84adb5f8
Merge pull request #17685 from hashicorp/cherry-pick-oraclepaas
Cherry pick oraclepaas
2018-03-23 15:16:11 -06:00
Matthew Frahry 7c66624177
Update major-index.html.markdown 2018-03-23 14:50:30 -06:00
Matthew Frahry ddb9af57dc
Update index.html.markdown 2018-03-23 14:49:35 -06:00
Matthew Frahry 17dbe1a835
Merge pull request #17682 from cgriggs01/master
add oracle pass links
2018-03-23 14:46:58 -06:00
Chris Griggs fd43298ffe
Update major-index.html.markdown 2018-03-23 12:57:51 -07:00
Chris Griggs 441194b396
fixes 2018-03-23 12:57:25 -07:00
Matthew Frahry c44e901bf0
Update index.html.markdown 2018-03-23 13:48:13 -06:00
Chris 043c74178f add oracle pass links 2018-03-23 12:31:36 -07:00
James Bardin ad8642e2c2 have remote.ExitError format errors and status
Since all use cases of ExitStatus are just putting it into fmt.Errorf,
usually with the command string, have ExitStatus do that for the caller.
2018-03-23 11:36:57 -04:00
James Bardin c8ce63fc16
Merge pull request #17658 from NikkeiFTLearning/homeDir-build-in-method
Use built-in method to get user homedir instead of eval on sh
2018-03-23 10:50:42 -04:00
James Bardin 0c39b69d50
Merge pull request #17674 from hashicorp/jbardin/import-timeouts
make sure ResourceData timeouts are always set
2018-03-22 18:22:29 -04:00
James Bardin 798df9dafa make sure ResourceData timeouts are always set
Return the global default timeout if the ResourceData timeouts are nil.

Set the timeouts from the Resource when calling Resource.Data, so that
the config values are always available.
2018-03-22 15:10:43 -04:00
James Bardin a24ace68c8 release: clean up after v0.11.5 2018-03-21 21:23:40 +00:00
James Bardin 3b18741004 Merge branch 'master' into stable-website 2018-03-21 21:22:18 +00:00
James Bardin 342c529aa5
v0.11.5 2018-03-21 21:05:10 +00:00
James Bardin 4cdb6dff0b update CHANGELOG.md 2018-03-21 17:02:41 -04:00
James Bardin 47b178aee9
Merge pull request #17645 from hashicorp/jbardin/GH-17462
unlock state in console, import, graph, and push
2018-03-21 12:26:05 -04:00
Sébastien Maccagnoni 31f2e6a463 website: Correct descriptions on provider category pages 2018-03-21 09:17:24 -07:00
James Bardin 90a75422fb unlock state in console, import, graph, and push
The state locking improvements for the regular command had the side
effect of locking the state in the console, import, graph and push
commands. Those commands had been updated to get a state via the
Backend.Context method, which locks the state whenever possible, and now
need to call Unlock directly.

Add Unlock calls to all commands that call Context directly.
2018-03-21 12:13:40 -04:00
Paweł Socha e4b0a989f3 Use build-in method to get user homedir instead of eval on sh 2018-03-21 14:55:56 +01:00
James Bardin 40421c30e3
Merge pull request #17646 from hashicorp/jbardin/GH-17638
use correct context for communicator.Retry
2018-03-21 08:34:17 -04:00
James Bardin 56acda00bc add timeout test to remote-exec
Add a test to remote-exec to make sure the proper timeout is honored
during apply.

TODO: we need some test helpers for provisioners, so they can all be
verified.
2018-03-20 14:24:01 -04:00
James Bardin 2954d9849a add some more functionality to MockCommunicator 2018-03-20 14:23:32 -04:00
James Bardin 9b4b5f2a72 use correct context for communicator.Retry
The timeout for a provisioner is expected to only apply to the initial
connection. Keep the context for the communicator.Retry separate from
the global cancellation context.
2018-03-20 13:06:28 -04:00
James Bardin 38e6309f03
Merge pull request #17642 from hashicorp/jbardin/GH-17462
remove more unneeded partial outputs
2018-03-20 11:11:54 -04:00
Brian Flad 5bc83aa111
Merge pull request #17639 from vlad-ro/master
Minor grammar fix.
2018-03-20 07:37:22 -04:00
Sander van Harmelen 36777e3022
Add a line to describe the new Chef provisioner option (#17640) 2018-03-20 12:16:17 +01:00
Sander van Harmelen 45ed0e1f44
Update CHANGELOG.md 2018-03-20 11:55:49 +01:00
Scott Hain 07aeea51da Updates the chef provisioner to allow specifying a channel (#17355)
* Updates the chef provisioner to allow specifying a channel

This also updates the omnitruck url to the current url.

Signed-off-by: Scott Hain <shain@chef.io>

* Update omnitruck URL

Signed-off-by: Scott Hain <shain@chef.io>
2018-03-20 11:51:14 +01:00
James Bardin a5c4f7e08e remove unneeded partial outputs
filterPartialOutputs was not taking into account that some dependent
resources might yet be removed from the graph. Check that they are not
in the targeted set before declaring that the output remain.
2018-03-19 21:20:06 -04:00
James Bardin e5f8adfc1a add failing test for invalid output with targets
Outputs that are missing references aren't always removed from the
graph, due to being filtered before their dependents are removed.
2018-03-19 20:32:37 -04:00
James Bardin 6b6b92f6b3
Merge pull request #17636 from hashicorp/jbardin/windows-refresh-lock
Don't open a new file descriptor for a locked state.
2018-03-19 19:17:12 -04:00
James Bardin a84b4a669a use the open state file for refresh when possible
Only open a new file descriptor for RefreshState if we haven't written a
state, and don't have the correct state open already. This prevents
windows from failing to refresh a locked state.
2018-03-19 18:17:43 -04:00
James Bardin 8fb8b2cffc make sure ReadState returns an error
ReadState would hide any errors, assuming that it was an empty state.
This can mask errors on Windows, where the OS enforces read locks on the
state file.
2018-03-19 18:17:25 -04:00
James Bardin e10a7917e6 add failing test for windows state locks
Refreshing a locked state on windows could return nil if the read path
was locked, no state was yet written, and the read path is the same as
the write path.

Add a test that locks then refreshes a newly initialized state struct.
2018-03-19 17:09:53 -04:00
Brian Flad edd68950c9
Merge pull request #17616 from lrakai/master
Typo Correction
2018-03-19 06:30:03 -04:00
Outsider 815d4db368
website: remove an unnecessary parameter for API 2018-03-18 19:02:05 +09:00
Logan Rakai dd935588f7
Typo Correction 2018-03-18 00:01:30 -06:00
ScottWinkler 60bc16305a tools/terraform-bundle: accept custom plugins from a local directory
To make it easier to include third-party plugins in generated bundles, we'll now search a local directory for available plugins and skip attempting to install from releases.hashicorp.com if a dependency can be satisfied locally.
2018-03-16 16:28:58 -07:00
James Bardin 3fbdee0777 clean up remote.Cmd api
Combine the ExitStatus and Err values from remote.Cmd into an error
returned by Wait, better matching the behavior of the os/exec package.

Non-zero exit codes are returned from Wait as a remote.ExitError.
Communicator related errors are returned directly.

Clean up all the error handling in the provisioners using a
communicator. Also remove the extra copyOutput synchronization that was
copied from package to package.
2018-03-16 14:29:48 -04:00