Commit Graph

24721 Commits

Author SHA1 Message Date
Pam Selle 7a9f2717fe
Merge pull request #22745 from chef-partners/master
Habitat License Acceptance changes
2019-09-09 15:40:19 -04:00
Martin Atkins fb1aefe22b
Merge #22728: Stubbed-out "terraform login" subcommand 2019-09-09 11:39:46 -07:00
Martin Atkins 67d6f58f31 main: use cliconfig.ConfigDir instead of just ConfigDir
main.ConfigDir is just a wrapper around cliconfig.ConfigDir to allow us to
gradually clean up the old calls here, but since this is new code we might
as well do it right from the start.
2019-09-09 11:15:24 -07:00
Martin Atkins 131656a237 main: Temporarily disable "terraform login" as a command
We're not ready to ship this in a release yet because there's still some
remaining work to do on the Terraform Cloud side, but we want to get the
implementation work behind this into the master branch so it's easier to
maintain it in the mean time, rather than letting this long-lived branch
live even longer.

We'll continue to iterate on UX polish and other details in subsequent
commits, and eventually enable this.
2019-09-09 11:15:24 -07:00
Martin Atkins 0ca6b578f5 command/login: Remove unimplemented -into-file option
This was a vestige from earlier prototyping when we were considering
supporting adding credentials to existing .tfrc native syntax files.

However, that proved impractical because the CLI config format is still
HCL 1.0 and that can't reliably perform programmatic surgical updates,
so we'll remove this option for now. We might add it back in later if it
becomes more practical to support it.
2019-09-09 11:15:24 -07:00
Martin Atkins 8381112a5c command: Tests for the "terraform login" command
These run against a stub OAuth server implementation, verifying that we
are able to run an end-to-end login transaction for both the authorization
code and the password grant types.

This includes adding support for authorization code grants to our stub
OAuth server implementation; it previously supported only the password
grant type.
2019-09-09 11:15:24 -07:00
Martin Atkins 7ccd6204c4 command: Swappable implementation of launching web browsers
For unit testing in particular we can't launch a real browser for testing,
so this indirection is primarily to allow us to substitute a mock when
testing a command that can launch a browser.

This includes a simple mock implementation that expects to interact with
a running web server directly.
2019-09-09 11:15:24 -07:00
Martin Atkins daf733af33 command/login: UI cleanup 2019-09-09 11:15:24 -07:00
Martin Atkins f25cb008f1 command/login: Save the new API token
Once we've successfully obtained an API token, we'll can save it in the
credentials store.
2019-09-09 11:15:24 -07:00
Martin Atkins a1e387a0e5 command: A stub OAuth server implementation for login testing 2019-09-09 11:15:24 -07:00
Martin Atkins f605bde562 command/login: Password-based credentials request 2019-09-09 11:15:24 -07:00
Martin Atkins cfc1c4900d command/login: Use Cli.Ask to request confirmation
This is more straightforward than using readline because it already works
properly with panicwrap.
2019-09-09 11:15:24 -07:00
Martin Atkins 0b346e589a command/login: Show login consent prompt before proceeding
Because we're going to pass the credentials we obtain on to some
credentials store (either a credentials helper or a local file on disk)
we ought to disclose that first and give the user a chance to cancel out
and set up a different credentials storage mechanism first if desired.

