Commit Graph

25427 Commits

Author SHA1 Message Date
Pam Selle bc7b03e0ed Customize codecov comment 2020-03-04 15:19:42 -05:00
Alisdair McDiarmid 29c0cb79a1
Merge pull request #24277 from hashicorp/alisdair/fix-non-string-map-key-panics
lang: Fix non-string key panics in map function
2020-03-04 14:30:21 -05:00
Pam Selle e26997e2a3
Merge pull request #20260 from nlamirault/patch-1
Change the UptimeRobot provider
2020-03-04 13:56:10 -05:00
Chris Griggs 0782ca8c38
Merge branch 'master' into patch-1 2020-03-04 10:11:40 -08:00
Alisdair McDiarmid 37006c5841 lang: Fix non-string key panics in map function
The map function assumed that the key arguments were strings, and would
panic if they were not.

After this commit, calling `map(1, 2)` will result in a map `{"1" = 1}`,
and calling `map(null, 1)` will result in a syntax error.

Fixes #23346, fixes #23043
2020-03-04 10:54:55 -05:00
James Bardin 0bd40fd496
Merge pull request #24265 from hashicorp/jbardin/cty-update
Update cty to v1.3.1 and migrate to cty stdlib function where applicable
2020-03-04 09:33:51 -05:00
Chris Griggs 3986d2fa3c
Merge pull request #24267 from hashicorp/cgriggs01-oktaasa
[Website] Add new provider links
2020-03-03 16:23:53 -08:00
Chris Griggs 07558742da add Okta ASA provider links 2020-03-03 14:03:50 -08:00
James Bardin d999d43483 remove old funcs code 2020-03-03 15:23:58 -05:00
James Bardin d0d85f909a convert cty func calls to stdlib 2020-03-03 15:23:58 -05:00
James Bardin 7d3fe3b404 update cty 2020-03-03 15:20:11 -05:00
Pam Selle 9ae266f8fe Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
James Bardin 449ea72e87 update CHANGELOG.md 2020-03-03 13:48:19 -05:00
Pam Selle 6a4cfa18da Coverage 2020-03-03 13:01:05 -05:00
Pam Selle 809d34e5b2 Add codecov 2020-03-03 12:19:07 -05:00
Pam Selle 2b2ff24404 Add 0.12 branch to travis list 2020-03-03 12:16:14 -05:00
James Bardin a3be47584a
Merge pull request #24254 from hashicorp/jbardin/state-mv
state mv should always use target address to determine each mode.
2020-03-03 10:21:03 -05:00
Pam Selle 430b7c8da6
Merge pull request #24249 from hashicorp/config-package-deletions
Deletions in the config package
2020-03-02 16:11:53 -05:00
Pam Selle 1a8e7cbd1b Move the commit along with 2020-03-02 15:56:38 -05:00
Pam Selle fa3b54c0c4 Move type construction out, delete func 2020-03-02 15:54:50 -05:00
Pam Selle dd6fb16971 Deletions in the config package 2020-03-02 15:35:35 -05:00
James Bardin 10d926904f state mv should always target instance each mode
When doing a state mv of an instance, the resulting each mode should
always be taken from the target address.
2020-03-02 14:45:03 -05:00
Pam Selle c4441661b0
Merge pull request #24227 from zzhai/patch-1
Update remote.html.md
2020-03-02 13:04:49 -05:00
zzhai 687d74786f
Update remote.html.md
A minor typo
2020-02-26 12:19:10 -08:00
Martin Atkins f899f5aa42 command/init: new error message for signature verification failure
Our initial Terraform 0.13.0 release will continue to support only the
hard-coded official HashiCorp signing key, with support for other keys to
follow in a later release once the trust infrastructure is in place to
support that.

This change is intended to (marginally) improve the UX for a possible
future situation where a HashiCorp-distributed provider makes a released
signed with a new key and a prior version of Terraform ends up trying to
install it due to incorrect version constraints. With this new text we
hope to give the user a better prompt for onward troubleshooting, but
in a sort of hedging way because we have not yet finalized the details of
how new keys might roll out in practice.

Hopefully a user seeing this message would consult the release notes for
Terraform itself and for the provider in question and find some
as-yet-undetermined information about how to proceed.

If the decentralized trust model design comes together before the v0.13.0
release then we may make further amendments here to prepare for that, but
that work should not block the v0.13.0 release if other work concludes
first.
2020-02-25 10:31:54 -05:00
Martin Atkins 8eff19e48f internal/getproviders: Initial implementation of FilesystemMirrorSource
This is a basic implementation of FilesystemMirrorSource for now aimed
only at the specific use-case of scanning the cache of provider plugins
Terraform will keep under the ".terraform" directory, as part of our
interim provider installer implementation for Terraform 0.13.

The full functionality of this will grow out in later work when we
implement explicit local filesystem mirrors, but for now the goal is to
use this just to inspect the work done by the automatic installer once
we switch it to the new provider-FQN-aware directory structure.

