terraform/configs/testdata
Kristin Laemmert 041f4dd8ca
configs: require normalized provider local names (#24945)
* addrs: replace NewLegacyProvider with NewDefaultProvider in ParseProviderSourceString

ParseProviderSourceString was still defaulting to NewLegacyProvider when
encountering single-part strings. This has been fixed.

This commit also adds a new function, IsProviderPartNormalized, which
returns a bool indicating if the string given is the same as a
normalized version (as normalized by ParseProviderPart) or an error.
This is intended for use by the configs package when decoding provider
configurations.

* terraform: fix provider local names in tests

* configs: validate that all provider names are normalized

The addrs package normalizes all source strings, but not the local
names. This caused very odd behavior if for e.g. a provider local name
was capitalized in one place and not another. We considered enabling
case-sensitivity for provider local names, but decided that since this
was not something that worked in previous versions of terraform (and we
have yet to encounter any use cases for this feature) we could generate
an error if the provider local name is not normalized. This error also
provides instructions on how to fix it.

* configs: refactor decodeProviderRequirements to consistently not set an FQN when there are errors
2020-05-14 09:00:58 -04:00
..
config-build Standardise directory name for test data 2019-06-30 10:16:15 +02:00
dir-empty move IsEmptyDir to configs package 2019-07-18 13:07:10 -04:00
error-files configs: Hint for a misplaced top-level required_providers block 2020-04-06 09:24:23 -07:00
experiments experiments: a mechanism for opt-in experimental language features 2019-12-10 09:27:05 -08:00
invalid-files configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
invalid-modules configs: Simplify required_providers blocks 2020-04-24 13:44:08 -04:00
nested-errors ensure we record diagnostics from nested modules 2019-07-16 19:06:48 -04:00
provider-reqs command/providers: refactor with new provider types and functions 2020-04-10 15:08:10 -04:00
providers-explicit-fqn addrs: ImpliedProviderForUnqualifiedType function 2020-04-06 09:24:23 -07:00
valid-files configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
valid-modules configs: Fix for resources with implied providers 2020-04-28 14:54:31 -04:00
warning-files convert destroy provisioner warnings to errors 2020-02-13 15:42:10 -05:00