mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
Since our new approach here works by installing with a synthetic module configuration block, we need to treat relative paths as a special case for two reasons: - Relative paths in module addresses are relative to the file containing the call rather than the working directory, but -from-module uses the working directory (and the call is in a synthetic "file" anyway) - We need to force Terraform to pass the path through to go-getter rather than just treating it as a relative reference, since we really do want a copy of the directory in this case, even if it is local. To address both of these things, we'll detect a relative path and turn it into an absolute path before beginning installation. This is a bit hacky, but this is consistent with the general philosophy of the -from-module implementation where it does hacky things so that the rest of the installer code can be spared of dealing with its special cases. This is covered by a couple of existing tests that run init -from-module, including TestInit_fromModule_dstInSrc which now passes. |
||
---|---|---|
.. | ||
configload | ||
configschema | ||
configupgrade | ||
test-fixtures | ||
backend.go | ||
compat_shim.go | ||
config_build_test.go | ||
config_build.go | ||
config_test.go | ||
config.go | ||
depends_on.go | ||
doc.go | ||
module_call_test.go | ||
module_call.go | ||
module_merge_body.go | ||
module_merge_test.go | ||
module_merge.go | ||
module.go | ||
named_values.go | ||
parser_config_dir_test.go | ||
parser_config_dir.go | ||
parser_config_test.go | ||
parser_config.go | ||
parser_test.go | ||
parser_values_test.go | ||
parser_values.go | ||
parser.go | ||
provider.go | ||
provisioner.go | ||
provisioneronfailure_string.go | ||
provisionerwhen_string.go | ||
resource.go | ||
synth_body_test.go | ||
synth_body.go | ||
util.go | ||
variable_type_hint.go | ||
variabletypehint_string.go | ||
version_constraint.go |