-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Support locals block inside tftest.hcl Terraform Test file. #34629
Copy link
Copy link
Closed
Labels
Description
Terraform Version
terraform version
Terraform v1.7.2
on darwin_arm64Use Cases
We don't want to repeat the same template string inside tftest.hcl Terraform Test file.
Please support locals block inside tftest.hcl Terraform Test file.
Attempted Solutions
locals {
variable_name = "${run.setup_tests.variable_value_one}_${run.setup_tests.variable_value_two}"
}$ terraform init -backend=false && terraform test --verbose --verbose
Initializing modules...
╷
│ Error: Unsupported block type
│
│ on tests/main.tftest.hcl line 13:
│ 13: locals {
│
│ Blocks of type "locals" are not expected here.Proposal
No response
References
No response
Reactions are currently unavailable