terratest
terratest copied to clipboard
OutputAll does not support number type
Describe the solution you'd like Just like we have the ability to easily "cast" to string, to also be able to "cast" to a number type, like float.
Describe alternatives you've considered Alternatively we can use Atoi and similar functions to convert the string to int or float, but this makes the tests codebase more bloated.
After testing I see that this is supported and I can use this:
alarmThreshold := int(outputs["alarm_threshold"].(float64))
This could be useful to be shown in the https://github.com/gruntwork-io/terratest/blob/master/modules/terraform/output_test.go#L377 as an example.
Got it. Will close this issue since you've already found the solution.