Commit Graph

789 Commits

Author SHA1 Message Date
James Bardin 48e285d85c
Merge pull request #21674 from hashicorp/jbardin/update-go-plugin
update go-plugin package
2019-06-10 16:24:39 -04:00
James Bardin 0c91d227fa
Merge branch 'master' into master 2019-06-10 15:50:59 -04:00
James Bardin 8039e11e16 update go-plugin package
Fixes a minor issue where the plugin may be closed before the stderr
reader completes, resulting in a warning in the logs.
2019-06-10 15:43:36 -04:00
Martin Atkins 3eb379f4d4 vendor: go get github.com/zclconf/go-cty-yaml@v0.1.0
This module contains a YAML parser and encoder tailored to cty, though we
are mostly interested in it for its YAMLEncode and YAMLDecode cty
functions, which we can make available in Terraform.
2019-06-04 16:24:09 -07:00
Radek Simko 02437f067e
vendor: github.com/google/go-cmp@v0.3.0 2019-05-27 20:35:42 -05:00
Radek Simko 37f19cb9f5
vendor: github.com/golang/mock@v1.3.1 2019-05-27 12:22:03 +01:00
James Bardin 1c77704a3b
Merge pull request #21341 from hashicorp/jbardin/update-go-cty
Fix inconsistent element types with tuple literals
2019-05-16 17:07:16 -04:00
James Bardin 1d134fea69 update go-cty 2019-05-16 16:43:28 -04:00
Martin Atkins 11cf8fd6be vendor: go get github.com/hashicorp/hcl2@master
This fixes a bug where HCL would flag a parse error if a single-line
comment appeared at the end of a file without a terminating newline.
2019-05-16 07:30:50 -07:00
Martin Atkins 63fa1ac418 vendor: go get github.com/hashicorp/hcl2@master
This includes a small fix to ensure the parser doesn't produce an invalid
body for block parsing syntax errors, and instead produces an incomplete
result that calling applications like Terraform can still analyze.

The problem here was affecting our version-constraint-sniffing code, which
intentionally tried to find a core version constraint even if there's a
syntax error so that it can report that a new version of Terraform is a
likely cause of the syntax error. It was working in most cases, unless
it was the "terraform" block itself that contained the error, because then
we'd try to analyze a broken hcl.Block with a nil body.

This includes a new test for "terraform init" that exercises this
recovery codepath.
2019-05-14 15:37:46 -07:00
Martin Atkins 038621a8ed vendor: go get github.com/hashicorp/go-getter@v1.3.0
This includes a fix for the handling of Git-over-SSH URLs with explicit
port numbers.
2019-05-14 07:38:06 -07:00
Martin Atkins d06edb1b62 go get github.com/hashicorp/hcl2@master
This corrects a bug in the HCL 2 scanner where a $ or % symbol would cause
incorrect tokenization if appearing immediately before a " .

This also includes some updates to Go extension libraries that the HCL
update brings in. Some of these changes update to support Unicode 11, but
only when compiling with Go 1.13, so we won't see the effect of these
changes until we start building Terraform with Go 1.13.
2019-05-03 15:29:40 -07:00
Martin Atkins 95826d6fdd vendor: github.com/hashicorp/hcl2@master
This contains an adjustment to how the dynamic blocks extension expands
a dynamic block whose for_each expression is unknown: it now produces an
block whose leaf attributes are all unknown, which is what Terraform had
previously been expecting but it wasn't actually true in practice.
2019-05-02 14:08:40 -07:00
Martin Atkins 6adcc7ab73 vendor: go get github.com/zclconf/go-cty@master
cty now guarantees that sets of primitive values will iterate in a
reasonable order. Previously it was the caller's responsibility to deal
with that, but we invariably neglected to do so, causing inconsistent
ordering. Since cty prioritizes consistent behavior over performance, it
now imposes its own sort on set elements as part of iterating over them so
that calling applications don't have to worry so much about it.

This change also causes cty to consistently push unknown and null values
in sets to the end of iteration, where before that was undefined. This
means that our diff output will now consistently list additions before
removals when showing sets, rather than the ordering being undefined as
before.

