Commit Graph

23578 Commits

Author SHA1 Message Date
Kristin Laemmert 98353dbe60
Update CHANGELOG.md 2019-02-26 09:47:27 -08:00
Martin Atkins 6b6be3af35 command: Remove promise of plan -validate-only from validate docs
We brought forward a new implementation of "terraform validate" that was
originally scheduled for a later release after finding that it would be
simpler than reworking the old implementation for new v0.12 assumptions,
but we didn't yet implement "terraform plan -validate-only" in spite of
it being mentioned in the updated docs for "terraform validate".

For now then, the documentation will make the weaker suggestion of running
"terraform plan" to validate a particular _run_ rather than a particular
_module_, which is the closest thing we have for now. At some point after
v0.12.0 we will evaluate whether a validate-only mode for "terraform plan"
(which could then run without configuring the providers at all) is needed.
2019-02-25 14:27:59 -08:00
Kristin Laemmert 16823f43de
command/jsonprovider: export providers schemas to json (#20446)
* command/jsonprovider: a new package for exporting providers schemas as JSON
2019-02-25 13:32:47 -08:00
Sander van Harmelen 2b9e2b4c2b
Update CHANGELOG.md 2019-02-25 19:33:51 +01: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
Radek Simko 3924c3e72d
Merge pull request #20457 from hashicorp/vendor-winrm-bump
vendor: github.com/masterzen/winrm@5e5c9a7fe54b
2019-02-25 18:29:17 +00:00
James Bardin 46f530c1b2 update CHANGELOG.md 2019-02-25 13:07:03 -05:00
James Bardin aebfecf871
Merge pull request #20211 from yanndegat/swift_remote_backend
Swift remote backend support for workspaces & locking
2019-02-25 12:58:59 -05:00
Sander van Harmelen 58961026a2 backend/remote: use the can-queue-apply permission
Previously we checked can-update in order to determine if a user had the
required permissions to apply a run, but that wasn't sufficient. So we
added a new permission, can-queue-apply, that we now use instead.
2019-02-25 14:45:40 +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
Paul Tyng 95a6e15c80
Merge pull request #20455 from hashicorp/paultyng-patch-1
Update network-index.html.markdown
2019-02-24 10:08:28 -05:00
Paul Tyng 42b92a2629
Update network-index.html.markdown 2019-02-24 09:51:00 -05:00
James Bardin eda878354d update CHANGELOG.md 2019-02-22 21:09:54 -05:00
Martin Atkins 552dddfb4c command: Specialized error message for var decls in tfvars
A common new-user mistake is to place variable _declarations_ into .tfvars
files instead of variable _values_. To guide towards the correct approach
here, we add a specialized error message for that situation that includes
guidance on the distinction between declaring and setting values for
variables, and an example of what setting a value should look like.
2019-02-22 18:04:01 -08:00
James Bardin 9c0e3cc819
Merge pull request #20432 from hashicorp/jbardin/s3-prefix-key
s3 workspace_key_prefix
2019-02-22 21:00:44 -05:00
James Bardin bd28b996db
Merge pull request #20449 from hashicorp/jbardin/ssh-keepalive
fix test that diverged between 2 merges
2019-02-22 20:55:01 -05:00
James Bardin 830a00b6b8 fix test that diverged between 2 merges 2019-02-22 20:41:37 -05:00
Martin Atkins b217624d83 config/configupgrade: Test to show that list unwrapping works for sets
This was already working but we had no tests to prove it.
2019-02-22 17:40:40 -08:00
James Bardin 929231a2e9
Merge pull request #20437 from hashicorp/jbardin/ssh-keepalive
add ssh keepalive messages to communicator
2019-02-22 20:16:45 -05:00
Martin Atkins dd43926761 configs/configupgrade: Fix up uses of the .count pseudo-attribute
Terraform 0.11 and prior had an odd special case where a resource
attribute access for "count" would be resolved as the count for the
whole resource, rather than as an attribute of an individual instance as
for all other attributes.

Because Terraform 0.12 makes test_instance.foo appear as a list when count
is set (so it can be used in other expressions), it's no longer possible
to have an attribute in that position: lists don't have attributes.
Fortunately we don't really need that special case anymore since it
doesn't do anything we can't now do with the length(...) function.

This upgrade rule, then, detects references like test_instance.foo.count
and rewrites to length(test_instance.foo). As a special case, if
test_instance.foo doesn't have "count" set then it just rewrites as the
constant 1, which mimics what would've happened in that case in Terraform
0.11.
2019-02-22 16:18:53 -08:00
Radek Simko b3cb94a929
Merge pull request #20443 from hashicorp/vendor-go-mod-deps
vendor: Bump levenshtein & osext to go-mod-aware versions
2019-02-22 22:35:10 +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
Paul Tyng e4756ddd52
Merge pull request #20440 from cgriggs01/cgriggs01-ciscoasa
[Website] Cisco ASA provider links
2019-02-22 15:55:29 -05:00
cgriggs01 266fb573cf add Cisco ASA provider links 2019-02-22 12:41:20 -08:00
Martin Atkins 966eb39427 configs/configupgrade: Default arguments in "connection" blocks
Prior to Terraform v0.12 it was possible for a provider to secretly set
some default arguments for the "connection" block, which most commonly
included a hard-coded type of "ssh" and a value from "host".

In the interests of "explicit is better than implicit", Terraform 0.12 no
longer has this feature and instead requires connection settings to be
written explicitly in terms of the resource's exported attributes. For
compatibility though, the upgrade tool will insert expressions that are
as close as possible to the logic the provider formerly implemented, or
in a few rare cases a TF-UPGRADE-TODO comment to fix it up manually.

Some of the existing resource type implementations have incredibly
complicated implementations of selecting a single host IP address to use
and don't expose the result of that as an attribute, so for now we handle
those via a complicated Terraform language expression achieving the same
result. Ideally these providers would introduce a new attribute that
exports the same address formerly exported as the hostname before their
initial v0.12-compatible release, in which case we can simplify these to
just reference the attribute in question. That would be preferable also
because it would allow use of that exported attribute in other contexts,
such as in a null_resource provisioner somewhere else or in an output
to allow a caller to deal with the SSH part itself.
2019-02-22 12:32:56 -08:00
Martin Atkins ac6e0e42dc configs/configupgrade: Upgrade the bodies of "connection" blocks
This uses the fixed "superset" schema from the main terraform package to
apply our standard expression mapping, with the exception of "type" where
interpolation sequences are not supported due to the type being evaluated
early to retrieve the schema for decoding the rest.
2019-02-22 12:32:56 -08:00
Martin Atkins e2ef51800a configs/configupgrade: Upgrade the bodies of "provisioner" blocks
Aside from the two special meta-arguments "connection" and "provisioner"
this is just our standard mapping from schema to conversion rules, using
the provisioner's configuration schema.
2019-02-22 12:32:56 -08:00
Martin Atkins cdca8fbfe8 configs/configupgrade: Correct ignore_changes error message
Due to a copy-paste error, this was using the message from the providers
map in a "module" block.

This new message is not particularly helpful, but we should only see it
for a configuration that wouldn't have been valid in 0.11 either, and so
it's unlikely to be displayed.
2019-02-22 12:32:56 -08:00
Martin Atkins 0095a944cd configs/configupgrade: Include provisioner schemas in analysis
We'll need these to migrate any "provisioner" blocks we find in the input
configuration.
2019-02-22 12:32:56 -08:00
James Bardin 55cf4e95a5
Merge pull request #19979 from usererror/consul-backend-lock-acl
Add details about using lock=true when consul ACL is enabled
2019-02-22 15:04:25 -05:00
James Bardin b8be1d0114
Merge pull request #20377 from henninge/patch-1
Only path-style S3 URLs are supported.
2019-02-22 14:46:48 -05:00
James Bardin 010747f7da
Merge pull request #18896 from sherodtaylor/feature/updated-ssh-cert-auth-v0.12-dev
Feature/updated ssh cert auth retargeted to master
2019-02-22 14:44:30 -05:00
Sherod Taylor c456d9608b updated ssh authentication and testing for ssh 2019-02-22 14:30:50 -05:00
James Bardin b5384100a6 add ssh keepalive messages to communicator
Long running remote-exec commands with no output may be cutoff during
execution. Enable ssh keepalives for all ssh connections.
2019-02-22 14:03:15 -05:00
Nick Fagerlund 01eb224469 website: Large, on-brand link preview image for marketing pages (/intro/*)
Although /intro/getting-started includes docs content, those pages currently
redirect to the Learn platform, and so shouldn't be affected by the large unfurl
image.
2019-02-22 10:09:09 -08:00
Radek Simko ef24b18b25
Merge pull request #20434 from hashicorp/vendor-mattn-bumps
vendor: Bump mattn dependencies to go-mod-aware versions
2019-02-22 17:22:11 +00: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
Kristin Laemmert 4dd8192ec7
Merge pull request #20352 from hashicorp/mildwonkey/show-docs
mildwonkey/show-docs
2019-02-22 08:19:01 -08:00
Radek Simko d13c786504
Merge pull request #20430 from hashicorp/vendor-bump-ssh-agent
vendor: github.com/xanzy/ssh-agent@v0.2.1
2019-02-22 16:16:17 +00:00
James Bardin 9561ec4617
Merge pull request #20431 from hashicorp/jbardin/state-uuid
remove single rand source to prevent races
2019-02-22 10:40:51 -05:00
James Bardin 31ca293777 fix slash handling around workspace_key_prefix
The handling of slashes was broken around listing workspaces in
workspace_key_prefix. While it worked in most places by splitting an
extra time around the spurious slashes, it failed in the case that the
prefix ended with a slash of its own.

A test was temporarily added to verify that the backend works with the
unusual keys, but rather than risking silent breakage around prefixes
with trailing slashes, we also add validation to prevent users from
entering keys with trailing slashes at all.
2019-02-22 10:29:10 -05:00
James Bardin f6af61f990 fix test that never worked
The 0.12 update left this test broken. Make sure we're working with the
correct objects here.
2019-02-22 10:14:53 -05:00
Radek Simko e94155456f
vendor: github.com/xanzy/ssh-agent@v0.2.1 2019-02-22 14:22:13 +00:00
James Bardin 43b2c9a1d0 remove single rand source to prevent races
This shouldn't really be an issue in normal usage, but some of the
backend tests will trigger a race here.
2019-02-21 20:45:41 -05:00
Chris Griggs c40530afb0
Merge pull request #20423 from cgriggs01/cgriggs01-community-proivders
[Website] Two new community providers
2019-02-21 16:04:39 -08:00
cgriggs01 b2d46ad2ed two new community providers 2019-02-21 15:44:56 -08:00
Chris Griggs 0ddbe5d7be
Merge pull request #20420 from cgriggs01/cgriggs01-yandex
[Website] New provider links
2019-02-21 14:41:21 -08:00