terraform/internal/stacks/stackruntime
Martin Atkins 0994e6fbf9 stacks: The terraform.workspace attr is not available in Stacks
The terraform.workspace attribute is a rare example of a CLI- and Cloud-
specific concern bleeding into the Terraform language, and it can only
really have meaning when used in the traditional Terraform workflow
because otherwise there's no workspace to return the name of.

In Stacks any variations between instances of a module must be created
through input variables. Within Terraform Cloud in particular it's also
possible to use stack-level input variables that are assigned different
values from different stack deployments, and thus an author can recreate
the effect of terraform.workspace using a stack-level input variable that
has a different value for each deployment.

This is one of the few cases where the Terraform module language differs
in stacks compared to traditional Terraform. Any module that makes use of
terraform.workspace will need to be generalized to use input variables
instead before it can be used within a stack component.

Prior to this change, references to terraform.workspace from a module used
in a stack component would just panic altogether, because the stacks
runtime doesn't provide the object that the workspace name would be taken
from. Now we'll return a user-oriented error instead.
2024-01-22 08:33:36 -08:00
..
hooks stacks+rpcapi(stacks): Model deposed objects for resource instances 2023-11-15 12:38:56 -08:00
internal/stackeval stacks: The terraform.workspace attr is not available in Stacks 2024-01-22 08:33:36 -08:00
testdata/mainbundle stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
apply.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
doc.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
eval_expr.go stacks+rpcapi: Add some missing copyright comments 2023-11-15 12:38:57 -08:00
helper_test.go stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
hooks.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
plan.go stacks+rpcapi: Wire through the "plan mode" to the stacks runtime 2023-11-15 12:38:56 -08:00
plan_test.go stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
telemetry.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
telemetry_test.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
validate.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
validate_test.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00