The various FIXME comments in this are justified by the limited intended
scope of this initial implementation, and they should be resolved by
later work to use FilesystemMirrorSource explicitly for user-specified
provider package mirrors.
2020-02-25 10:30:03 -05:00
Martin Atkins c073db09ea internal/getproviders: Sorting and filtering for lists of PackageMeta
These are utility functions to ease processing of lists of PackageMeta
elsewhere, once we have functionality that works with multiple packages
at once. The local filesystem mirror source will be the first example of
this, so these methods are motivated mainly by its needs.
2020-02-25 10:30:03 -05:00
Martin Atkins d82a36b6f5 internal/getproviders: ParsePlatform method
This is just to have a centralized set of logic for converting from a
platform string (like "linux_amd64") to a Platform object, so we can do
normalization and validation consistently.
2020-02-25 10:30:03 -05:00
Martin Atkins 3078d21c5f internal/getproviders: Include Provider and Version in PackageMeta
Although we tend to return these in contexts where at least one of these
values is implied, being explicit means that PackageMeta values are
self-contained and less reliant on such external context.
2020-02-25 10:30:03 -05:00
Martin Atkins b53e3074cf addrs: Provider.LessThan
When making lists of providers (or lists that contain providers) it's
helpful to have a canonical ordering in order to produce deterministic
results.

This ordering has no semantic meaning and is just here for the sake of
having a predictable standard.
2020-02-25 10:30:03 -05:00
Martin Atkins 49498759e2
Update CHANGELOG.md 2020-02-25 10:23:23 -05:00
Martin Atkins 67d95b97ce lang/funcs: templatefile requires valid variable names
Previously the templatefile function would permit any arbitrary string as
a variable name, but due to the HCL template syntax it would be impossible
to refer to one that isn't a valid HCL identifier without causing an
HCL syntax error.

The HCL syntax errors are correct, but don't really point to the root
cause of the problem. Instead, we'll pre-verify that the variable names
are valid before we even try to render the template, and given a
specialized error message that refers to the vars argument expression as
the problematic part, which will hopefully make the resolution path
clearer for a user encountering this situation.

The syntax error still remains for situations where all of the variable
names are correct but e.g. the user made a typo referring to one, which
makes sense because in that case the problem _is_ inside the template.
2020-02-25 10:19:46 -05:00
Martin Atkins ec9f950b3f lang/funcs: Test actual error messages from templatefile
This function has a number of different error cases with hopefully-helpful
error messages for each, so it's good to test we're getting the error
message we were actually expecting in each case.
2020-02-25 10:19:46 -05:00
Chris Griggs 447fb6146f
Merge pull request #24175 from hashicorp/cgriggs01-quorum
[Website] update provider links
2020-02-25 07:14:17 -08:00
Pam Selle c249943360
Module Expansion: Part 2 (#24154)
* WIP: dynamic expand

* WIP: add variable and local support

* WIP: outputs

* WIP: Add referencer

* String representation, fixing tests it impacts

* Fixes TestContext2Apply_outputOrphanModule

* Fix TestContext2Apply_plannedDestroyInterpolatedCount

* Update DestroyOutputTransformer and associated types to reflect PlannableOutputs

* Remove comment about locals

* Remove module count enablement

* Removes allowing count for modules, and reverts the test,
while adding a Skip()'d test that works when you re-enable
the config

* update TargetDownstream signature to match master

* remove unnecessary method

Co-authored-by: James Bardin <j.bardin@gmail.com>
2020-02-24 17:42:32 -05:00
Martin Atkins d095f57290
Update CHANGELOG.md 2020-02-20 18:16:54 -08:00
Nick Fagerlund 758bf8500c website: Label backend data source examples as "data source configuration"
"Example referencing" was ambiguous and confusing, especially since these
sections don't show how to reference an output in an expression.
2020-02-20 14:45:04 -08:00
Chris Griggs d9a70a388a
Fixit 2020-02-20 09:33:17 -08:00
Chris Griggs f39b41b275 [Website] update provider links 2020-02-20 09:21:29 -08:00
James Bardin bf65b516c0
Merge pull request #24163 from hashicorp/jbardin/destroy-provisioner-keys
Destroy provisioner each.key
2020-02-20 08:41:55 -05:00
Martin Atkins 98336e6e81
Update CHANGELOG.md 2020-02-19 16:00:57 -08:00
Yuri Astrakhan 6eb968531d
backend/plan: Show warnings even if no changes are needed 2020-02-19 15:59:15 -08:00
Pam Selle 9a65e02b20
Update version.go 2020-02-19 17:42:33 -05:00
James Bardin 745d4e76ec better comments 2020-02-19 16:54:41 -05:00
James Bardin 0d6b5f1559 update some destroy provisioner tests to use for_each 2020-02-19 16:02:40 -05:00
James Bardin 953ada1cf8 destroy provisioner cannot re-evaluate for_each
During destroy, the for expression may be unknown and evaluation will
fail. Destroy provisioners however can only reference the key value,
which is known in the address.
2020-02-19 16:02:40 -05:00
James Bardin 8421abaca0 Add InstanceKey.Value method
Have the InstanceKey implementations handle their own cty.Value
conversions.
2020-02-19 16:02:40 -05:00
James Bardin 46212a6ca5
Merge pull request #23811 from hashicorp/jbardin/dag
some basic dag optimizations
2020-02-19 15:20:24 -05:00
James Bardin 37a7d904aa dag benchmark 2020-02-19 14:53:19 -05:00
James Bardin 1b45b744c3 remove json2dot command
There's no need for the json2dot command since we can't create json
debug graphs.
2020-02-19 14:53:19 -05:00