Terraform test experiment ignores the selected workspace

Hi All,

Trying to use the terraform test experiment, and found that it ignores the selected workspace.
Is this behavior intentional?
How would you advise checking workspace-specific configurations?

Thank you

Hi @tata2000,

The intention of that command is to test a module in an isolated environment that is distinct from any existing workspace.

It is actually primarily for testing shared modules that typically don’t have workspaces of their own (they are called from one or more configurations elsewhere). You can in principle use it to test a root module (one that you might directly plan and apply) but such modules are not always designed to be used as a child module and so the terraform test command would not work unless your module is designed to be called from another module.