Output State Checks
The terraform-plugin-testing
module provides a package statecheck
with built-in output value state checks for common use-cases:
Check | Description |
---|---|
ExpectKnownOutputValue | Asserts the output at the specified address has the specified type, and value. |
ExpectKnownOutputValueAtPath | Asserts the output at the specified address, and path has the specified type, and value. |
ExpectKnownOutputValue
State Check
The statecheck.ExpectKnownOutputValue(address, value)
state check verifies that a specific output value has a known type, and value.
Refer to Known Value Checks for details, and examples of the available knownvalue.Check types that can be used with the ExpectKnownOutputValue
state check.
ExpectKnownOutputValueAtPath
State Check
The statecheck.ExpectKnownOutputValueAtPath(address, path, value)
state check verifies that a specific output value at a defined path has a known type, and value.
Refer to Known Value Checks for details, and examples of the available knownvalue.Check types that can be used with the ExpectKnownOutputValueAtPath
state check.