Commit Graph

26599 Commits

Author SHA1 Message Date
Martin Atkins ec8dadcfa9 svchost/auth: store and forget operations for helper programs
This introduces two new verbs to the credentials helper protocol to store
and forget credentials, and uses them to implement StoreForHost and
ForgetForHost.
2019-08-23 11:57:11 -07:00
Martin Atkins 821d0401bc svchost/auth: New API for storing and forgetting credentials
This new functionality will be used as part of implementing the
"terraform login" and "terraform logout" commands.

As of this commit, the storage codepaths are all just stubs. Subsequent
commits will implement these new methods for each of the different
physical credentials sources.
2019-08-23 11:57:11 -07:00
Martin Atkins f3fe3bfb5f vendor: go get golang.org/x/sys
We'll use this to call the Windows ReplaceFile API for safe file
replacement when updating credentials.tf.json in "terraform login" and
"terraform logout".
2019-08-23 11:57:11 -07:00
yuanye b69c0b4199 oss backend support profile 2019-08-23 21:04:34 +08:00
James Bardin 10d94fb764
Merge pull request #21967 from williams-brian/SSE-C_Remote_State
Add support for SSE-C to S3 backend
2019-08-22 17:30:28 -04:00
Martin Atkins 31a9790080 svchost/disco: Allow oauth client services to specify grant types
Previously we just assumed support for the authorization code grant type,
but now we'll allow the host to declare which grant types it supports
to allow for more flexibility in host login implementations. We may extend
the set of supported grant types in future.
2019-08-22 14:01:44 -07:00
Martin Atkins 5590efcd33 svchost/disco: Allow services that act as OAuth clients
The OAuth specification requires several distinct arguments to be provided
to configure a client, rather than just a URL. To accommodate this, we'll
add a new method to the service discovery API to retrieve OAuth client
information in a Terraform-specific form. (The OAuth specification itself
considers this out of scope, because most OAuth clients are configured
by just hard-coding these settings into them for a particular remote
service.)
2019-08-22 14:01:44 -07:00
tf-release-bot 1140ca9cb5 Cleanup after v0.12.7 release 2019-08-22 20:08:37 +00:00
tf-release-bot cea3b66aa3
v0.12.7 2019-08-22 19:57:56 +00:00
James Bardin f064b87da9 update CHANGELOG.md 2019-08-22 14:48:33 -04:00
James Bardin 68b1488020
Merge pull request #22553 from hashicorp/jbardin/validate-provisioners
don't create separate provisioners for each module
2019-08-22 13:57:57 -04:00
kayrus 270579eac4 Backend: add missing swift options into docs 2019-08-22 11:37:40 +02:00
Gopal Singhal 2d15d75f48
Fix Typo 2019-08-22 09:30:45 +05:30
James Bardin b1025a9d29 update tests to reflect correct provisioners
We no longer create new provisioners for every module.
2019-08-21 19:41:56 -04:00
James Bardin 2b4695eecb only create one provisioner instance per type
There's no reason to start individual provisioners per module path, as
they are not configured per module (or independently at all for that
matter).
2019-08-21 19:41:56 -04:00
Radek Simko db4d75fcaa
Merge pull request #22542 from hashicorp/deps-bump-deep
deps: Bump github.com/go-test/deep to 1.0.3
2019-08-21 14:54:14 +01:00
Radek Simko ecdce9d1fb
deps: Bump hashicorp/terraform-config-inspect to latest 2019-08-21 14:37:08 +01:00
Radek Simko 95cbf1c282
Fix copy-paste errors in test data 2019-08-21 11:45:06 +01:00
Radek Simko 16ba85083f
deps: Bump github.com/go-test/deep to 1.0.3 2019-08-21 11:32:13 +01:00
James Bardin 0c66c45163 update CHANGELOG.md 2019-08-20 17:24:48 -04:00
Pam Selle b4fa5591b6
Merge pull request #22518 from bendrucker/website-taint-ul
website: fix <ul> formatting in "taint" doc
2019-08-20 13:50:34 -04:00
Radek Simko 0a3ffde36e
Update CHANGELOG.md 2019-08-20 17:19:34 +01:00
Radek Simko c7011294f2
Merge pull request #22532 from hashicorp/vendor-downgrade-azure-sdk
vendor: Downgrade Azure dependencies
2019-08-20 16:58:22 +01:00
James Bardin 9f5fa2acf6
Merge pull request #22530 from hashicorp/jbardin/validations
MinItems and MaxItems validations
2019-08-20 11:20:31 -04:00
Radek Simko f3357aad45
vendor: Downgrade Azure dependencies
This is to allow Terraform providers to upgrade to at least
one more minor version of the plugin SDK without major UX hiccups.

