mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
86f0b5191c
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. |
||
---|---|---|
.. | ||
count_attr.go | ||
doc.go | ||
for_each_attr.go | ||
input_variable.go | ||
instance_key.go | ||
local_value.go | ||
module_call.go | ||
module_instance.go | ||
module.go | ||
output_value.go | ||
parse_ref_test.go | ||
parse_ref.go | ||
parse_target_test.go | ||
parse_target.go | ||
path_attr.go | ||
provider_config_test.go | ||
provider_config.go | ||
provider_test.go | ||
provider.go | ||
referenceable.go | ||
resource_phase.go | ||
resource.go | ||
resourcemode_string.go | ||
self.go | ||
targetable.go | ||
terraform_attr.go |