Commit Graph

20209 Commits

Author SHA1 Message Date
Martin Atkins 5e6b518744 Update CHANGELOG.md 2017-08-22 10:57:01 -07:00
Gorka Lerchundi Osa a303817e03 config: base64gzip interpolation function
Since Terraform's internals are not 8-bit clean (it assumes UTF-8
strings), we can't implement raw gzip directly. We're going to add
support where it makes sense for passing data to attributes as
base64 so that the result of this function can be used.
2017-08-22 10:44:55 -07:00
Martin Atkins de561261ab Update CHANGELOG.md 2017-08-22 10:18:30 -07:00
Stephen Weatherford 5d5f8224d2 provisioner/local-exec: allow user to specify interpreter 2017-08-22 10:16:36 -07:00
Martin Atkins 1dc3611fbd Update CHANGELOG.md 2017-08-22 09:45:49 -07:00
Martin Atkins 2e0c1d07ae Merge #15793: Locking support in HTTP remote backend 2017-08-22 09:43:38 -07:00
Radek Simko 4e8ccb3127 Merge pull request #15828 from hashicorp/e2e-decoupling
tools/terraform-bundle: Add e2e tests
2017-08-22 18:33:59 +02:00
Lars Lehtonen 47484e23fe provisioner/local-exec: Drop untestable error
TestResourceProvider_stop uses a goroutine, which means that any function with *testing.T as its receiver within that goroutine will silently fail.

Now the test to accepts that an error that occurs within the goroutine is lost. It also adds some more verbose logs to explain what is happening.
2017-08-21 19:05:49 -07:00
Martin Atkins 6562e97799 Update CHANGELOG.md 2017-08-21 15:18:08 -07:00
Martin Atkins fd88c98c20 website: documentation for local values 2017-08-21 15:15:25 -07:00
Martin Atkins 3a30bfe845 core: evaluate locals and return them for interpolation
We stash the locals in the module state in a map that is ignored for JSON
serialization. We don't include locals in the persisted state because they
can be trivially recomputed and this allows us to assume that they will
pass through verbatim, without any normalization or other transforms
caused by the JSON serialization.