This also includes the very beginnings of support for the owner password
grant type when running against app.terraform.io. This will be used only
temporarily at initial release to allow a faster initial release without
blocking on implementation of a full OAuth flow in Terraform Cloud.
2019-09-09 11:15:23 -07:00
Martin Atkins 6bba3ceb42 command: "terraform login" command 2019-09-09 11:15:23 -07:00
Mudassar Shafique 50a6c69ab5 Habitat License Acceptance changes. These changes add a new argument that allows users to accept Habitat End User License.
It also containts doc updates for Habitat and Chef provisioner
2019-09-09 23:03:39 +05:00
Radek Simko 7ede6280ca
Merge pull request #22741 from hashicorp/vendor-bump-go-getter
vendor: Bump go-getter to 1.4.0
2019-09-09 15:16:14 +02:00
Radek Simko 5fb1e08678
vendor: Bump go-getter to 1.4.0 2019-09-09 14:04:58 +02:00
James Bardin c228e77390
Merge pull request #22729 from hashicorp/jbardin/provisioner-config
don't send an invalid config to a provisioner
2019-09-08 19:52:44 -04:00
appilon 2af1fab90c
Merge pull request #22723 from hashicorp/appilon/sdk-cherrypick-label
[hashibot] Apply special label for PRs affecting sdk paths
2019-09-06 17:58:30 -04:00
James Bardin 102c575f04 don't send an invalid config to a provisioner
The config diagnostics weren't checked before sending to the
provisioner, and may have contained invalid values.
2019-09-06 17:42:53 -04:00
Martin Atkins cf43663e85 command/e2etest: Fix TestInitProviders
The canonical location of the "template" provider is now in the hashicorp
namespace rather than the terraform-providers namespace, so the output
has changed to reflect that.
2019-09-06 14:27:16 -07:00
Martin Atkins 93583936e1 build: Use the official Go module proxy for Travis-CI runs (#22711)
This gets us slightly faster test runtimes and also insulates us better
from downtime of individual upstreams, in favor of being dependent only
on one specific upstream (the Go module proxy itself, currently run by
Google).
2019-09-06 15:45:31 -04:00
Alex Pilon 2ff840decc
apply special label for PRs affecting sdk paths
will be used during interim period of core and sdks dual existance
2019-09-06 15:22:43 -04:00
Pam Selle 80345d83f7
Update CHANGELOG.md 2019-09-06 14:01:57 -04:00
Pam Selle f9ebae749c
Merge pull request #22707 from vsimon/spell
docs: Minor spelling and typo fixes
2019-09-06 11:46:01 -04:00
Pam Selle 0d0df8e3f4
Merge pull request #22145 from jeffb4/terraform-21483-allow-vars-for-console
fix, use extended flags for terraform console
2019-09-06 11:41:56 -04:00
Souradeep Nanda 8b2668bf56 website/docs oss backend: Clarification for type of primary key (#22591)
The primary key of the TableStore must be a string.
2019-09-06 09:05:05 -04:00
Peter Dave Hello 0c63c7c854 build/Makefile: Properly exclude files under "./vendor/" path for `go fmt` (#19097)
Properly exclude files under "./vendor/" path, and find "files" only.
The original method "might" found "directories" with the same naming,
or, might exclude occasionally exclude the go files with "vendor" string
in any part of its path.
2019-09-06 08:58:34 -04:00
Radek Simko f9380fd9be
Merge pull request #22697 from hashicorp/protobuf-check
make: Add check for protobuf dependencies
2019-09-06 07:09:44 +02:00
Radek Simko b8d49a49d8
Merge pull request #22698 from hashicorp/protobuf-regenerated
Regenerate protobuf files under latest versions
2019-09-06 07:09:05 +02:00
Martin Atkins e0d72930fa website: Warn against using provisioners
For a long time now we've been advising against the use of provisioners,
but our documentation for them is pretty prominent on the website in
comparision to the better alternatives, and so it's little surprise that
many users end up making significant use of them.

Although in the longer term a change to our information architecture would
probably address this even better, this is an attempt to be explicit about
the downsides of using provisioners and to prominently describe the
alternatives that are available for common use-cases, along with some
reasons why we consider them to be better.

I took the unusual step here of directly linking to specific provider
documentation pages about the alternatives, even though we normally try
to keep the core documentation provider-agnostic, because otherwise that
information tends to be rather buried in the provider documentation and
thus the reader would be reasonable to use provisioners just because we're
not giving specific enough alternative recommendations.
2019-09-05 16:09:06 -07:00
Vicken Simonian 853a0e0677 docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
James Bardin 72f9385285
Merge pull request #22690 from hashicorp/jbardin/diff-apply-panic
prevent panics when encountering nil diffs
2019-09-05 09:32:07 -04:00
Radek Simko b8fd6df225
vendor: Bump github.com/golang/protobuf to 1.3.2 2019-09-05 14:47:27 +02:00
Radek Simko 3d94baecf6
Regenerate protobuf files under latest versions
Used protobuf 3.9.1 with protoc-gen-go 1.3.2
2019-09-05 14:36:15 +02:00
Radek Simko 01bc8898fc
make: Add check for protobuf dependencies 2019-09-05 14:30:54 +02:00
James Bardin a94f5ee132 prevent panics when encountering nil diffs
While we can't change the behavior of helper/schema at this point, we
can protect against panics in the case of unexpected nils in the
instance diff.
2019-09-04 16:51:42 -04:00
tf-release-bot 4ebf9082cd Cleanup after v0.12.8 release 2019-09-04 18:28:01 +00:00
tf-release-bot e97ad4ebef
v0.12.8 2019-09-04 18:17:37 +00:00
HashiBot 481b25b5d2
Update CHANGELOG.md 2019-09-04 07:47:53 -07:00
Brian Flad d9704d40bb
Merge pull request #22621 from hashicorp/f-lang-funcs-fileset-enhancements
lang/funcs: Various fileset() function updates for usability and consistency
2019-09-03 23:10:37 -04:00
Pam Selle 3b0de1aa88
Update CHANGELOG.md 2019-09-03 12:29:18 -04:00
Pam Selle 555ed961b2
Merge pull request #22597 from pselle/for-each-wholly-known
Ensure for_each values wholly known for sets
2019-09-03 12:27:24 -04:00
Radek Simko c4e508ffed
Merge pull request #22654 from hashicorp/plugin-pass
plugin: Pass TerraformVersion from ConfigureRequest
2019-08-31 07:20:30 +01:00
Brian Flad 19cf34114f
lang/funcs: Switch fileset() function glob implementation to github.com/bmatcuk/doublestar to support additional glob patterns
This allows the usage of the glob patterns `**` and `{alternative1,...}` to simplify Terraform configuration logic for more complex file matching.
2019-08-30 20:22:03 -04:00
Brian Flad 769f626a0e
lang/funcs: Remove homedir.Expand() and refactor path trimming with filepath.Rel() in fileset() function
Reference: https://github.com/hashicorp/terraform/pull/22621#pullrequestreview-282259385
2019-08-30 20:19:44 -04:00
Brian Flad 820b79d91d
lang/funcs: Clarification update to MakeFileSetFunc comment for filepath.ToSlash usage 2019-08-30 20:19:44 -04:00
Brian Flad af7f6ef441
lang/funcs: Update fileset() function to include path as separate first argument, automatically trim the path argument from results, and ensure results are always canonical with forward slash path separators
Reference: https://github.com/hashicorp/terraform/pull/22523#pullrequestreview-279694703

These changes center around better function usability and consistency with other functions. The function has not yet been released, so these breaking changes can be applied safely.
2019-08-30 20:19:44 -04:00
Martin Atkins aa6dca4912 vendor: go get github.com/chzyer/readline@master
This new version includes Solaris support, the lack of which previously
caused us to disable readline-using features ("terraform console") on
Solaris builds.
2019-08-30 14:42:19 -07:00
Nick Fagerlund a038f8c43b website: In 0.12, terraform_remote_state syntax differs from backend config 2019-08-30 13:14:36 -07:00