Releases: hashicorp/terraform-plugin-testing
Releases · hashicorp/terraform-plugin-testing
v1.13.2
v1.13.1
v1.13.0
NOTES:
- reduced the volume of DEBUG-level logging to make it easier to visually scan debug output (#463)
FEATURES:
- ImportState: Added support for testing plannable import via Terraform configuration. Configuration is used from the previous test step if available.
Config
,ConfigFile
, andConfigDirectory
can also be used directly withImportState
if needed. (#442) - ImportState: Added
ImportStateKind
to control which method of import theImp 8000 ortState
test step uses.ImportCommandWithID
(default, same behavior as today) ,ImportBlockWithID
, andImportBlockWithResourceIdentity
. (#442) - ImportState: Added
ImportStateConfigExact
to opt-out of new import config generation for plannable import. (#494) - statecheck: Added
ExpectIdentityValueMatchesState
state check to assert that an identity value matches a state value at the same path. (#503) - statecheck: Added
ExpectIdentityValueMatchesStateAtPath
state check to assert that an identity value matches a state value at different paths. (#503)
ENHANCEMENTS:
- statecheck: Added
ExpectIdentityValue
state check, which asserts a specified attribute value of a managed resource identity in state. (#468) - statecheck: Added
ExpectIdentity
state check, which asserts all data of a managed resource identity in state. (#470) - Adds
AdditionalCLIOptions.PlanOptions.NoRefresh
to testterraform plan -refresh=false
(#490)
v1.13.0-beta.1
BREAKING CHANGES:
- importstate:
ImportStatePersist
andImportStateVerify
are not supported for plannable import (ImportBlockWith*
) and will return an error (#476) - importstate: renamed
ImportStateWithId
toImportStateWithID
and renamedImportCommandWithId
toImportCommandWithID
. (#465)
NOTES:
- This beta pre-release adds support for managed resource identity, which can be used with Terraform v1.12.0-beta2. Acceptance tests can use the
ImportBlockWithResourceIdentity
kind to exercise the import of a managed resource using its resource identity object values instead of using a string identifier. (#480)
BUG FIXES:
- importstate: plannable import (
ImportBlockWith*
) fixed for a resource with a dependency (#476)
v1.13.0-alpha.1
NOTES:
- This alpha pre-release contains testing utilities for managed resource identity, which can be used with
Terraform v1.12.0-alpha20250319
, to assert identity data stored during apply workflows. A managed resource in a provider can read/store identity data using theterraform-plugin-framework@v1.15.0-alpha.1
orterraform-plugin-sdk/v2@v2.37.0-alpha.1
Go modules. To assert identity data stored by a provider in state, use thestatecheck.ExpectIdentity
state check. (#470)
v1.12.0
NOTES:
- all: This Go module has been updated to Go 1.23 per the Go support policy. It is recommended to review the Go 1.23 release notes before upgrading. Any consumers building on earlier Go versions may experience errors. (#454)
FEATURES:
- knownvalue: added function checks for custom validation of resource attribute or output values. (#412)
ENHANCEMENTS:
- knownvalue: Updated the
ObjectExact
error message to report extra/missing attributes from the actual object. (#451) - plancheck: Improved the unknown value plan check error messages to include a known value if one exists. (#450)
BUG FIXES:
- plancheck: Fixed bug with all unknown value plan checks where a valid path would return a "path not found" error. (#450)
v1.11.0
NOTES:
- all: This Go module has been updated to Go 1.22 per the Go support policy. It is recommended to review the Go 1.22 release notes before upgrading. Any consumers building on earlier Go versions may experience errors. (#371)
- echoprovider: The
echoprovider
package is considered experimental and may be altered or removed in a subsequent release (#389)
FEATURES:
v1.10.0
NOTES:
- compare: The
compare
package is considered experimental and may be altered or removed in a subsequent release (#330) - statecheck:
CompareValue
,CompareValueCollection
, andCompareValuePairs
state checks are considered experimental and may be altered or removed in a subsequent release. (#330)
FEATURES:
- compare: Introduced new
compare
package, which contains interfaces and implementations for value comparisons in state checks. (#330) - statecheck: Added
CompareValue
state check, which compares sequential values of the specified attribute at the given managed resource, or data source, using the supplied value comparer. (#330) - statecheck: Added
CompareValueCollection
state check, which compares each item in the specified collection (e.g., list, set) attribute, with the second specified attribute at the given managed resources, or data sources, using the supplied value comparer. (#330) - statecheck: Added
CompareValuePairs
state check, which compares the specified attributes at the given managed resources, or data sources, using the supplied value comparer. (#330)
v1.9.0
v1.8.0
FEATURES:
- plancheck: Added
ExpectDeferredChange
andExpectNoDeferredChanges
checks for experimental deferred action support. (#331) - tfversion: Added
SkipIfNotPrerelease
version check for testing experimental features of prerelease Terraform builds. (#331)
ENHANCEMENTS:
- helper/acctest: Improve scope of IPv4/IPv6 random address generation in RandIpAddress() (#305)
- knownvalue: Add
TupleExact
,TuplePartial
andTupleSizeExact
checks for dynamic value testing. (#312) - tfversion: Ensured Terraform CLI prerelease versions are considered semantically equal to patch versions in built-in checks to match the Terraform CLI versioning policy (#303)
- helper/resource: Added
(TestCase).AdditionalCLIOptions
withAllowDeferral
option for plan and apply commands. (#331)
BUG FIXES: