Commit Graph

24115 Commits

Author SHA1 Message Date
Brian Flad
f1d7196d10
deps: github.com/aws/aws-sdk-go@v1.19.18
Enables automatic validation for the new `ap-east-1` region. See also: https://github.com/terraform-providers/terraform-provider-aws/pull/8440#pullrequestreview-230896877

Updated via:

```console
$ go get github.com/aws/aws-sdk-go@v1.19.18
$ go mod tidy
$ go mod vendor
```
2019-04-25 18:01:11 -04:00
Martin Atkins
3309be9721 core: Allow data resource count to be unknown during refresh
The count for a data resource can potentially depend on a managed resource
that isn't recorded in the state yet, in which case references to it will
always return unknown.

Ideally we'd do the data refreshes during the plan phase as discussed in
#17034, which would avoid this problem by planning the managed resources
in the same walk, but for now we'll just skip refreshing any data
resources with an unknown count during refresh and defer that work to the
apply phase, just as we'd do if there were unknown values in the main
configuration for the data resource.
2019-04-25 14:22:57 -07:00
Martin Atkins
95e5ef13a7 vendor: go get github.com/zclconf/go-cty@master
This includes a more comprehensive implementation of Value.GoString, along
with various other changes that don't affect Terraform.
2019-04-25 14:22:57 -07:00
Paul Thrasher
151c91ffda
use scanner for reading logs
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-25 11:17:08 -07:00
Paul Thrasher
0e27a8862f
remove duplicate remote output line
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-25 10:52:19 -07:00
Sander van Harmelen
bb12206bca Fixup the tests 2019-04-25 10:32:00 +02:00
Sander van Harmelen
7cf744241a Do not use a scanner to read the logs
Using a scanner can cause issues when reading long lines. Also make sure we return the error correctly while planning.
2019-04-25 09:51:52 +02:00
Sander van Harmelen
cc38debace Fixup the go-tfe update
```
go get github.com/hashicorp/go-tfe
go mod tidy
go mod vendor
```
2019-04-25 09:29:52 +02:00
Paul Thrasher
c7a023a95c
update test for new go-tfe version
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-24 16:46:17 -07:00
Paul Thrasher
aece05320b
update go-tfe to v0.3.16
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-24 16:46:16 -07:00
Paul Thrasher
53f977bee2
TFCE api correct pluralization
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-24 16:44:00 -07:00
Paul Thrasher
e479bd5dc3
update to latest go-tfe
same version number but pointing to a new sha

Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-24 16:44:00 -07:00
Chris Griggs
b7705d20a0
Merge pull request #21098 from hashicorp/cgriggs01-add-gridscale
[Website] Add Gridscale provider
2019-04-24 15:02:12 -07:00
Chris Griggs
103f56e0a3
Merge pull request #21090 from hashicorp/cgriggs01-name-update
[Website] Fix FortiOS typo
2019-04-24 14:54:05 -07:00
cgriggs01
bad3c57f00 [Website] Add Gridscale provider 2019-04-24 14:46:22 -07:00
Martin Atkins
4897c0554d vendor: go get github.com/hashicorp/go-msgpack@v0.5.4
By upgrading this to a version that supports Go Modules, we can avoid
the redundant dependencies labix.org/v2/mgo and launchpad.net/gocheck.

These dependencies come via hashicorp/consul, which we have vendored for
the Consul backend.

