You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After upgrading to Terratest v0.47.1, we're encountering a JSON parsing error when trying to get output using the OutputForKeys function. This error does not occur with previous versions of Terratest. The error suggests an issue with parsing boolean values in the JSON output from Terragrunt.
To Reproduce
Use Terratest v0.47.1
Run tests that use OutputForKeys to parse Terragrunt output
Observe the JSON parsing error
// This is the code that cause the issueterraformOptions:=&terraform.Options{
TerraformDir: config.TerraformDir,
TerraformBinary: "terragrunt",
Logger: logger.Discard,
}
outputMap:=terraform.OutputForKeys(t, terraformOptions, []string{"virtual_machine_resource_group_name", "virtual_machine_name"})
This is the error that we get:
TestAzureXXX 2024-09-03T14:47:54Z retry.go:91: terragrunt [output -no-color -json virtual_machine_resource_group_name --terragrunt-non-interactive]
output.go:19:
Error Trace: /go/pkg/mod/github.com/gruntwork-io/terratest@v0.47.1/modules/terraform/output.go:19
/runner/_work/qa-azure/qa-azure/terratest/test-templates/vm_unit_test_template.go:43
/runner/_work/qa-azure/qa-azure/terratest/packages/triggers/unit.go:63
/runner/_work/qa-azure/qa-azure/terratest/unit-tests/redhat8_base_unit_test.go:9
Error: Received unexpected error:
invalid character 'i' in literal true (expecting 'r')
Test: TestAzureredhat8baseVm
Expected behavior
Terratest should successfully parse the JSON output from Terragrunt without errors, allowing the test to proceed with the parsed output.
Versions
Terratest version: v0.47.1
The text was updated successfully, but these errors were encountered:
Describe the bug
After upgrading to Terratest v0.47.1, we're encountering a JSON parsing error when trying to get output using the OutputForKeys function. This error does not occur with previous versions of Terratest. The error suggests an issue with parsing boolean values in the JSON output from Terragrunt.
To Reproduce
This is the error that we get:
Expected behavior
Terratest should successfully parse the JSON output from Terragrunt without errors, allowing the test to proceed with the parsed output.
Versions
The text was updated successfully, but these errors were encountered: