Releases: hashicorp/terraform-plugin-framework
Releases · hashicorp/terraform-plugin-framework
v1.13.0
NOTES:
- Ephemeral resource support is in technical preview and offered without compatibility promises until Terraform 1.10 is generally available. (#1050)
FEATURES:
- ephemeral: New package for implementing ephemeral resources (#1050)
- ephemeral/schema: New package for implementing ephemeral resource schemas (#1050)
ENHANCEMENTS:
- provider: Added
ProviderWithEphemeralResources
interface for implementing ephemeral resources (#1050) - tfsdk: Added
EphemeralResultData
struct for representing ephemeral values produced by a provider, such as from an ephemeral resource (#1050) - provider: Added
EphemeralResourceData
toConfigureResponse
, to pass provider-defined data toephemeral.EphemeralResource
implementations (#1050)
v1.12.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 (#1033)
BUG FIXES:
- providerserver: Fixed bug that prevented
moved
operation support between resource types for framework-only providers. (#1039)
v1.11.0
NOTES:
- Framework reflection logic (
Config.Get
,Plan.Get
, etc.) for structs with
tfsdk
field tags has been updated to support embedded structs that promote exported
fields. For existing structs that embed unexported structs with exported fields, a tfsdk
ignore tag (tfsdk:"-"
) can be added to ignore all promoted fields.
For example, the following struct will now return an error diagnostic:
type thingResourceModel struct {
Attr1 types.String `tfsdk:"attr_1"`
Attr2 types.Bool `tfsdk:"attr_2"`
// Previously, this embedded struct was ignored, will now promote underlying fields
embeddedModel
}
type embeddedModel struct {
// No `tfsdk` tag
ExportedField string
}
To preserve the original behavior, a tfsdk ignore tag can be added to ignore the entire embedded struct:
type thingResourceModel struct {
Attr1 types.String `tfsdk:"attr_1"`
Attr2 types.Bool `tfsdk:"attr_2"`
// This embedded struct will now be ignored
embeddedModel `tfsdk:"-"`
}
type embeddedModel struct {
ExportedField string
}
(#1021)
ENHANCEMENTS:
- all: Added embedded struct support for object to struct conversions with
tfsdk
tags (#1021)
v1.10.0
FEATURES:
- types/basetypes: Added
Int32Type
andInt32Value
implementations for Int32 value handling. (#1010) - types/basetypes: Added interfaces
basetypes.Int32Typable
,basetypes.Int32Valuable
, andbasetypes.Int32ValuableWithSemanticEquals
for Int32 custom type and value implementations. (#1010) - resource/schema: Added
Int32Attribute
implementation for Int32 value handling. (#1010) - datasource/schema: Added
Int32Attribute
implementation for Int32 value handling. (#1010) - provider/schema: Added
Int32Attribute
implementation for Int32 value handling. (#1010) - function: Added
Int32Parameter
andInt32Return
for Int32 value handling. (#1010) - resource/schema/int32default: New package with
StaticValue
implementation for Int32 schema-based default values. (#1010) - resource/schema/int32planmodifier: New package with built-in implementations for Int32 value plan modification. (#1010)
- resource/schema/defaults: New
Int32
interface for Int32 schema-based default implementations. (#1010) - resource/schema/planmodifier: New
Int32
interface for Int32 value plan modification implementations. (#1010) - schema/validator: New
Int32
interface for Int32 value schema validation. (#1010) - types/basetypes: Added
Float32Type
andFloat32Value
implementations for Float32 value handling. (#1014) - types/basetypes: Added interfaces
basetypes.Float32Typable
,basetypes.Float32Valuable
, andbasetypes.Float32ValuableWithSemanticEquals
for Float32 custom type and value implementations. (#1014) - resource/schema: Added
Float32Attribute
implementation for Float32 value handling. (#1014) - datasource/schema: Added
Float32Attribute
implementation for Float32 value handling. (#1014) - provider/schema: Added
Float32Attribute
implementation for Float32 value handling. (#1014) - function: Added
Float32Parameter
andFloat32Return
for Float32 value handling. (#1014) - resource/schema/float32default: New package with
StaticValue
implementation for Float32 schema-based default values. (#1014) - resource/schema/float32planmodifier: New package with built-in implementations for Float32 value plan modification. (#1014)
- resource/schema/defaults: New
Float32
interface for Float32 schema-based default implementations. (#1014) - resource/schema/planmodifier: New
Float32
interface for Float32 value plan modification implementations. (#1014) - schema/validator: New
Float32
interface for Float32 value schema validation. (#1014)
v1.9.0
NOTES:
- resource: If plan modification was dependent on nested attribute plan modification automatically running when the nested object was null/unknown, it may be necessary to add object-level plan modification to convert the nested object to a known object first. (#995)
- 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. (#999)
FEATURES:
- resource: Add
Deferred
field toReadResponse
,ModifyPlanResponse
, andImportStateResponse
which indicates a resource deferred action to the Terraform client (#999) - datasource: Add
Deferred
field toReadResponse
which indicates a data source deferred action to the Terraform client (#999) - resource: Add
ClientCapabilities
field toReadRequest
,ModifyPlanRequest
, andImportStateRequest
which specifies optionally supported protocol features for the Terraform client (#999) - datasource: Add
ClientCapabilities
field toReadRequest
which specifies optionally supported protocol features for the Terraform client (#999) - provider: Add
Deferred
field toConfigureResponse
which indicates a provider deferred action to the Terraform client (#1002) - provider: Add
ClientCapabilities
field toConfigureRequest
which specifies optionally supported protocol features for the Terraform client (#1002)
ENHANCEMENTS:
- function: Introduced implementation errors for collection and object parameters and returns which are missing type information (#991)
BUG FIXES:
- resource: Prevented errant collection-based nested object conversion from null/unknown object to known object (#995)
v1.8.0
BREAKING CHANGES:
- function: Removed
Definition
typeParameter()
method (#968)
NOTES:
- function: Provider-defined function features are now considered generally available and protected by compatibility promises (#966)
- attr/xattr: The
TypeWithValidate
interface has been deprecated in preference of theValidateableAttribute
interface. AValidatableParameter
interface has also been added to thefunction
package (#968)
FEATURES:
- attr/xattr: Added
ValidateableAttribute
interface for custom value type implementations (#968) - function: Added
ValidateableParameter
interface for custom value type implementations (#968) function
: AddBoolParameterValidator
,DynamicParameterValidator
,Float64ParameterValidator
,Int64ParameterValidator
,ListParameterValidator
,MapParameterValidator
,NumberParameterValidator
,ObjectParameterValidator
,SetParameterValidator
, andStringParameterValidator
interfaces for custom function parameter validation implementations. (#971)function
: AddParameterWithBoolValidators
,ParameterWithInt64Validators
,ParameterWithFloat64Validators
,ParameterWithDynamicValidators
,ParameterWithListValidators
,ParameterWithMapValidators
,ParameterWithNumberValidators
,ParameterWithObjectValidators
,ParameterWithSetValidators
, andParameterWithStringValidators
interfaces to enable parameter-based validation support (#971)
BUG FIXES:
- types/basetypes: Prevented panic in the
MapValue
typesEqual
method when the receiver has a nilelementType
(#961) - types/basetypes: Prevented panic in the
ListValue
typesEqual
method when the receiver has a nilelementType
(#961) - types/basetypes: Prevented panic in the
SetValue
typesEqual
method when the receiver has a nilelementType
(#961) - resource: Ensured computed-only dynamic attributes will not cause
wrong final value type
errors during planning (#969)
v1.7.0
BREAKING CHANGES:
- function: All parameters must be explicitly named via the
Name
field (#964) - function:
DefaultParameterNamePrefix
andDefaultVariadicParameterName
constants have been removed (#964)
FEATURES:
- types/basetypes: Added
DynamicType
andDynamicValue
implementations for dynamic value handling (#147) - types/basetypes: Added interfaces
basetypes.DynamicTypable
,basetypes.DynamicValuable
, andbasetypes.DynamicValuableWithSemanticEquals
for dynamic custom type and value implementations (#147) - resource/schema: Added
DynamicAttribute
implementation for dynamic value handling (#147) - datasource/schema: Added
DynamicAttribute
implementation for dynamic value handling (#147) - provider/schema: Added
DynamicAttribute
implementation for dynamic value handling (#147) - function: Added
DynamicParameter
andDynamicReturn
for dynamic value handling` (#147) - resource/schema/dynamicdefault: New package with
StaticValue
implementation for dynamic schema-based default values (#147) - resource/schema/dynamicplanmodifier: New package with built-in implementations for dynamic value plan modification. (#147)
- resource/schema/defaults: New
Dynamic
interface for dynamic schema-based default implementations (#147) - resource/schema/planmodifier: New
Dynamic
interface for dynamic value plan modification implementations (#147) - schema/validator: New
Dynamic
interface for dynamic value schema validation (#147)
v1.6.1
NOTES:
- all: The
v1.6.0
release 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 (#937)
BUG FIXES:
- resource/schema: Ensured invalid attribute default value errors are raised (#930)
- function: Added implementation validation to
function.Definition
to ensure all parameter names (including the variadic parameter) are unique. (#926) - function: Updated the default parameter name to include the position of the parameter (i.e.
param1
,param2
, etc.). Variadic parameters will default tovarparam
. (#926)
v1.6.0
BREAKING CHANGES:
- function: Changed the framework type for variadic parameters to
types.TupleType
, where each element is the same element type. Provider-defined functions using atypes.List
for retrieving variadic argument data will need to update their code to usetypes.Tuple
. (#923) - function: Altered the
RunResponse
type, replacingDiagnostics
withFuncError
(#925) - diag: Removed
DiagnosticWithFunctionArgument
interface. RemovedNewArgumentErrorDiagnostic()
,NewArgumentWarningDiagnostic()
andWithFunctionArgument()
functions. RemovedAddArgumentError()
andAddArgumentWarning()
methods fromDiagnostics
. (#925)
FEATURES:
- resource: Added the
ResourceWithMoveState
interface, which enables state moves across resource types with Terraform 1.8 and later (#917)
ENHANCEMENTS:
- privatestate: Added support for
SetKey()
method to fully remove key withnil
or zero-length value (#910) - function: Added
FuncError
type, required forRunResponse
(#925) - function: Added
NewFuncError()
andNewArgumentFuncError()
functions, which create aFuncError
(#925) - function: Added
ConcatFuncErrors()
andFuncErrorFromDiags()
helper functions for use when working withFuncError
(#925)
v1.5.0
NOTES:
- all: Update
google.golang.org/grpc
dependency to address CVE-2023-44487 (#865) - Provider-defined function support is in technical preview and offered without compatibility promises until Terraform 1.8 is generally available. (#889)
FEATURES:
- function: New package for implementing provider defined functions (#889)
ENHANCEMENTS:
- types/basetypes: Added
TupleType
andTupleValue
implementations, which are only necessary for dynamic value handling (#870) - diag: Added
NewArgumentErrorDiagnostic()
andNewArgumentWarningDiagnostic()
functions, which create diagnostics with the function argument position set (#889) - provider: Added
ProviderWithFunctions
interface for implementing provider defined functions (#889) - diag: Added
(Diagnostics).AddArgumentError()
and(Diagnostics).AddArgumentWarning()
methods for appending function argument diagnostics (#889)