This concludes (unsuccessful) experiments involving upgrades
to SDK with https://github.com/Azure/go-autorest/pull/455

Even with that patch all providers still experience broken UX
as described in https://github.com/hashicorp/terraform/pull/22490

This downgrade reduces the uncomfort to only a handful of providers
from >100s. The affected providers more or less directly depend on
Azure SDK(s), which is ~8.

Affected providers practically cannot consume Terraform Plugin SDK
with this patch (downgraded Azure SDKs) and can just wait for
extracted Terraform Plugin SDK which is planned to be released soon.

This reverts the following PRs:

 - https://github.com/hashicorp/terraform/pull/22247
 - https://github.com/hashicorp/terraform/pull/22248
 - https://github.com/hashicorp/terraform/pull/22524
 - https://github.com/hashicorp/terraform/pull/22525

and it is otherwise result of the following commands

```
go get github.com/Azure/azure-sdk-for-go@v21.3.0
go get github.com/hashicorp/go-azure-helpers@166dfd221bb2
go mod tidy
```
2019-08-20 15:52:11 +01:00
James Bardin 13e2e10577 fix Min/Max validation during decoding
We can only validate MinItems >= 1 (equiv to "Required") during
decoding, as dynamic blocks each only decode as a single block. MaxItems
cannot be validated at all, also because of dynamic blocks, which may
have any number of blocks in the config.
2019-08-20 10:13:21 -04:00
James Bardin 731d4226d3 do not validate Min/Max Items in CoerceValue
Due to both the nature of dynamic blocks, and the need for resources to
sometimes communicate incomplete values, we cannot validate MinItems and
MaxItems in CoerceValue.
2019-08-20 10:13:15 -04:00
Radek Simko 723fef6060
Merge pull request #22525 from hashicorp/vendor-autorest-replace-removal
go.mod: Remove unnecessary replace directive for autorest
2019-08-20 14:39:04 +01:00
Radek Simko 4d3385b348
go.mod: Remove unnecessary replace directive for autorest 2019-08-20 10:50:03 +01:00
Radek Simko e68fe72cdf
Merge pull request #22524 from hashicorp/vendor-bump-azure-deps
vendor: Bump go-azure-helpers to 0.7.0
2019-08-20 10:26:11 +01:00
Brian Flad d48d9ed766
lang/funcs: Add fileset function
Reference: https://github.com/hashicorp/terraform/issues/16697

Enumerates a set of regular file names from a given glob pattern. Implemented via the Go stdlib `path/filepath.Glob()` functionality. Notably, stdlib does not support `**` or `{}` extended patterns. See also: https://github.com/golang/go/issues/11862

