v2.13.0
NOTES:
- helper/resource: False positive checks of list, map, and set attributes with
TestCheckNoResourceAttr
andTestCheckResourceAttrSet
will now return an error to explain how to accurately check those types of attributes. Some previously passing tests will now fail until the check is correctly updated. (#920) - helper/schema: Any returned non-
nil
error
with anError()
method that returns an empty string (""
), will now return an error diagnostic with an"Empty Error String"
summary instead of a panic. Enabling Terraform logging at theWARN
level (e.g.TF_LOG=WARN terraform apply
) can help locate the problematic error by searching for thedetected empty error string
log message. (#914)
ENHANCEMENTS:
- helper/resource: Added error when errantly checking list, map, or set attributes in
TestCheckNoResourceAttr
,TestCheckResourceAttr
, andTestCheckResourceAttrSet
(#920) - helper/resource: Execute Terraform CLI commands during acceptance testing with
CHECKPOINT_DISABLE=1
set, removing extraneous calls to checkpoint.hashicorp.com to check for latest Terraform CLI version (#913)
BUG FIXES:
- helper/schema: Allowed
Schema
withTypeInt
to acceptstring
values fromDefaultFunc
, such asEnvDefaultFunc
(#841) (#841) - helper/schema: Prevented panics during
error
to diagnostic conversion for a non-nil
error with anError()
method that returns an empty string (""
) (#914) - helper/validation: Prevented panics with
ToDiagFunc()
function when used insideSchema
typeElem
field, such as validatingTypeList
elements (#915)