github hashicorp/terraform-plugin-sdk v2.37.0

3 months ago

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 identity attribute in Terraform configuration import blocks, available in Terraform v1.12+. The resource.Identity field on the schema.Resource struct 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 new IdentityData struct that is available via the Identity() method on schema.ResourceData and schema.ResourceDiff structs. (#1444)

FEATURES:

  • helper/schema: Added new TestResourceDataWithIdentityRaw function for creating a ResourceData struct with identity data for unit testing. (#1475)
  • helper/schema: Added new Identity field to Resource that supports defining an identity schema for managed resources only. (#1444)
  • Added new ImportStatePassthroughWithIdentity helper that can support both identity and ID importing via a single field. (#1474)

ENHANCEMENTS:

  • helper/schema: Added RequiredForImport and OptionalForImport fields to the Schema struct, which are only valid for identity schemas. (#1444)
  • helper/schema: Updated ResourceData to 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)

Don't miss a new terraform-plugin-sdk release

NewReleases is sending notifications on new releases.