terraform/configs/testdata/invalid-files
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
..
data-count-and-for_each.tf Remove panic, update comment 2019-07-26 11:22:10 -04:00
data-reserved-lifecycle.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
data-reserved-locals.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
data-resource-lifecycle.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
interp-in-data-label.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
interp-in-rsrc-label.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
json-as-native-syntax.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
module-calls.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
native-syntax-as-json.tf.json Standardise directory name for test data 2019-06-30 10:16:15 +02:00
provider-localname-normalization.tf configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
provider-reserved.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
provider-syntax.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
resource-count-and-for_each.tf Resource for_each 2019-07-22 10:51:16 -04:00
resource-lifecycle-badbool.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
resource-reserved-locals.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
resources-ignorechanges-all-legacymix.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
unexpected-attr.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
unexpected-block.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
variable-bad-default.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
variable-type-unknown.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
variable-validation-bad-msg.tf config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
variable-validation-condition-badref.tf config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
variable-validation-condition-noref.tf config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
version-variable.tf Standardise directory name for test data 2019-06-30 10:16:15 +02:00
zerolen.tf.json Standardise directory name for test data 2019-06-30 10:16:15 +02:00