There are no changes to the go-msgpack code here; we're just adopting a
newer version that has a go.mod present so that its dependencies can be
determined more accurately.
2019-04-24 13:41:33 -07:00
Radek Simko
e8ee3f14a4
Merge pull request #21094 from hashicorp/fix-plugin-discovery-quoting
plugin/discovery: Fix quoting of provider name
2019-04-24 21:03:26 +01:00
Radek Simko
b171997b39
plugin/discovery: Fix quoting of provider name 2019-04-24 20:47:32 +01:00
Kristin Laemmert
2573d549c2
Update CHANGELOG.md 2019-04-24 14:53:54 -04:00
Kit Ewbank
efc08de5d6 lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
cgriggs01
bd1b2c8641 fix FortiOS caps 2019-04-24 10:21:16 -07:00
Kristin Laemmert
9327eedb04
internal/initwd: follow local module path symlink (#21063)
* internal/initwd: follow local module path symlink

Fixes #21060

While a previous commit fixed a problem when the local module directory
contained a symlink, it did not account for the possibility that the
entire directory was a symlink.
2019-04-24 08:19:27 -04:00
James Bardin
64f419ac76
Merge pull request #21077 from hashicorp/jbardin/map-shims
Fixes for maps in shims
2019-04-23 14:41:26 -04:00
James Bardin
2fe0f9376a change "preferDst" to "apply" in normalizeNullVals
Inverting this and renaming it makes it align with the current use of
that boolean argument.
2019-04-23 12:59:30 -04:00
James Bardin
0696cf7245 don't retain removed map values
Make sure values removed from a map during apply are not copied into the
new map. The broken test is no longer valid in this case, and the
updated diff.Apply should prevent the case it used to cover.
2019-04-23 12:49:58 -04:00
James Bardin
0f883b118a test that computed maps are applied correctly
Verify that a computed map which is not correctly marked as unknown in
the plan is still applied correctly.
2019-04-23 12:31:19 -04:00
James Bardin
3d46c04e28
Merge pull request #21068 from hashicorp/jbardin/get-ok-exists
delete unknown values from apply config altogether
2019-04-23 08:58:38 -04:00
James Bardin
67395306e1 delete unknown values from apply config altogether
removeConfigUnknowns need to remove the value completely from the config
map. Removing this value allows GetOk and GetOkExists to indicate if the
value was set in the config in the case of an Optional+Computed
attribute.
2019-04-22 18:06:26 -04:00
Ross McKelvie
ce1fba5817 website: update required_providers block for terraform 0.12 compatibility 2019-04-19 11:54:19 -07:00
Ryan
1a53575b15 build: use correct link for GCP provider in GitHub issue template 2019-04-18 14:06:24 -07:00
Martin Atkins
168592825e release: clean up after v0.12.0-beta2 2019-04-18 17:30:16 +00:00
Chris Griggs
aeabdf1a0d
Merge pull request #21054 from cgriggs01/cgriggs01-community-patch
[Website] Adding community provider
2019-04-18 09:19:39 -07:00
Pam Selle
3f68b12e3a
Merge pull request #20959 from mars/patch-1
Update CHANGELOG for #20561
2019-04-18 09:18:36 -07:00
Mars Hall
67b9a11fad Update CHANGELOG for #20561 2019-04-18 11:05:59 -05:00
Martin Atkins
533cbf4c3f
website: Update "Local Values" docs to use v0.12 syntax in example
There was some leftover v0.11-style interpolation syntax here.

We prefer to use a "naked" expression in situations like this where the result
isn't a string, because interpolations returning non-strings is a common source
of confusion for new users.
2019-04-18 09:03:34 -07:00
Chris Griggs
f66b563ccd
Merge pull request #21051 from cgriggs01/cgriggs01-fortios-links
[Website] Adding Fortios provider links
2019-04-18 08:37:21 -07:00
cgriggs01
55b816853a [Website] Adding Fortios provider links 2019-04-18 07:46:30 -07:00
Martin Atkins
62d32e9bb3 website: Fix incorrect example in Module Composition page
The example above treats recordsets as a list, but the declaration was for a single object.
2019-04-18 07:13:16 -07:00
cgriggs01
26d515e40a Adding community provider 2019-04-17 15:57:24 -07:00
Alex Somesan
275e0a53f2
Merge pull request #20851 from hashicorp/doc-validatefunc-maps
Document that ValidateFunc works on maps.
2019-04-17 20:45:15 +02:00
Paul Tyng
6bd7fdbb6b
Merge pull request #21043 from hashicorp/paultyng-patch-1
godoc typo
2019-04-17 14:37:01 -04:00
Martin Atkins
2238fbda1b website: v0.12 upgrade guide about list variables and brackets 2019-04-17 11:16:16 -07:00
Alex Somesan
01a169c66f make fmt 2019-04-17 19:58:06 +02:00
Kristin Laemmert
83dea200c0
Update CHANGELOG.md 2019-04-17 13:50:02 -04:00
Przemysław Dąbek
9605b093d9 command/graph: use user-supplied plugin path when running graph command (#18083) 2019-04-17 13:48:11 -04:00
Paul Tyng
ab2d09b0cb
godoc typo 2019-04-17 13:45:58 -04:00
Martin Atkins
cbc8d1eba2 core: Input variables are always unknown during validate
Earlier on in the v0.12 development cycle we made the decision that the
validation walk should consider input values to always be unknown so that
validation is checking validity for all possible inputs rather than for
a specific set of inputs; checking for a specific set of inputs is the
responsibility of the plan walk.

However, we didn't implement that in the best way: we made the
"terraform validate" command force all of the input variables to unknown
but that was insufficient because it didn't also affect the implicit
validation walk we do as part of "terraform plan" and "terraform apply",
causing those to produce confusingly-different results.

Instead, we'll address the problem directly in the reference resolver code,
ensuring that all variable values will always be treated as an unknown
(of the declared type, so type checking is still possible) during any
validate walk, regardless of which command is running it.
2019-04-17 10:09:46 -07:00
Martin Atkins
d7f23f0beb configs/configupgrade: Don't panic if analyzer fails
Previously we were trying to access a field of the analysis object before
checking if analysis produced errors. The analysis function usually
returns a nil analysis on error, so this would result in a panic whenever
that happened.

Now we'll dereference the analysis object pointer only after checking for
errors, so we'll get a chance to report the analysis error to the user.
2019-04-17 10:08:54 -07:00
Alex Somesan
0395c3ac58
Re-phrase docs to enumerate types which support ValidateFunc 2019-04-17 18:58:58 +02:00
Martin Atkins
1bb47ab9a5 configs/configupgrade: Preserve comments on items in object exprs
The expression upgrade functionality mostly ignores comments because in
the old language the syntax prevented comments from appearing in the
middle of expressions, but there was one exception: object expressions.

Because HCL 1 used ObjectType both for blocks and for object expressions,
that is the one situation where something we consider to be an expression
could have inline attached comments in the old language.

We migrate these here so we don't lose these comments that don't appear
anywhere else. Other comments get gathered up into a general comments
set maintained inside the analysis object and so will be printed out as
required _between_ expressions, just as they did before.
2019-04-17 07:48:57 -07:00