Commit Graph

21848 Commits

Author SHA1 Message Date
James Bardin ff8d02cd25 remove old warning care create_before_destroy
Create-before-destroy dependencies are automatically ordered correctly
by terraform. Remove the old notice about requiring all dependencies to
have the same setting for create_before_destroy.
2018-04-03 17:37:36 -04:00
James Bardin 620f1985a1 unused outputs in a destroy should be pruned
During a full destroy when outputs are removed, the
NodeDestroyableOutput was preventing it's sibling output from being
destroyed. Prune the output node if it only has its destroy node as a
dependent.

The destroy output test is simply run a second time with no state, which
would cause the output interpolation to fail if it remained in the
graph.
2018-04-03 13:19:04 -04:00
James Bardin e493407e7e
Merge pull request #17765 from hashicorp/jbardin/scale-in-multi-var
detect scaled in resources when evaluating *s
2018-04-03 13:12:35 -04:00
stack72 df9b2913ae backend/manta: Add support for manta backend tiered path structure
This was already added to triton-go and is now making its way to
the manta backend

```
% acctests backend/remote-state/manta
=== RUN   TestBackend_impl
--- PASS: TestBackend_impl (0.00s)
=== RUN   TestBackend
--- PASS: TestBackend (27.36s)
=== RUN   TestBackendLocked
--- PASS: TestBackendLocked (16.24s)
=== RUN   TestRemoteClient_impl
--- PASS: TestRemoteClient_impl (0.00s)
=== RUN   TestRemoteClient
--- PASS: TestRemoteClient (3.40s)
=== RUN   TestRemoteClientLocks
--- PASS: TestRemoteClientLocks (7.17s)
PASS
ok  	github.com/hashicorp/terraform/backend/remote-state/manta
```
2018-04-03 17:32:10 +03:00
James Bardin 79b948c9cc detect scaled in resources when evaluating *s
If an existing resources is scaled back to 0, locals and outputs will
still have a multi-variable reference to evaluate, which should return
an empty list. Due to how the resource is removed, the resource will
still exist in the state but with no primary instance, which needs to be
ignored in the instance count.
2018-04-03 10:00:45 -04:00
Chris Marchesi db5ed51703
Merge pull request #17667 from hashicorp/f-resource-diff-getokexists-computed
helper/schema: Add Computed to ResourceDiff, expose GetOkExists
2018-04-02 07:32:04 -07:00
Joe Khoobyar 138e64dee0 more unit tests 2018-03-30 22:05:10 -04:00
Joe Khoobyar 9766cc0aa5 added unit tests 2018-03-30 22:01:49 -04:00
Joe Khoobyar 481be9da35 code reformatted with gofmt 2018-03-30 21:45:09 -04:00
Joe Khoobyar d7cb9baa43 cleaner initialization of winrmcp 2018-03-30 21:32:46 -04:00
Joe Khoobyar 852a74c49d first attempt at supporting NTLM authentication in Terraform 2018-03-30 21:11:53 -04:00
James Bardin d8b9337c08
Merge pull request #17744 from hashicorp/jbardin/retry-ssh-auth
retry ssh authentication failures
2018-03-30 16:36:07 -04:00
James Bardin 943972cd8f retry ssh authentication failures
Most of the time an ssh authentication failure would be non-recoverable,
but some host images can start the ssh service before it is properly
configured, or before user authentication data is available.

Log ssh authentication errors and allow the provisioner to retry until
the connection timeout.
2018-03-30 15:23:24 -04:00
Martin Atkins 0deb6e8a7f
Update CHANGELOG.md 2018-03-30 09:18:09 -07:00
Paul Tyng 6a4dc38971
Update CHANGELOG.md 2018-03-30 11:16:19 -04:00
Paul Tyng 3837d0792a
Merge pull request #17738 from alewando/conflicts_with_leaking_sensitive_data
Remove attribute value from ConflictsWith validation message (leaks sensitive data)
2018-03-30 11:14:56 -04:00
Adam Lewandowski 56a330c533 Remove attribute values from ConflictsWith validation message 2018-03-30 07:53:59 -04:00
Chris Marchesi fdfe89ed1d
helper/schema: Computed -> NewValueKnown, add comments to GetOkExists
Added some more context to GetOkExists, moved Computed to NewValueKnown
to accommodate some changes that will be coming up in HCL2 that may make
"Computed" less intuitive of a function name, and updated the docs for
NewValueKnown as well.
2018-03-29 15:18:35 -07:00
ScottWinkler 05143987ae
Update package.go 2018-03-29 14:18:09 -07:00
ScottWinkler 38f5c7f434
Keep permissions when copying 2018-03-29 14:05:04 -07:00
Chris Marchesi 274b933077
helper/schema: Add Computed to ResourceDiff, expose GetOkExists
This adds a new method to ResourceDiff: Computed, which exposes the
computed read result field to ResourceDiff. In the context of
customizing the diff, this is important as interpolated and otherwise
computed values will show up in the diff as blank, with no way of
determining if the value is actually blank or if it's a computed value
not available at diff customization time. Currently assumptions need to
be made on this, but this does not help in validation scenarios where
one needs to differentiate between an actual blank value and a value
that will be available later.

This is exposed for the most part via NewComputed in the diff, but the
tests cover both the config reader as well (with no diff, even though
this should not come up in normal operation) and also the newDiff reader
when someone sets a new value using SetNew and SetNewComputed.

This commit also exposes GetOkExists. The tests were mostly pulled from
ResourceData but a few were added to ensure that config was being
properly covered as well, in addition to covering SetNew and
SetNewComputed.
2018-03-29 12:04:36 -07:00
Adit Sarfaty dfa623250a helper/validation: IP address and IP address range validation helpers 2018-03-29 09:41:59 -07:00
Martin Atkins d4eb6049b3
Update CHANGELOG.md 2018-03-28 14:46:07 -07:00
Martin Atkins 5659128126 repl: fix formatting of list and map values
The indent function was stripping out newlines, causing multi-element
lists and maps to be rendered incorrectly.

We were also not quoting strings in these nested structures, leading to
weird behavior if any expression punctuation or newlines were present in
these strings.

This part of Terraform will get a more serious overhaul as part of
switching to the new parser/interpreter implementation but this is a
tactical fix to make the results of this command more usable in the
short term.
2018-03-28 14:43:45 -07:00
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