From a user standpoint a local is just a named alias for an expression,
so it's desirable that the result passes through here in as raw a form
as possible, so it behaves as closely as possible to simply using the
given expression directly.
2017-08-21 15:15:25 -07:00
Martin Atkins 5b66953d1d core: graph nodes and edges for local values
A local value is similar to an output in that it exists only within state
and just always evaluates its value as best it can with the current state.
Therefore it has a single graph node type for all walks, which will
deal with that evaluation operation.
2017-08-21 15:15:25 -07:00
Martin Atkins d41d58967f config: parsing of local.foo variables for interpolation 2017-08-21 15:15:25 -07:00
Martin Atkins f6797d6cb0 config: parsing of "locals" blocks in configuration 2017-08-21 15:15:25 -07:00
Clint e2272f71a0 Update our documentation to push "Getting Started" better (#15866)
* update plugin/provider to make clear this section isn't needed for regular use

* add some links and notes about getting started

* remove the mention of binaries... I 'm not sure it's needed yet

* 'Installing Terraform Providers' section

* sometimes I can't words good

* move the 'installing providers' block

* cleanup of terms

* copy that update to plugins/provider too
2017-08-21 15:44:27 -05:00
Clint e42130bf14 Update README with link to "Getting started" guide (#15865)
* Update README with link to "Getting started" guide

* spellin

spell "infrastructure" correctly
2017-08-21 10:55:32 -05:00
Jake Champlin 647c91aec9 Update CHANGELOG.md 2017-08-20 14:32:54 -04:00
Jake Champlin 2cbc74705e Merge pull request #15862 from hashicorp/f-remove-lgpl-deps
Remove LGPL dependencies
2017-08-20 14:31:01 -04:00
Jake Champlin 313086a12b
add missing dependency: azure/go-ntlmssp 2017-08-20 14:12:48 -04:00
Jake Champlin 6e599672e1
Remove LGPL dependencies
This changeset performs the following:

- Updates `masterzen/winrm` vendor to include change from (https://github.com/masterzen/winrm/pull/73)
- Updates `dylanmei/winrmtest` vendor to include change from (https://github.com/dylanmei/winrmtest/pull/4)
- Updates `packer-community/winrmcp` vendor to include the removal of the `masterzen/winrm/winrm` sub-class as a result of the `winrm` CLI tool being removed from the `masterzen/winrm` repository.
- Changes `communicator/winrm/communicator.go` to conform to the new ABI in the `masterzen/winrm` library.

This should completely remove any LGPL licensed dependencies inside of the Terraform project.

```
$ make test
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/08/20 13:40:16 Generated command/internal_plugin_list.go
go test -i $(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/') || exit 1
echo $(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/') | \
        xargs -t -n4 go test  -timeout=60s -parallel=4
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform github.com/hashicorp/terraform/backend github.com/hashicorp/terraform/backend/atlas github.com/hashicorp/terraform/backend/init
ok      github.com/hashicorp/terraform  0.011s
ok      github.com/hashicorp/terraform/backend  0.020s
ok      github.com/hashicorp/terraform/backend/atlas    0.634s
ok      github.com/hashicorp/terraform/backend/init     0.007s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/backend/legacy github.com/hashicorp/terraform/backend/local github.com/hashicorp/terraform/backend/remote-state github.com/hashicorp/terraf
orm/backend/remote-state/azure
ok      github.com/hashicorp/terraform/backend/legacy   0.009s
ok      github.com/hashicorp/terraform/backend/local    0.211s
ok      github.com/hashicorp/terraform/backend/remote-state     0.006s
ok      github.com/hashicorp/terraform/backend/remote-state/azure       0.010s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/backend/remote-state/consul github.com/hashicorp/terraform/backend/remote-state/inmem github.com/hashicorp/terraform/backend/remote-state/s
3 github.com/hashicorp/terraform/backend/remote-state/swift
ok      github.com/hashicorp/terraform/backend/remote-state/consul      0.007s
ok      github.com/hashicorp/terraform/backend/remote-state/inmem       0.013s
ok      github.com/hashicorp/terraform/backend/remote-state/s3  0.007s
ok      github.com/hashicorp/terraform/backend/remote-state/swift       0.013s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/builtin/providers/test github.com/hashicorp/terraform/builtin/provisioners/chef github.com/hashicorp/terraform/builtin/provisioners/file gi
thub.com/hashicorp/terraform/builtin/provisioners/local-exec
ok      github.com/hashicorp/terraform/builtin/providers/test   1.544s
ok      github.com/hashicorp/terraform/builtin/provisioners/chef        0.017s
ok      github.com/hashicorp/terraform/builtin/provisioners/file        0.006s
ok      github.com/hashicorp/terraform/builtin/provisioners/local-exec  0.078s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/builtin/provisioners/remote-exec github.com/hashicorp/terraform/builtin/provisioners/salt-masterless github.com/hashicorp/terraform/command
 github.com/hashicorp/terraform/command/clistate
ok      github.com/hashicorp/terraform/builtin/provisioners/remote-exec 1.037s
ok      github.com/hashicorp/terraform/builtin/provisioners/salt-masterless     0.008s
ok      github.com/hashicorp/terraform/command  14.589s
?       github.com/hashicorp/terraform/command/clistate [no test files]
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/command/e2etest github.com/hashicorp/terraform/command/format github.com/hashicorp/terraform/communicator github.com/hashicorp/terraform/co
mmunicator/remote
ok      github.com/hashicorp/terraform/command/e2etest  3.729s
ok      github.com/hashicorp/terraform/command/format   0.004s
ok      github.com/hashicorp/terraform/communicator     0.005s
ok      github.com/hashicorp/terraform/communicator/remote      0.003s [no tests to run]
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/communicator/shared github.com/hashicorp/terraform/communicator/ssh github.com/hashicorp/terraform/communicator/winrm github.com/hashicorp/
terraform/config
ok      github.com/hashicorp/terraform/communicator/shared      0.007s
ok      github.com/hashicorp/terraform/communicator/ssh 0.016s
ok      github.com/hashicorp/terraform/communicator/winrm       0.018s
ok      github.com/hashicorp/terraform/config   0.213s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/config/module github.com/hashicorp/terraform/dag github.com/hashicorp/terraform/digraph github.com/hashicorp/terraform/flatmap
ok      github.com/hashicorp/terraform/config/module    0.044s
ok      github.com/hashicorp/terraform/dag      0.010s
ok      github.com/hashicorp/terraform/digraph  0.002s
ok      github.com/hashicorp/terraform/flatmap  0.002s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/acctest github.com/hashicorp/terraform/helper/config github.com/hashicorp/terraform/helper/copy github.com/hashicorp/terraform/helpe
r/diff
?       github.com/hashicorp/terraform/helper/acctest   [no test files]
ok      github.com/hashicorp/terraform/helper/config    0.005s
?       github.com/hashicorp/terraform/helper/copy      [no test files]
ok      github.com/hashicorp/terraform/helper/diff      0.005s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/encryption github.com/hashicorp/terraform/helper/experiment github.com/hashicorp/terraform/helper/hashcode github.com/hashicorp/terr
aform/helper/hilmapstructure
?       github.com/hashicorp/terraform/helper/encryption        [no test files]
ok      github.com/hashicorp/terraform/helper/experiment        0.001s
ok      github.com/hashicorp/terraform/helper/hashcode  0.001s
?       github.com/hashicorp/terraform/helper/hilmapstructure   [no test files]
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/logging github.com/hashicorp/terraform/helper/mutexkv github.com/hashicorp/terraform/helper/pathorcontents github.com/hashicorp/terr
aform/helper/resource
?       github.com/hashicorp/terraform/helper/logging   [no test files]
ok      github.com/hashicorp/terraform/helper/mutexkv   0.055s
ok      github.com/hashicorp/terraform/helper/pathorcontents    0.002s
ok      github.com/hashicorp/terraform/helper/resource  2.659s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/schema github.com/hashicorp/terraform/helper/shadow github.com/hashicorp/terraform/helper/signalwrapper github.com/hashicorp/terrafo
rm/helper/slowmessage
ok      github.com/hashicorp/terraform/helper/schema    0.063s
ok      github.com/hashicorp/terraform/helper/shadow    0.156s
ok      github.com/hashicorp/terraform/helper/signalwrapper     0.022s
ok      github.com/hashicorp/terraform/helper/slowmessage       0.102s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/structure github.com/hashicorp/terraform/helper/validation github.com/hashicorp/terraform/helper/variables github.com/hashicorp/terr
aform/helper/wrappedreadline
ok      github.com/hashicorp/terraform/helper/structure 0.004s
ok      github.com/hashicorp/terraform/helper/validation        0.004s
ok      github.com/hashicorp/terraform/helper/variables 0.006s
?       github.com/hashicorp/terraform/helper/wrappedreadline   [no test files]
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/helper/wrappedstreams github.com/hashicorp/terraform/moduledeps github.com/hashicorp/terraform/plugin github.com/hashicorp/terraform/plugin
/discovery
?       github.com/hashicorp/terraform/helper/wrappedstreams    [no test files]
ok      github.com/hashicorp/terraform/moduledeps       0.004s
ok      github.com/hashicorp/terraform/plugin   0.046s
ok      github.com/hashicorp/terraform/plugin/discovery 0.029s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/repl github.com/hashicorp/terraform/scripts github.com/hashicorp/terraform/state github.com/hashicorp/terraform/state/remote
ok      github.com/hashicorp/terraform/repl     0.006s
ok      github.com/hashicorp/terraform/scripts  0.008s
ok      github.com/hashicorp/terraform/state    2.617s
ok      github.com/hashicorp/terraform/state/remote     0.025s
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/terraform github.com/hashicorp/terraform/tools/terraform-bundle
go test -timeout=60s -parallel=4 github.com/hashicorp/terraform/terraform github.com/hashicorp/terraform/tools/terraform-bundle
ok      github.com/hashicorp/terraform/terraform        4.222s
?       github.com/hashicorp/terraform/tools/terraform-bundle   [no test files]
```
2017-08-20 13:53:51 -04:00
Martin Atkins 2be4154027 Update CHANGELOG.md 2017-08-20 10:23:03 -07:00
Ross McFarland e5029de439 Update remote/http doc to match locking changes 2017-08-20 05:59:34 -07:00
Ross McFarland d889ac38b0 Change remote/http store to update, more consistent with doc 2017-08-20 05:59:04 -07:00
Ross McFarland 510563b67f Fully test conf handling in httpFactory 2017-08-19 11:17:25 -07:00
Ross McFarland 69546c4b33 Pass at much more flexible remote/http backend
- Configurable Put (store) method, default POST to preserve behavior
- Configurable Lock method & address
- Configurable Unlock method & address

More thorough testing still needed, but this if functional
2017-08-19 10:31:47 -07:00
Martin Atkins e359930530 Update CHANGELOG.md 2017-08-18 10:00:39 -07:00
Sebastian Maj 28b5708fef config: jsonencode function to support nested lists and maps 2017-08-18 09:57:57 -07:00
James Bardin 0da6b95ef8 Merge pull request #15841 from hashicorp/jbardin/azurerm-backend
Rename the azure backend to azurerm
2017-08-17 16:59:47 -04:00
James Bardin 68da0390b7 remove legacy azure remote state code
The implementation has been moved to a backend.
2017-08-17 12:57:53 -04:00
James Bardin 216a68a41b update backend docs to reflect new azurerm name
The backend has been renamed. Using the old name in the config will
trigger a deprecation warning, but the implementation and the
documentation is the same.
2017-08-17 12:55:48 -04:00
James Bardin 5d50e764ea deprecate the "azure" backend name
Alert users to use the current "azurerm" naming.
2017-08-17 12:49:23 -04:00
James Bardin 0e873d70ed Merge pull request #15840 from hashicorp/jbardin/deprecate-backend
add the ability to mark a backend as deprecated
2017-08-17 12:39:05 -04:00
James Bardin cc454fcc56 add the ability to mark a backend as deprecated
This is a simple wrapper to allow a backend to be marked as deprecated
during initialization.
2017-08-17 12:29:19 -04:00
James Bardin 23b783616e Merge pull request #13036 from pmcatominey/azure-backend
backend: convert Azure remote state to a backend
2017-08-17 12:02:52 -04:00
Peter McAtominey b74b26bcfa backend: alias azurerm to azure 2017-08-17 16:37:51 +01:00
Peter McAtominey 6b9b5ec297 backend/azure: update to latest SDK 2017-08-17 16:32:18 +01:00
Peter McAtominey 4a767987ed vendor github.com/Azure/azure-sdk-for-go/arm/resources/resources 2017-08-17 16:32:17 +01:00
Peter McAtominey f9e8e54835 backend: convert Azure remote state to a backend
Added locking support via blob leasing (requires that an empty state is
created before any lock can be acquired.

Added support for "environments" in much the same way as the S3 backend.
2017-08-17 16:32:17 +01:00
Radek Simko 746881065a Merge pull request #15836 from hashicorp/cmd-init-remove-whitespace
command/init: Remove extra whitespace
2017-08-17 17:22:58 +02:00
Radek Simko aabab16069
command/init: Remove extra whitespace 2017-08-17 09:43:09 +02:00
Martin Atkins a4d182f4e5 Update CHANGELOG.md 2017-08-16 14:45:34 -07:00
Michael Handler 817d1c4869 Output duration in UiHook after successful operation completion. 2017-08-16 14:41:41 -07:00
Martin Atkins fa154bbb48 Update CHANGELOG.md 2017-08-16 13:54:04 -07:00
James Bardin 18af7750d4 Merge pull request #14720 from sevagh/master
Add salt-masterless provisioner
2017-08-16 16:47:46 -04:00
JWal31 117f44bcda config: Add "flatten" interpolation function
This function turns a list of lists or any arbitrary number of nested
lists into a flat list of primitive values.
2017-08-16 13:46:19 -07:00
James Bardin f1042a1338 Merge pull request #15835 from hashicorp/jbardin/mock-provider-race
fix race in MockResourceProvider
2017-08-16 16:33:58 -04:00
Martin Atkins bf97909b8a core: document all of the fields on the Plan struct 2017-08-16 13:30:02 -07:00
James Bardin db6ef69e5b fix race in MockResourceProvider
Input can be called concurrently from multiple nodes in the graph.
2017-08-16 15:19:17 -04:00
James Bardin 08339b004b release: clean up after v0.10.2 2017-08-16 17:38:16 +00:00
James Bardin a1d06eb973
v0.10.2 2017-08-16 17:25:37 +00:00