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 configurationimport
blocks, available in Terraform v1.12+. Theresource.Identity
field on theschema.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 newIdentityData
struct that is available via theIdentity()
method onschema.ResourceData
andschema.ResourceDiff
structs. (#1444)
FEATURES:
- helper/schema: Added new
TestResourceDataWithIdentityRaw
function for creating aResourceData
struct with identity data for unit testing. (#1475) - helper/schema: Added new
Identity
field toResource
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
andOptionalForImport
fields to theSchema
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)