Releases: hashicorp/terraform-plugin-testing
Releases · hashicorp/terraform-plugin-testing
v1.14.0-beta.1
NOTES:
- Adds an opt-in compatibility flag for config mode tests to unlock upgrade from v1.5.1 to latest for specific providers. (#496)
- This beta pre-release adds a new query mode to support testing for list blocks which can be used with Terraform v1.14+ (#531)
- all: This Go module has been updated to Go 1.24 per the Go support policy. It is recommended to review the Go 1.24 release notes before upgrading. (#551)
v1.13.3
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, andConfigDirectorycan also be used directly withImportStateif needed. (#442) - ImportState: Added
ImportStateKindto control which method of import theImportStatetest step uses.ImportCommandWithID(default, same behavior as today) ,ImportBlockWithID, andImportBlockWithResourceIdentity. (#442) - ImportState: Added
ImportStateConfigExactto opt-out of new import config generation for plannable import. (#494) - statecheck: Added
ExpectIdentityValueMatchesStatestate check to assert that an identity value matches a state value at the same path. (#503) - statecheck: Added
ExpectIdentityValueMatchesStateAtPathstate check to assert that an identity value matches a state value at different paths. (#503)
ENHANCEMENTS:
- statecheck: Added
ExpectIdentityValuestate check, which asserts a specified attribute value of a managed resource identity in state. (#468) - statecheck: Added
ExpectIdentitystate check, which asserts all data of a managed resource identity in state. (#470) - Adds
AdditionalCLIOptions.PlanOptions.NoRefreshto testterraform plan -refresh=false(#490)
v1.13.0-beta.1
BREAKING CHANGES:
- importstate:
ImportStatePersistandImportStateVerifyare not supported for plannable import (ImportBlockWith*) and will return an error (#476) - importstate: renamed
ImportStateWithIdtoImportStateWithIDand renamedImportCommandWithIdtoImportCommandWithID. (#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
ImportBlockWithResourceIdentitykind 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 the[email protected]orterraform-plugin-sdk/[email protected]Go modules. To assert identity data stored by a provider in state, use thestatecheck.ExpectIdentitystate 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
ObjectExacterror 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
echoproviderpackage is considered experimental and may be altered or removed in a subsequent release (#389)
FEATURES:
v1.10.0
NOTES:
- compare: The
comparepackage is considered experimental and may be altered or removed in a subsequent release (#330) - statecheck:
CompareValue,CompareValueCollection, andCompareValuePairsstate checks are considered experimental and may be altered or removed in a subsequent release. (#330)
FEATURES:
- compare: Introduced new
comparepackage, which contains interfaces and implementations for value comparisons in state checks. (#330) - statecheck: Added
CompareValuestate 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
CompareValueCollectionstate 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
CompareValuePairsstate check, which compares the specified attributes at the given managed resources, or data sources, using the supplied value comparer. (#330)