terraform/internal
Martin Atkins bee7403f3e command/workspace_delete: Allow deleting a workspace with empty husks
Previously we would reject attempts to delete a workspace if its state
contained any resources at all, even if none of the resources had any
resource instance objects associated with it.

Nowadays there isn't any situation where the normal Terraform workflow
will leave behind resource husks, and so this isn't as problematic as it
might've been in the v0.12 era, but nonetheless what we actually care
about for this check is whether there might be any remote objects that
this state is tracking, and for that it's more precise to look for
non-nil resource instance objects, rather than whole resources.

This also includes some adjustments to our error messaging to give more
information about the problem and to use terminology more consistent with
how we currently talk about this situation in our documentation and
elsewhere in the UI.

We were also using the old State.HasResources method as part of some of
our tests. I considered preserving it to avoid changing the behavior of
those tests, but the new check seemed close enough to the intent of those
tests that it wasn't worth maintaining this method that wouldn't be used
in any main code anymore. I've therefore updated those tests to use
the new HasResourceInstanceObjects method instead.
2021-10-13 13:54:11 -07:00
..
addrs addrs: AbsResource.UniqueKey distinct from AbsResourceInstance.UniqueKey 2021-09-22 09:01:10 -07:00
backend command/workspace_delete: Allow deleting a workspace with empty husks 2021-10-13 13:54:11 -07:00
builtin
command command/workspace_delete: Allow deleting a workspace with empty husks 2021-10-13 13:54:11 -07:00
communicator de-linting 2021-09-01 11:36:21 -04:00
configs configs/configload: snapshotDir must be used via pointer 2021-10-12 11:42:17 -07:00
copy
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
e2e
earlyconfig
experiments configs: Include "moved" blocks when merging multiple files into a module 2021-07-01 08:28:02 -07:00
getmodules
getproviders internal/registry: Add URL to error message for clarity (#29298) 2021-08-10 15:20:40 +01:00
grpcwrap
helper Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
httpclient
initwd
instances refactoring: First round of ValidateMoves rules 2021-07-29 12:29:36 -07:00
ipaddr lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
lang build: Run staticcheck with "go run" 2021-10-12 11:42:17 -07:00
legacy
logging go.mod,backend: update coreos/etcd dependency to release-3.4 branch 2021-07-20 12:27:22 -04:00
modsdir
moduledeps
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 build: Run staticcheck with "go run" 2021-10-12 11:42:17 -07:00
plugin6
provider-simple
provider-simple-v6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-terraform/main
providercache
providers
provisioner-local-exec/main
provisioners
refactoring refactoring: exhaustive NestedWithin checks 2021-09-27 12:48:17 -04:00
registry internal/registry: Add URL to error message for clarity (#29298) 2021-08-10 15:20:40 +01: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 Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
terraform command/workspace_delete: Allow deleting a workspace with empty husks 2021-10-13 13:54:11 -07:00
tfdiags
tfplugin5 go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
tfplugin6 go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
typeexpr