terraform/internal/configs/testdata
Martin Atkins 1a8da65314 Refactoring of module source addresses and module installation
It's been a long while since we gave close attention to the codepaths for
module source address parsing and external module package installation.
Due to their age, these codepaths often diverged from our modern practices
such as representing address types in the addrs package, and encapsulating
package installation details only in a particular location.

In particular, this refactor makes source address parsing a separate step
from module installation, which therefore makes the result of that parsing
available to other Terraform subsystems which work with the configuration
representation objects.

This also presented the opportunity to better encapsulate our use of
go-getter into a new package "getmodules" (echoing "getproviders"), which
is intended to be the only part of Terraform that directly interacts with
go-getter.

This is largely just a refactor of the existing functionality into a new
code organization, but there is one notable change in behavior here: the
source address parsing now happens during configuration loading rather
than module installation, which may cause errors about invalid addresses
to be returned in different situations than before. That counts as
backward compatible because we only promise to remain compatible with
configurations that are _valid_, which means that they can be initialized,
planned, and applied without any errors. This doesn't introduce any new
error cases, and instead just makes a pre-existing error case be detected
earlier.

Our module registry client is still using its own special module address
type from registry/regsrc for now, with a small shim from the new
addrs.ModuleSourceRegistry type. Hopefully in a later commit we'll also
rework the registry client to work with the new address type, but this
commit is already big enough as it is.
2021-06-03 08:50:34 -07:00
..
config-build Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
config-diagnostics Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
dir-empty Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
error-files Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
escaping-blocks Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
experiments Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
invalid-files Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
invalid-modules Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
nested-backend-warning Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
nested-errors Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
provider-reqs Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
providers-explicit-fqn Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
valid-files Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
valid-modules Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
warning-files Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00