Releases: hashicorp/terraform-plugin-sdk
Releases · hashicorp/terraform-plugin-sdk
v2.38.1
v2.38.0
NOTES:
- 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. Any consumers building on earlier Go versions may experience errors. (#1518)
- helper/schema: Update the provider server to handle the ListResource RPCs by returning an error since they are not supported by SDKv2. (#1521)
- helper/schema: Update the provider server to handle Action RPCs by returning an error since they are not supported by SDKv2. (#1522)
ENHANCEMENTS:
- helper/schema: Added new helper methods for converting Resource and Identity schemas to protocol representations. (#1504)
- helper/schema: Added an additional validation check to ensure the resource identity object is not null. (#1513)
- helper/schema: Added the
TfTypeIdentityState()andTfTypeResourceState()methods toResourceDatawhich return the identity and state values as atftypes.Value. (#1508)
v2.37.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. (#1445)
- all: This release contains new fields and structs for implmenting managed resource identity. Resource identity is data that is defined by a separate schema and is stored alongside resource state. Identity data is used by Terrform to uniquely identify a remote object and is meant to be immutable during the remote object's lifecycle. Resources that support identity can now be imported using the
identityattribute in Terraform configurationimportblocks, available in Terraform v1.12+. Theresource.Identityfield on theschema.Resourcestruct can be used to support identity by defining an identity schema. Once the identity schema is defined, you can read and store identity data in the state file with the newIdentityDatastruct that is available via theIdentity()method onschema.ResourceDataandschema.ResourceDiffstructs. (#1444)
FEATURES:
- helper/schema: Added new
TestResourceDataWithIdentityRawfunction for creating aResourceDatastruct with identity data for unit testing. (#1475) - helper/schema: Added new
Identityfield toResourcethat supports defining an identity schema for managed resources only. (#1444) - Added new
ImportStatePassthroughWithIdentityhelper that can support both identity and ID importing via a single field. (#1474)
ENHANCEMENTS:
- helper/schema: Added
RequiredForImportandOptionalForImportfields to theSchemastruct, which are only valid for identity schemas. (#1444) - helper/schema: Updated
ResourceDatato support passing of identity data in CRUD and import functions for managed resources. (#1444)
BUG FIXES:
- helper/schema: Fixed bug that blocked write-only attributes from being used with resources without update functions. (#1472)
v2.37.0-beta.1
NOTES:
- This beta pre-release continues the implementation of managed resource identity, which should now be used with Terraform v1.12.0-beta2. Managed resources now can support import by identity during plan and apply workflows. Managed resources that already support import via the
schema.Resource.Importerfield still need to set an ID during import when an identity is provided. TheRequiredForImportandOptionalForImportfields on the identity schema can be used to control the validation that Terraform core will apply to the import config block. (#1463)
v2.37.0-alpha.1
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. (#1445)
- This alpha pre-release contains an initial implementation for managed resource identity, which can used with Terraform v1.12.0-alpha20250319, to store and read identity data during plan and apply workflows. A managed resource identity can be used by defining an identity schema in the
resource.Identityfield. Once the identity schema is defined, you can read and store identity data in the new IdentityData struct that is available via the newIdentity()method on ResourceData and ResourceDiff structs. (#1444)
v2.36.1
NOTES:
- Write-only attribute support is in technical preview and offered without compatibility promises until Terraform 1.11 is generally available. (#1375)
BUG FIXES:
- helper/schema: Fixed bug that allowed write-only attributes within set nested blocks. Any attribute within a set nested block with
WriteOnlyset totruewill now trigger an error message. (#1427)
v2.36.0
NOTES:
- Write-only attribute support is in technical preview and offered without compatibility promises until Terraform 1.11 is generally available. (#1375)
FEATURES:
- helper/schema: Added
WriteOnlyschema behavior for managed resource schemas to indicate a write-only attribute. Write-only attribute values are not saved to the Terraform plan or state artifacts. (#1375) - helper/validation: Added
PreferWriteOnlyAttribute()validator that warns practitioners when a write-only version of a configured attribute is available. (#1375) - schema/resource: Added
ValidateRawResourceConfigFuncsfield which allows resources to define validation logic during theValidateResourceTypeConfigRPC. (#1375)
v2.35.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. (#1373)
- helper/schema: While this Go module will not receive support for ephemeral resource types, the provider server is updated to handle the new operations, which will be required to prevent errors when updating
terraform-plugin-frameworkorterraform-plugin-muxin the future. (#1390)
v2.34.0
NOTES:
- all: The
v2.33.0release updated this Go module to Go 1.21 per the Go support policy. It is recommended to review the Go 1.21 release notes before upgrading. Any consumers building on earlier Go versions may experience errors (#1318) - This release contains support for deferred actions, which is an experimental feature only available in prerelease builds of Terraform 1.9 and later. This functionality is subject to change and is not protected by version compatibility guarantees. (#1335)
FEATURES: