terraform/internal
Martin Atkins 096cddb4b7 command/format: Limitation of plans.ResourceInstanceDeleteBecauseNoModule
This is an explicit technical debt note that our plan renderer isn't able
to give a fully-specific hint in this particular case of deletion reason.

This reason code means that at least one of the module instance keys in
the resource's module path doesn't match an instance declared in the
configuration, but the plan data structure doesn't retain enough
information to know which is the first step in the path which refers to
a missing instance, and so we just always return the whole thing.

This would be confusing if we return module.foo[0].module.bar not being
in the configuration as a result of module.foo not using "count"; it would
be better to say "module.foo[0] is not in the configuration" instead.

It would be most ideal to handle all of the different situations that
ResourceInstanceDeleteBecauseWrongRepetition's rendering does, so that we
can go further and explain exactly _why_ that module instance isn't
declared anymore.

We can do neither of those things today because only the Terraform Core
"expander" component knows that information, and we've discarded that
by the time we get to rendering a plan. To fix this one day would require
preserving in the plan information about which module instances are
declared, as a separate sidecar data structure from which resource
instances we're taking actions on, and then using that to identify which
step in addr.Module here first selects an invalid instance.
2021-12-13 10:04:15 -05:00
..
addrs addrs: Expose the registry address parser's error messages 2021-11-30 15:46:16 -08:00
backend Remove 'enhanced' backend type distinction 2021-12-07 16:29:51 -06:00
builtin return diagnostics from provisioners 2021-05-19 11:24:54 -04:00
cloud Update tests for new prompts 2021-11-17 14:20:44 -08:00
command command/format: Limitation of plans.ResourceInstanceDeleteBecauseNoModule 2021-12-13 10:04:15 -05:00
communicator de-linting 2021-09-01 11:36:21 -04:00
configs addrs: Expose the registry address parser's error messages 2021-11-30 15:46:16 -08:00
copy deprecate helper/copy 2020-10-08 08:42:16 -04:00
dag de-linting 2021-09-01 11:36:21 -04:00
depsfile backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -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 addrs: Expose the registry address parser's error messages 2021-11-30 15:46:16 -08:00
experiments experiments: config_driven_move has concluded 2021-11-01 08:46:15 -07:00
getmodules command: make module installation interruptible 2021-11-11 12:28:10 +00:00
getproviders Fix failing lint check for deprecated x/crypto/openpgp library 2021-11-18 14:59:29 -06:00
grpcwrap Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
helper/slowmessage remove wrapped streams and readline 2021-10-28 11:51:39 -04:00
httpclient Move httpclient/ to internal/httpclient/ 2021-05-17 14:09:07 -07:00
initwd addrs: Expose the registry address parser's error messages 2021-11-30 15:46:16 -08:00
instances instances: Non-existing module instance has no resource instances 2021-12-13 10:03:50 -05:00
ipaddr lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
lang funcs: defer close file in funcs 2021-11-16 09:25:49 +01:00
legacy Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
logging use 11 for the panic exit code 2021-10-28 15:34:02 -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 go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
plugin internal/plugin[6]: Add generated mocks 2021-10-28 20:16:26 -05:00
plugin6 "Add cloud integration option" 2021-10-28 18:30:01 -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 add AffectedAbsResource to interface 2021-11-16 18:19:11 +00:00
registry command: make module installation interruptible 2021-11-11 12:28:10 +00:00
repl core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
replacefile Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
states command/workspace_delete: Allow deleting a workspace with empty husks 2021-10-13 13:54:11 -07:00
terminal remove the use of panicwrap 2021-10-28 11:51:39 -04:00
terraform instances: Non-existing module instance has no resource instances 2021-12-13 10:03:50 -05:00
tfdiags Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
tfplugin5 go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
tfplugin6 Merge pull request #29648 from hashicorp/jbardin/tfproto6.1 2021-10-28 16:00:02 -04:00
typeexpr internal/typeexpr: staticcheck 2020-12-02 13:59:19 -05:00