opentofu/addrs
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
..
count_attr.go addrs: All Referenceable implementations support String() 2018-10-16 18:44:26 -07:00
doc.go addrs: new package for representing addresses 2018-10-16 18:44:26 -07:00
for_each_attr.go Resource for_each 2019-07-22 10:51:16 -04:00
input_variable.go Module Expansion: Part 2 (#24154) 2020-02-24 17:42:32 -05:00
instance_key.go Add InstanceKey.Value method 2020-02-19 16:02:40 -05:00
local_value.go addrs: flesh out functionality ready to replace terraform.ResourceAddress 2018-10-16 18:44:26 -07:00
module_call.go Update addrs/module_call.go 2020-04-10 14:45:36 -04:00
module_instance.go Missing ConfigResource checks in TargetContains 2020-03-13 19:01:23 -04:00
module.go Missing ConfigResource checks in TargetContains 2020-03-13 19:01:23 -04:00
output_value.go Create non-specific ModuleCallOutput 2020-03-26 13:29:38 -04:00
parse_ref_test.go parse module references as whole modules 2020-04-12 11:26:44 -04:00
parse_ref.go parse module references as whole modules 2020-04-12 11:26:44 -04:00
parse_target_test.go implement addrs.ConfigResource 2020-03-12 15:58:25 -04:00
parse_target.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
path_attr.go addrs: All Referenceable implementations support String() 2018-10-16 18:44:26 -07:00
provider_config_test.go AbsProviderConfig to use addrs.Module 2020-03-10 20:25:44 -04:00
provider_config.go AbsProviderConfig to use addrs.Module 2020-03-10 20:25:44 -04:00
provider_test.go configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
provider.go configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
referenceable.go addrs: All Referenceable implementations support String() 2018-10-16 18:44:26 -07:00
resource_phase.go core: Produce correct references for destroy nodes 2018-10-16 18:49:20 -07:00
resource.go terraform: large refactor to use Provider from configs.Resource (#24396) 2020-03-18 08:58:20 -04:00
resourcemode_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
self.go addrs: All Referenceable implementations support String() 2018-10-16 18:44:26 -07:00
target_test.go Missing ConfigResource checks in TargetContains 2020-03-13 19:01:23 -04:00
targetable.go addrs: flesh out functionality ready to replace terraform.ResourceAddress 2018-10-16 18:44:26 -07:00
terraform_attr.go addrs: All Referenceable implementations support String() 2018-10-16 18:44:26 -07:00