Commit Graph

26399 Commits

Author SHA1 Message Date
Alisdair McDiarmid 163c943e9b command: Fix bug with -v/-version/--version flags
We globally support a -v/-version/--version flag, which triggers the
version subcommand. The recent introduction of JSON output support meant
we started parsing the flags for the first time, but we didn't add flags
for these global version arguments.

This commit adds those flags (but doesn't check them, since they have no
effect on the version command itself). Also adds usage information for
terraform version.
2020-06-17 15:24:15 -04:00
hashicorp-ci d144c391fa Cleanup after v0.13.0-beta2 release 2020-06-17 18:36:14 +00:00
hashicorp-ci 3e164035b6
Release v0.13.0-beta2 2020-06-17 18:10:32 +00:00
Alvin Huang 92868d7d8f
Merge pull request #25274 from hashicorp/ci/arg-in-light-dockerfile
Pass ARG to second stage in light Dockerfile
2020-06-17 14:07:46 -04:00
Alisdair McDiarmid 4c36e7dc20
Merge pull request #25273 from hashicorp/alisdair/update-go-cty-yaml
vendor: update go-cty-yaml
2020-06-17 13:57:22 -04:00
Kristin Laemmert 1b8f4566fa
internal/initwd: fix panics with relative submodules in DirFromModule (#25250)
* internal/initwd: fix panics with relative submodules in DirFromModule

There were two related issues here:

1. panic with any local module with submodules
1. panic with a relative directory that was above the workdir ("../")

The first panic was caused by the local installer looking up the root
module with the (nonexistant) key "root.", instead of "".

The second panic was caused by the installer trying to determine the
relative path from ".". This was fixed by detecting "." as the source
path and using the absolute path for the call to filepath.Rel.

Added test cases for both panics and updated the existing e2e tests with
the correct install paths.
2020-06-17 13:24:56 -04:00
Alvin Huang 9364cf5964 bump base image of light docker image to alpine:3.12 2020-06-17 13:08:28 -04:00
Alvin Huang 2de5556491 pass ARG to second stage docker light image build 2020-06-17 13:07:30 -04:00
Alisdair McDiarmid 80ca4db54d lang: Add regression test for yamldecode bug 2020-06-17 13:05:14 -04:00
Alisdair McDiarmid cd2ba6ca46 vendor: go get github.com/zclconf/go-cty-yaml@v1.0.2 2020-06-17 13:05:08 -04:00
Alvin Huang 1a43187e49
Merge pull request #25272 from hashicorp/ci/add-gox-tools
Add `gox` to tools package
2020-06-17 11:26:43 -04:00
Alvin Huang 1c3805efae fix make fmtcheck hint output 2020-06-17 11:06:19 -04:00
Alvin Huang 54fb4b63bf gofmt tools/tools.go 2020-06-17 11:04:43 -04:00
Alvin Huang 7a471c0da7 adding gox to tools package 2020-06-17 10:59:28 -04:00
Alvin Huang 9b41578d83 add test for 'full' docker image build 2020-06-17 10:48:10 -04:00
James Bardin 3e39d4762a update CHANGELOG.md 2020-06-17 10:42:08 -04:00
James Bardin 27012f7ee1
Merge pull request #25258 from hashicorp/jbardin/module-refs
Whole module references
2020-06-17 10:39:18 -04:00
James Bardin 4add3a063f update CHANGELOG.md 2020-06-16 16:34:51 -04:00
James Bardin c31b08999c update CHANGELOG.md 2020-06-16 16:33:37 -04:00
James Bardin fd1904983b
Merge pull request #24080 from fabiomatavelli/b-fix-remote-exec
ssh: return error if host is empty
2020-06-16 16:31:50 -04:00
Petros Kolyvas 4a3d0118c6
Merge pull request #25139 from xiaozhu36/master
backend/oss: supports setting HTTPS_PROXY
2020-06-16 14:49:34 -04:00
Kristin Laemmert c2e041a646
Update CHANGELOG.md 2020-06-16 14:48:51 -04:00
Katy Moe 6b3d0ee64b add test for terraform version 2020-06-16 14:47:57 -04:00
Katy Moe dbe139e616 add test for terraform version -json 2020-06-16 14:47:57 -04:00
Katy Moe d8e22f1804 add terraform version -json 2020-06-16 14:47:57 -04:00
Alisdair McDiarmid a3231814c2
Merge pull request #25263 from hashicorp/alisdair/fix-test-cleanup
command: Fix test cleanup
2020-06-16 14:24:13 -04:00
Alisdair McDiarmid d2b215f4d5 command: Fix test cleanup
This test runs `init`, which causes some dangling `.terraform` state
after running tests.
2020-06-16 14:11:08 -04:00
James Bardin 435529a20f
Merge pull request #25261 from hashicorp/jbardin/validate-depends-on
Validate depends_on in modules and outputs
2020-06-16 13:56:50 -04:00
Pam Selle 199157a51a
Validation for provider blocks in expanding modules (nested) (#25248)
* Refactor provider validation into separate func & recurse

Refactors the validate provider functions into a separate function
that can recursively search above a module to check and see if
any parents of the module contain count/for_each configs to be
considered
2020-06-16 13:52:41 -04:00
James Bardin 534c82f36a module and output depends_on validation tests 2020-06-16 13:17:21 -04:00
James Bardin a26446931b validate depends_on for outputs
If depends_on is allowed for outputs, we should validate that the
expressions are valid. Since outputs are always evaluated, and
validation is just done by this evaluation, we can check the
depends_on validation during evaluation too.
2020-06-16 12:40:48 -04:00
James Bardin bdf5acd627 validate depends_on in module calls
Add depends_on validation to module calls, and accumulate diagnostics
for all calls rather than returning early.
2020-06-16 12:39:50 -04:00
James Bardin a8884b18e3 split depends_on validation into its own function
Only resources were validating depends_on. We can use this same block to
ensure all depends_on validation has the same output.
2020-06-16 12:38:05 -04:00
unki 214009e0f3
fix yamldecode()-example, missing a file() call 2020-06-16 09:56:03 +02:00
James Bardin 7154c61f0b reduce module instances refs to the module call
There aren't going to be any nodes specifically for module call
instances during plan, so we have to switch the reference subject to the
general module call.
2020-06-15 20:46:53 -04:00
James Bardin d6ca469124 module variables can't be referenced as a module 2020-06-15 20:46:03 -04:00
James Bardin 02167dcfe4 test whole module reference from module var
this reference isn't being connected properly
2020-06-15 20:45:23 -04:00
James Bardin 3506f159aa
Merge pull request #25251 from hashicorp/jbardin/dot
quote dot node names
2020-06-15 14:46:34 -04:00
James Bardin b35a56cf6e command tests looked for providers in the graphs
The quotes in provider names needs to be escaped, so these tests were
looking for the wrong output to begin with.
2020-06-15 14:40:59 -04:00
James Bardin e36d300efd quote dot node names
providers can contain quotes, so we need to ensure proper quoting in the
dot format.
2020-06-15 13:28:53 -04:00
Chris Griggs 9dc9ae7f74
Merge pull request #25158 from hashicorp/cgrigs01-wbsite-links
[Website] provider links
2020-06-15 09:23:58 -07:00
Hadrien Patte 4dea1bb5a0
Fix JSON output format documentation 2020-06-13 02:04:50 -04:00
Alisdair McDiarmid bc386234d5
Update CHANGELOG.md 2020-06-12 15:53:34 -04:00
Alisdair McDiarmid 5bc721bf03
Merge pull request #25234 from hashicorp/alisdair/remove-building-md
Remove BUILDING.md docs
2020-06-12 15:52:15 -04:00
Alisdair McDiarmid 7d4cab126f
Merge pull request #25233 from hashicorp/alisdair/remove-implicit-init-then-apply
command/apply: Remove implicit init call
2020-06-12 15:52:06 -04:00
Kristin Laemmert b611bd7209 reproduction test 2020-06-12 15:39:55 -04:00
Alisdair McDiarmid 30380bde61 Remove BUILDING.md docs
This document on building release-style binaries is out of date (`make
bin` no longer works) and does not fully reflect how releases of
Terraform are built. Since release builds are not reproducible, this
information is more likely to mislead users trying to build development
binaries than it is to be useful.
2020-06-12 13:53:01 -04:00
James Bardin 27546809a2 update CHANGELOG.md 2020-06-12 13:13:15 -04:00
James Bardin 39cf911d38
Merge pull request #25208 from hashicorp/jbardin/expand-import
ensure modules are expanded during import
2020-06-12 12:45:05 -04:00
James Bardin 22680d7409
Merge pull request #25206 from hashicorp/jbardin/target-with-expansion
Targeting with module expansion
2020-06-12 12:44:49 -04:00