To support the extended glob patterns, it will require adding a dependency on a third party library or adding our own matching code.
2019-08-20 04:50:01 -04:00
Radek Simko dee450cf8c
vendor: Bump go-azure-helpers to 0.7.0 2019-08-20 09:32:02 +01:00
Ben Drucker e8996e065e website: fix <ul> formatting in "taint" doc 2019-08-19 16:30:16 -07:00
Justin Campbell 273b668976
Merge pull request #22376 from hashicorp/registry-remove-provider-verified
registry/response: Remove unused verified bool
2019-08-19 09:57:23 -04:00
Yecheng Fu ee80499539 docs: install tools before building in docker environment (#19577)
* docs: install tools before building in docker environment

* Update README.md

Co-Authored-By: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2019-08-19 08:13:27 -04:00
Martin Atkins 39b6a322e6 build: Use Go 1.12.9
This is a minor release of Go that does not include any changes that
affect Terraform's behavior.

This does include a fix for golang/go#31084 that could potentially affect
HCL arithmetic (via math/big) on aarch64, but we do not currently build
Terraform for aarch64 so it cannot have affected any previous releases.
2019-08-16 16:29:43 -07:00
Martin Atkins f6c6a88fe8 build: Use Go 1.12.8
This this includes some security fixes that don't impact Terraform along
with a number of general improvements and fixes in the Go toolchain that
don't appear to affect Terraform behavior.

- URL parsing (such as in the "source" argument in a "module" block) now
  validates more strictly the port portion, rejecting non-numeric ports.
  Previously this could potentially lead to parts of the URL being
  silently ignored.

- The temporary callback server for the forthcoming OAuth client
  implementation in "terraform login" would otherwise have been vulnerable
  to local (on the same host) denial of service attacks, which is not
  a common attack vector but good to fix anyway.
2019-08-16 16:29:43 -07:00
Nick Fagerlund 3aa909ac6e website: Update URLs and name references for Terraform Cloud rebrand
The Terraform Enterprise brand has now been split into two parts:

- Terraform Cloud is the application that helps teams use Terraform together,
  with remote state storage, a shared run environment, etc.
- Terraform Enterprise is the on-premise distribution that lets enterprises run
  a private instance of the Terraform Cloud application.

The former TFE docs have been split accordingly.
2019-08-16 15:55:29 -07:00
Nick Fagerlund d316ea08c5 website: Delete terraform push docs; replace with note about the remote backend
Now that the last private installs of legacy TFE have been upgraded, the push
era is over.
2019-08-16 15:55:29 -07:00
Nick Fagerlund 011e84f32f website: Update example command list for 0.12 2019-08-16 15:55:29 -07:00
Chris Griggs 74fcf436b0
Merge pull request #22485 from hashicorp/cgriggs01-mongodbatlas
[Website] MongoDB Atlas provider links
2019-08-16 15:23:30 -07:00
James Bardin 3e03213485
Merge pull request #22478 from hashicorp/jbardin/coerce-value
don't validate Min/Max block vals in CoerceValue
2019-08-16 15:58:53 -04:00
Pam Selle 1fecbbdfbd
Update CHANGELOG.md 2019-08-16 15:16:50 -04:00
Pam Selle e38d588cfc
Merge pull request #22314 from hashicorp/pselle/double-dynamic
Fix panic on double dynamic blocks
2019-08-16 15:15:50 -04:00
Hasan Ramezani f7b1ef876c command/workspace: Added `show` subcommand to workspace command help text. (#22367) 2019-08-16 11:47:00 -04:00
Roger Berlind 64dbba1229 website/docs: Add state commands to remote backend (#21276)
I tested that all state commands work with remote backend using Terraform 0.11.13.
2019-08-16 11:45:27 -04:00
Kaushik NP 0c0a0ff96e website/docs: Missing punctuation mark (#19072)
* Missing punctuation mark

Minor change

* Updated default values for easier reading 

As suggested by @radeksimko
2019-08-16 11:43:10 -04:00
Daniel Schroeder 628b50f900 configs/configupgrade: typo fix (#22469) 2019-08-16 10:38:38 -04:00
Kristin Laemmert b5508b9142
Update CHANGELOG.md 2019-08-16 08:32:48 -04:00
Kristin Laemmert c9d62bb2f6
command: discard output from flags package and return errs directly (#22373)
Any command using meta.defaultFlagSet *might* occasionally exit before
the flag package's output got written. This caused flag error messages
to get lost. This PR discards the flag package output in favor of
directly returning the error to the end user.
2019-08-16 08:31:21 -04:00