terraform/configs
Martin Atkins 86f0b5191c addrs: Stronger validation and normalization of provider namespace/type
The provider FQN is becoming our primary identifier for a provider, so
it's important that we are clear about the equality rules for these
addresses and what characters are valid within them.

We previously had a basic regex permitting ASCII letters and digits for
validation and no normalization at all. We need to do at least case
folding and UTF-8 normalization because these names will appear in file
and directory names in case-insensitive filesystems and in repository
names such as on GitHub.

Since we're already using DNS-style normalization and validation rules
for the hostname part, rather than defining an entirely new set of rules
here we'll just treat the provider namespace and type as if they were
single labels in a DNS name. Aside from some internal consistency, that
also works out nicely because systems like GitHub use organization and
repository names as part of hostnames (e.g. with GitHub Pages) and so
tend to apply comparable constraints themselves.

This introduces the possibility of names containing letters from alphabets
other than the latin alphabet, and for latin letters with diacritics.
That's consistent with our introduction of similar support for identifiers
in the language in Terraform 0.12, and is intended to be more friendly to
Terraform users throughout the world that might prefer to name their
products using a different alphabet. This is also a further justification
for using the DNS normalization rules: modern companies tend to choose
product names that make good domain names, and now such names will be
usable as Terraform provider names too.
2020-02-18 15:42:09 -08:00
..
configload configs: use local set of go-getter detectors 2020-01-07 09:38:46 -08:00
configschema Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
configupgrade moduledeps: replace ProviderInstance with addrs.Provider (#24017) 2020-02-05 09:27:32 -05:00
hcl2shim vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
testdata addrs: Stronger validation and normalization of provider namespace/type 2020-02-18 15:42:09 -08:00
backend.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
compat_shim.go configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
config.go addrs: embed Provider in AbsProviderConfig instead of Type 2020-02-13 15:32:58 -05:00
config_build.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
config_build_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
config_test.go addrs: Stronger validation and normalization of provider namespace/type 2020-02-18 15:42:09 -08:00
depends_on.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
doc.go configs: Additional guidance in doc.go 2018-02-15 15:56:39 -08:00
experiments.go config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
experiments_test.go experiments: a mechanism for opt-in experimental language features 2019-12-10 09:27:05 -08:00
module.go terraform: ProviderTransform gets provider fqn from module 2020-02-14 15:41:31 -08:00
module_call.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
module_call_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
module_merge.go configs: extend module.ProviderRequirements to include the addrs.Provider instead of just version constraints. (#23843) 2020-01-13 11:31:47 -05:00
module_merge_body.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
module_merge_test.go configs: extend module.ProviderRequirements to include the addrs.Provider instead of just version constraints. (#23843) 2020-01-13 11:31:47 -05:00
module_test.go addrs: Stronger validation and normalization of provider namespace/type 2020-02-18 15:42:09 -08:00
named_values.go config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
parser.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
parser_config.go configs: extend module.ProviderRequirements to include the addrs.Provider instead of just version constraints. (#23843) 2020-01-13 11:31:47 -05:00
parser_config_dir.go fix diagnostics handling 2019-11-21 09:14:50 -05:00
parser_config_dir_test.go move IsEmptyDir to configs package 2019-07-18 13:07:10 -04:00
parser_config_test.go fix comment text 2020-02-13 20:46:48 -05:00
parser_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
parser_values.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
parser_values_test.go configs: update values file invalid syntax test for new HCL behavior 2018-03-08 11:17:39 -08:00
provider.go Initial steps towards AbsProviderConfig/LocalProviderConfig separation (#23978) 2020-01-31 08:23:07 -05:00
provider_requirements.go configs: added map to configs.Module for provider local name lookup (#24039) 2020-02-11 13:17:37 -05:00
provider_requirements_test.go configs/decodeRequiredProviders test: before comparing slices (#24114) 2020-02-14 08:26:14 -05:00
provider_test.go Initial steps towards AbsProviderConfig/LocalProviderConfig separation (#23978) 2020-01-31 08:23:07 -05:00
provisioner.go convert destroy provisioner warnings to errors 2020-02-13 15:42:10 -05:00
provisioneronfailure_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
provisionerwhen_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
resource.go Initial steps towards AbsProviderConfig/LocalProviderConfig separation (#23978) 2020-01-31 08:23:07 -05:00
synth_body.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
synth_body_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
util.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
variable_type_hint.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
variabletypehint_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
version_constraint.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00