The ordering of known, non-null, non-primitive values is still not
contractually fixed but remains consistent for a particular version of
cty.
2019-04-30 15:49:28 -07:00
James Bardin bf0fb89a2a update go-plugin
Includes fix for correct plugin server log levels, preventing everything
from logging to Debug.
2019-04-30 17:20:10 -04:00
Martin Atkins 4e78d97f8f vendor: go get github.com/zclconf/go-cty@master
This fixes a bug in the formatlist function where it would panic if given
an unknown list as an argument.
2019-04-29 09:02:58 -07:00
Paul Thrasher 6183ca44c8
Merge pull request #21102 from hashicorp/pault/remote-backend-go-tfe-update
update to latest go-tfe
2019-04-26 10:05:00 -07:00
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 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
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 aece05320b
update go-tfe to v0.3.16
Signed-off-by: Paul Thrasher <pthrasher@hashicorp.com>
2019-04-24 16:46:16 -07:00
Martin Atkins 6a156f67ce vendor: go get github.com/hashicorp/hcl2@master
This includes a new specialized error message for when a fractional number
is used to index a sequence.
2019-04-16 10:03:37 -07:00
He Guimin 3f44dd9dec Add tablestore config to store state lock 2019-04-11 07:11:10 +08:00
He Guimin b887d44712 Add Alibaba Cloud backend OSS with lock 2019-04-11 07:06:43 +08:00
Sander van Harmelen 8a430113f6 gomod: update `go-tfe` 2019-04-08 11:13:14 +02:00
Kristin Laemmert f8a5e17d3d
command/format: improve "source" of error messages regarding missing arguments (#20907)
* vendor: update hcl2 dependency
* command/format: revert diagnostic format behavior if snippet or highlight range is empty
2019-04-03 14:04:59 -04:00
Martin Atkins b35bc255d2 vendor: go get github.com/hashicorp/hcl2@master
This gives us an extra hook in the dynblock variables analysis that should
allow us to also make it subject also to the lang/blocktoattr fixup, to
ensure we'll find all the references in spite of these various
pre-processing wrappers.
2019-03-28 10:41:01 -07:00
Kristin Laemmert 931851ca82
update terraform-config-inspect (#20852) 2019-03-28 07:54:01 -04:00
James Bardin 11dba9f86a udpate go-plugin 2019-03-22 13:30:14 -04:00
Martin Atkins 373f94fe89 vendor: go get github.com/zclconf/go-cty/cty@master
This includes a fix to prevent unintentional infinite recursion when
trying to unify multiple object types to a single type for conversion to
list(any).

Sadly I wasn't able to reproduce the problem as reported (in #20728), so
therefore I wasn't able to write a Terraform test for it, but I have
confirmed that the cty behavior here was incorrect anyway (recursively
calling the same function we're already in with the same arguments is
clearly not productive) and so this change will allow whatever situation
that was to terminate with a type conversion error, rather than causing a
stack overflow.

It's likely that there is another bug lurking under this, since the
problematic code here was supposed to be unreachable, but avoiding the
crash is the priority for now. If the problem re-surfaces then it should
at least be an error message with some additional context about what the
goal of the caller was.

This also includes an unrelated fix for the gocty package, which doesn't
affect Terraform because it makes very little use of that package.
2019-03-20 16:34:05 -07:00
Martin Atkins 838a42d218 vendor: go get github.com/hashicorp/hcl2@master
This includes improved functionality for HCL's "dynamic block extension",
which will allow us (in a subsequent commit) to properly detect
dependencies inside nested "dynamic" blocks, where currently they get
missed.

For this commit though, we just upgrade HCL to a version that includes it
and make a small change to our "lang" package to align with an upstream
renaming.
2019-03-19 10:04:45 -07:00
Martin Atkins ea1d5f8fcb vendor: go get github.com/hashicorp/hcl2@master
This includes two upstream fixes:

- Handle explicit JSON "null" consistently during decode of JSON syntax.
- Properly detect the end of a "heredoc" when formatting to avoid messing
  up indentation of other lines following the heredoc.
2019-03-15 13:55:30 -07:00
Sander van Harmelen e75e845804
Merge pull request #20588 from hashicorp/svh/f-retry
backend/remote: also retry on server errors
2019-03-08 18:17:29 +01:00
Sander van Harmelen 9517a009bd gomod: update `go-tfe` 2019-03-06 13:34:14 +01:00
Radek Simko bb952cb90a
vendor: github.com/golang/protobuf@v1.3.0 2019-02-27 15:42:18 +00:00
James Bardin eada955721
Merge pull request #19070 from mars/postgres-backend
Postgres backend
2019-02-26 20:20:01 -05:00
Martin Atkins 6fa1ff5de7 vendor: go get github.com/hashicorp/hcl2@master
This includes a fix for the parsing of object for expressions in newline-
sensitive contexts like block bodies.

It also includes a change to the JSON syntax decoder that cause it to
consider an explicit null to be equivalent to a property not being set at
all when interpreting a property value as a nested block. (It was
previously doing tha only when interpreting the property value as an
attribute value.)
2019-02-26 16:08:18 -08:00
Radek Simko fdb126f27e
vendor: github.com/dylanmei/winrmtest@99b7fe2fddf1 2019-02-26 18:22:15 +00:00
Sander van Harmelen 435b82d6d0
Merge pull request #20460 from hashicorp/svh/f-permissions
backend/remote: use the can-queue-apply permission
2019-02-25 19:32:20 +01:00
Sander van Harmelen d5c6ebff3d gomod: update go-tfe 2019-02-25 14:33:31 +01:00
Radek Simko c38f7eed1f
vendor: github.com/masterzen/winrm@5e5c9a7fe54b 2019-02-25 08:45:01 +00:00
Radek Simko 48c5841550
vendor: github.com/kardianos/osext@2bc1f35cddc0 2019-02-22 22:16:33 +00:00
Radek Simko 501d106976
vendor: github.com/agext/levenshtein@v1.2.2 2019-02-22 22:15:02 +00:00
Mars Hall e8e7d3013e Update github.com/lib/pq module 2019-02-22 13:55:17 -08:00
Mars Hall 181e0196d1 Add dependency: Postgres database driver 2019-02-22 13:48:49 -08:00
Radek Simko fce24f5ad3
vendor: github.com/mattn/go-shellwords@v1.0.4 2019-02-22 16:54:29 +00:00
Radek Simko e93f233567
vendor: github.com/mattn/go-colorable@v0.1.1 2019-02-22 16:51:56 +00:00
Radek Simko e94155456f
vendor: github.com/xanzy/ssh-agent@v0.2.1 2019-02-22 14:22:13 +00:00
Radek Simko 3d0b6bff07
vendor: github.com/spf13/afero@v1.2.1
go get github.com/spf13/afero@v1.2.1
go mod tidy
go mod vendor
2019-02-21 09:09:22 +00:00
Radek Simko 52b38a486a
vendor: github.com/posener/complete@v1.2.1
go get github.com/posener/complete@v1.2.1
go mod tidy
go mod vendor
2019-02-21 09:07:42 +00:00
Radek Simko c9e6bc4937
vendor: github.com/mitchellh/prefixedio@5733675afd51
go get github.com/mitchellh/prefixedio@5733675afd51
go mod tidy
go mod vendor
2019-02-21 09:02:56 +00:00
Radek Simko 235947345a
vendor: github.com/mitchellh/panicwrap@17011010aaa4
go get github.com/mitchellh/panicwrap@17011010aaa4
go mod tidy
go mod vendor
2019-02-21 09:01:10 +00:00
Radek Simko 8005e39a0a
vendor: github.com/mitchellh/go-linereader@1b945b3263eb
go get github.com/mitchellh/go-linereader@1b945b3263eb
go mod tidy
go mod vendor
2019-02-21 08:59:37 +00:00
Radek Simko 89ec2edc60
vendor: github.com/mitchellh/colorstring@d06e56a500db
go get github.com/mitchellh/colorstring@d06e56a500db
go mod tidy
go mod vendor
2019-02-21 08:57:51 +00:00
Radek Simko dd252355c5
vendor: github.com/mitchellh/cli@v1.0.0
go get github.com/mitchellh/cli@v1.0.0
go mod tidy
go mod vendor
2019-02-21 08:56:05 +00:00
Radek Simko 1feb7717a8
vendor: github.com/hashicorp/go-rootcerts@v1.0.0
go get github.com/hashicorp/go-rootcerts@v1.0.0
go mod tidy
go mod vendor
2019-02-21 08:54:14 +00:00
Radek Simko b43e5e83f5
vendor: github.com/hashicorp/go-getter@v1.1.0
go get github.com/hashicorp/go-getter@v1.1.0
go mod tidy
go mod vendor
2019-02-21 08:52:47 +00:00
Radek Simko 725dfe8a54
vendor: github.com/hashicorp/go-checkpoint@v0.5.0
go get github.com/hashicorp/go-checkpoint@v0.5.0
go mod tidy
go mod vendor
2019-02-21 08:50:02 +00:00
Radek Simko 03dc37fda2
vendor: github.com/armon/circbuf@5111143e8da2
go get github.com/armon/circbuf@5111143e8da2
go mod tidy
go mod vendor
2019-02-21 08:48:13 +00:00
Radek Simko df089ee2fb
vendor: cloud.google.com/go@v0.36.0
go get cloud.google.com/go@v0.36.0
go mod tidy
go mod vendor
2019-02-20 18:57:56 +00:00
James Bardin 9bd7419fce
Merge pull request #20395 from hashicorp/jbardin/go-plugin
update go-plugin
2019-02-20 11:44:38 -05:00
Brian Flad a41e545198
backend/s3: Reinstate region validation and update copy for skip_requesting_account_id deprecation message 2019-02-20 08:29:09 -08:00
James Bardin 493ee39f23 update go-plugin 2019-02-20 11:24:05 -05:00
Brian Flad 1aaac172b0
backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base
Output from acceptance testing (no new failures):

```
--- PASS: TestBackend_impl (0.00s)
--- PASS: TestBackendConfig (0.37s)
--- PASS: TestBackendConfig_invalidKey (0.00s)
--- PASS: TestBackend (3.26s)
--- PASS: TestBackendLocked (6.80s)
--- FAIL: TestBackendExtraPaths (2.32s)
--- PASS: TestBackendPrefixInWorkspace (2.06s)
--- PASS: TestKeyEnv (8.20s)
--- PASS: TestRemoteClient_impl (0.00s)
--- PASS: TestRemoteClient (2.42s)
--- PASS: TestRemoteClientLocks (6.33s)
--- PASS: TestForceUnlock (13.31s)
--- PASS: TestRemoteClient_clientMD5 (11.75s)
--- PASS: TestRemoteClient_stateChecksum (10.07s)
```
2019-02-18 02:30:30 -05:00
Martin Atkins bfbce53911 vendor: go get github.com/hashicorp/hcl2@master
This includes a fix to properly report the position of an errant block
inside a block processed as JustAttributes, which fixes #20248.
2019-02-14 09:49:37 -08:00
Radek Simko 8f3ee1800d
Merge pull request #20316 from hashicorp/vendor-go-tfe-bump
vendor: github.com/hashicorp/go-tfe@v0.3.8
2019-02-13 09:06:22 +00:00
James Bardin cf7a6b7bb8 update go-plugin
This unfortunately breaks alpha comaptibility at this point, due to
changes in the grpc paths.
2019-02-12 18:28:34 -05:00
Radek Simko 916310e601
vendor: github.com/hashicorp/go-tfe@v0.3.8 2019-02-12 19:54:56 +00:00
Radek Simko a486cd838e
vendor: github.com/terraform-providers/terraform-provider-aws@v1.58.0 2019-02-12 16:32:22 +00:00
Radek Simko f137b32140
vendor: github.com/hashicorp/hil@latest 2019-02-12 15:56:22 +00:00
Radek Simko 14246bdfe9
vendor: go get github.com/mitchellh/copystructure@v1.0.0 2019-02-12 12:06:10 +00:00
Radek Simko 12ac212611
vendor: github.com/mitchellh/hashstructure v1.0.0 2019-02-12 11:44:28 +00:00
Radek Simko e0841f73b3
vendor: github.com/hashicorp/logutils@v1.0.0 2019-02-12 10:25:04 +00:00
Radek Simko d69e96544d
vendor: github.com/blang/semver@v3.5.1 2019-02-12 10:22:28 +00:00
Radek Simko 8e2f2d0b0f
vendor: github.com/apparentlymart/go-cidr@v1.0.0 2019-02-12 09:32:10 +00:00
Kristin Laemmert 5f8916b4fd
configs/configupgrade: do not panic on HEREDOCs. (#20281)
Previously, configupgrade would panic if it encountered a HEREDOC. For
the time being, we will simply print out the HEREDOC as-is.

Unfortunately, we discovered that terraform 0.11's version of HCL
allowed for HEREDOCs with the termination delimiter inline (instead of
on a newline, which is technically correct). Since 0.12configupgrade
needs to be bug-compatible with terraform 0.11, we must roll back to the
same version of HCL used in terraform 0.11.
2019-02-08 15:51:53 -08:00
Radek Simko a67e6e19b1
vendor: github.com/terraform-providers/terraform-provider-openstack@v1.15.0 2019-02-08 10:59:06 +00:00
Martin Atkins d1c660eecf vendor: go get github.com/zclconf/go-cty@master
This fixes a bug in the TestConformance function that was generating false
positives when given two object types with the same number of attributes
but not identical attribute names.
2019-02-01 15:22:54 -08:00
Radek Simko b4de23bb3d
vendor: github.com/hashicorp/go-azure-helpers@0.3.2 2019-02-01 08:40:50 +00:00
Martin Atkins c8d34b55ee vendor: Upgrade both HCL2 and cty
The cty change here fixes a panic situation when cty.Path.Apply is given
a null value, making it now correctly return an error.

However, the HCL2 change includes an alternative to cty.Path.Apply that
uses HCL-level rules rather than cty-level rules, so the result behaves
like an HCL expression would. Most uses of cty.Path.Apply ought to use
hcl.ApplyPath instead, to ensure that the behavior is consistent with what
users expect in the main language.
2019-01-31 11:58:30 -08:00
Radek Simko fbceb1dfb5
vendor: github.com/hashicorp/go-plugin@latest 2019-01-29 18:41:20 +00:00
Martin Atkins fb0c9714c1 vendor: go get github.com/zclconf/go-cty@master
This fixes some consistency problems with how number strings were parsed
in the msgpack decoder vs other situations.

This commit also includes an upgrade of HCL2 to use this new cty function,
though there's no change in behavior here since the new function is
functionally equivalent to what it replaced.
2019-01-24 16:42:21 -08:00
Martin Atkins 787c176063 vendor: go get github.com/hashicorp/hcl2@master
This includes a missing feature for the splat syntax (null.* returns an
empty tuple) and also fixes a bug in the source code formatter where it
was inserting spaces between two consecutive interpolation sequences, like
"${foo}${bar}".
2019-01-17 14:21:18 -08:00
Sander van Harmelen 4d9da13d85 go-mod: update dependencies 2019-01-15 15:52:37 +01:00
Martin Atkins 047239e68c vendor: Add github.com/hashicorp/terraform-config-inspect 2019-01-14 11:33:21 -08:00
Martin Atkins a3f6e67b7d vendor: upgrade github.com/hashicorp/hcl2
This includes a fix to the dynamic block extension so that nested dynamic
blocks can iterate over the temporary variables created by their ancestors.
2018-12-20 14:28:37 -08:00
Martin Atkins d627987e70 vendor: upgrade github.com/hashicorp/hcl2
This includes a change to accept and ignore a UTF-8 BOM at the start of
any given native syntax configuration.

Although a BOM is redundant in UTF-8, we learned in #18618 that several
software products on Windows will produce a BOM whenever they save as
UTF-8, so accepting it avoids friction when using those tools to author
or generate Terraform configuration files.

This fixes #18618.
2018-12-19 16:18:29 -08:00
Martin Atkins 62481963b4 vendor: upgrade github.com/hashicorp/hcl2
This includes a fix to prevent the creation of an invalid block object
when the configuration contains invalid template sequences in block
labels.
2018-12-19 15:54:33 -08:00
Martin Atkins 65c0826293 vendor: upgrade github.com/zclconf/go-cty
This includes:
- An additional check in the format stdlib function to fail if there are
  too many arguments given, rather than silently ignoring.
- Refinements for the type unification behavior to allow unification of
  object/tuple types into weaker map/list types when no other unification
  is possible.
- Improvements to the error messages for failed type conversions on
  collection and structural types to talk about mismatching element types
  where possible, rather than the outer value.
2018-12-18 17:29:09 -08:00
Brian Flad 882b6e1daa
Merge pull request #19651 from hashicorp/d-terraform-provider-aws-v1.52.0
deps: github.com/aws/aws-sdk-go@v1.16.4 and github.com/terraform-providers/terraform-provider-aws@v1.52.0
2018-12-17 15:38:41 -05:00
Martin Atkins 109f9c607d vendor: update github.com/hashicorp/hcl2
This includes a fix to hcl.RelTraversalForExpr where it would
inadvertantly modify the internals of a traversal AST node as part of
relativizing the traversal in order to return it.
2018-12-17 09:02:25 -08:00
Martin Atkins b7452a1bf8 vendor: upgrade github.com/hashicorp/hcl2
This includes a number of upstream bug fixes, which in turn fix a number
of issues here in Terraform:

- New-style "full splat" operator now working correctly (#19181)
- The weird HCL1-ish single-line block syntax is now supported (#19153)
- Formatting of single-line blocks adds spaces around the braces (#19154)

This also includes a number of other upstream fixes that were not tracked
as issues in the Terraform repository. The highlights of those are:

- A for expression with the "for" keyword wrapped onto a newline after its
  opening bracket now parses correctly.
- In JSON syntax, interpolation sequences in properties of objects that
  are representing expressions now have their variables properly detected.
- The "flush" heredoc variant is now functional again after being broken
  in some (much-)earlier rework of the template parser.
2018-12-14 16:07:50 -08:00
Sander van Harmelen da8e02eb2e
Merge pull request #19647 from hashicorp/svh/f-versions
core:  add a method to the disco package retrieve version constraints
2018-12-14 12:38:52 +01:00
Brian Flad 2979c42c68
deps: github.com/aws/aws-sdk-go@v1.16.4 and github.com/terraform-providers/terraform-provider-aws@v1.52.0
Notable changes:

* backend/s3: Automatic validation of `eu-north-1` region
* backend/s3: Support for `credential_process` handling in AWS configuration file

Updated via:

```
go get github.com/aws/aws-sdk-go@v1.16.4
go get github.com/terraform-providers/terraform-provider-aws@v1.52.0
go mod tidy
go mod vendor
```
2018-12-13 20:30:43 -05:00
Sander van Harmelen a4380f7246 go-mod: update go-version 2018-12-13 18:35:23 +01:00
James Bardin 49340386d4
Merge pull request #19629 from hashicorp/jbardin/go-plugin
update go-plugin
2018-12-12 15:00:25 -05:00
James Bardin a5a5e1aed5 update go-plugin
All our changes have been merged, so this moved the dependency back to
master
2018-12-12 11:34:19 -05:00
James Bardin 4ce7516be5
Merge pull request #19597 from hashicorp/jbardin/ci
Update go mock version, Makefile, etc. for tests
2018-12-11 12:25:53 -05:00
James Bardin f5a2d49eef update go mock 2018-12-10 17:15:53 -05:00
Tom Harvey 383bc98f5c
backend/azurerm: Support for authenticating using the Azure CLI (#19465)
* Upgrading to 2.0.0 of github.com/hashicorp/go-azure-helpers

* Support for authenticating using Azure CLI

* backend/azurerm: support for authenticating using the Azure CLI
2018-12-10 21:23:30 +00:00