terraform/internal
Martin Atkins 5a6d11e375 addrs: Factor out MoveEndpointInModule module prefix matching
All of our MoveDestination methods have the common problem of deciding
whether the receiver is even potentially in the scope of a particular
MoveEndpointInModule, which requires that the receiver belong to an
instance of the module where the move statement was found.

Previously we had this logic inline in all three cases, but now we'll
factor it out into a shared helper function.

At first it seemed like there ought to be more factoring possible for
the AbsResource vs. AbsResourceInstance implementations, since textually
they look very similar, but in practice they only look similar because
those two types have a lot of method names in common, but the Go compiler
sees them as completely distinct and thus we must write the same logic
out twice. I did try some further refactoring to address that but it
made the resulting code significantly more complicated and, by my
judgement, harder to follow. Consequently I decided that a little
duplication was okay and warranted here because this logic is already
quite fiddly to read through and isn't likely to change significantly once
released (due to backward-compatibility promises).
2021-07-28 13:33:26 -07:00
..
addrs addrs: Factor out MoveEndpointInModule module prefix matching 2021-07-28 13:33:26 -07:00
backend Merge remote-tracking branch 'origin/main' into update-consul 2021-07-28 12:18:01 +02:00
builtin return diagnostics from provisioners 2021-05-19 11:24:54 -04:00
command format/diff: fix panic with null map in NestedType attrs (#29206) 2021-07-21 08:51:35 -04:00
communicator Quoting filesystem path in scp command argument (#28626) 2021-06-15 10:04:01 -07:00
configs configs/configschema: extend block.AttributeByPath to descend into Objects (#29222) 2021-07-22 09:45:33 -04:00
copy deprecate helper/copy 2020-10-08 08:42:16 -04:00
dag Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
depsfile Move addrs/ to internal/addrs/ 2021-05-17 14:09:07 -07:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
e2e Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
earlyconfig Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
experiments configs: Include "moved" blocks when merging multiple files into a module 2021-07-01 08:28:02 -07:00
getmodules Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
getproviders Add support for protocol 6 providers during init. (#29153) 2021-07-15 09:39:40 -07:00
grpcwrap Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
helper Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
httpclient Move httpclient/ to internal/httpclient/ 2021-05-17 14:09:07 -07:00
initwd addrs: ModuleRegistryPackage for representing module registry packages 2021-06-03 08:50:34 -07:00
instances Move addrs/ to internal/addrs/ 2021-05-17 14:09:07 -07:00
lang addrs: Rename AbsModuleCallOutput to ModuleCallInstanceOutput 2021-07-01 08:28:02 -07:00
legacy Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
logging go.mod,backend: update coreos/etcd dependency to release-3.4 branch 2021-07-20 12:27:22 -04:00
modsdir Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
moduledeps Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
moduletest Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
plans configs/configschema: fix missing "computed" attributes from NestedObject's ImpliedType (#29172) 2021-07-15 13:00:07 -04:00
plugin Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
plugin6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-simple Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-simple-v6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-terraform/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
providercache tools: remove terraform-bundle. (#28876) 2021-06-03 14:08:04 -04:00
providers Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
provisioner-local-exec/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provisioners Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
refactoring refactoring: Stubbing of the logic for handling moves 2021-07-14 17:37:48 -07:00
registry addrs: ModuleRegistryPackage for representing module registry packages 2021-06-03 08:50:34 -07:00
repl add marks.Raw 2021-06-25 14:27:43 -04:00
replacefile replacefile: don't create the temporary file in TMPDIR 2020-10-20 16:29:59 -07:00
states states: new `Move` funcs for Resource, ResourceInstance, and ModuleInstances (#29068) 2021-07-13 16:10:46 -04:00
terminal terminal: Helpers for doing fmt-ish operations on the streams 2021-02-12 11:24:13 -08:00
terraform update comment and extend test 2021-07-20 16:09:46 -04:00
tfdiags Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
tfplugin5 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
tfplugin6 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
typeexpr internal/typeexpr: staticcheck 2020-12-02 13:59:19 -05:00