Releases: hashicorp/terraform-plugin-framework
Releases · hashicorp/terraform-plugin-framework
v0.4.1
NOTES:
- Upgraded to terraform-plugin-go v0.4.0 which contains its own breaking changes. Please see https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md#040-september-24-2021 for more details. (#179)
v0.4.0
BREAKING CHANGES:
attr.Type
implementations must now have aString()
method that returns a human-friendly name for the type. (#120)- tfsdk:
Resource
implementations must now include theImportState(context.Context, ImportResourceStateRequest, *ImportResourceStateResponse)
method. If import is not supported, call theResourceImportStateNotImplemented()
function or return an error. (#149)
FEATURES:
- tfsdk: Support resource import (#149)
- types: Support
Set
andSetType
(#126) - types: Support for
Float64
,Float64Type
,Int64
, andInt64Type
(#166)
ENHANCEMENTS:
- Added a
tfsdk.ConvertValue
helper that will convert anyattr.Value
into any compatibleattr.Type
. Compatibility happens at the terraform-plugin-go level; the type that theattr.Value
'sToTerraformValue
method produces must be compatible with theattr.Type
'sTerraformType()
. Generally, this means that theattr.Type
of theattr.Value
and theattr.Type
being converted to must both produce the sametftypes.Type
when theirTerraformType()
method is called. (#120)
BUG FIXES:
v0.3.0
BREAKING CHANGES:
- Methods on the
tfsdk.Config
,tfsdk.Plan
, andtfsdk.State
types now return[]*tfprotov6.Diagnostic
instead oferror
(#82) - Most uses of
[]*tfprotov6.Diagnostic
have been replaced with a newdiag.Diagnostics
type. Please update your type signatures, and use one of thediags.New*
helper functions instead of constructing*tfprotov6.Diagnostic
s by hand. (#110) - The
schema.Attribute
andschema.Schema
types have been moved totfsdk.Attribute
andtfsdk.Schema
. No changes beyond import names are required. (#77) - With the release of Go 1.17, Go 1.17 is now the lowest supported version of Go to use with terraform-plugin-framework. (#104)
attr.Value
implementations must now implement aType(context.Context)
method that returns theattr.Type
that created theattr.Value
. (#119)
FEATURES:
- Added support for ModifyPlan functions on Resources. (#90)
- Introduced first-class diagnostics (
diag
package). (#110) - Support
attr.Type
validation (#82) - tfsdk: Attributes, Data Sources, Providers, and Resources now support configuration validation (#75)
ENHANCEMENTS:
- Added a
tfsdk.ValueAs
helper that allows accessing anattr.Value
without type assertion, by using the same reflection rules used in theConfig.Get
,Plan.Get
, andState.Get
helpers. (#119) - Errors from methods on the
tfsdk.Config
,tfsdk.Plan
, andtfsdk.State
types now include rich diagnostic information (#82) - tfsdk: Validate
Attribute
defines at least one ofRequired
,Optional
, orComputed
(#111)
BUG FIXES:
- tfsdk: Diagnostics returned from
(Plan).SetAttribute()
and(State).SetAttribute()
reflection will now properly include attribute path (#133) - tfsdk: Don't attempt validation on the nested attributes of a null or unknown
SingleNestedAttribute
(#118) - tfsdk: Return warning diagnostic when using
Attribute
orSchema
typeDeprecationMessage
field (#93)
v0.2.0
ENHANCEMENTS:
- Added
tfsdk.NewProtocol6Server
to return atfprotov6.ProviderServer
implementation for testing and muxing purposes. (#72) - Added support for MapNestedAttributes. (#79)
- Responses now default to returning the current state, meaning state will only change when provider developers actively change it. Previously, an empty state value would be returned, which caused problems. (#74)
v0.1.0
FEATURES:
- Added interfaces extending the attr.Type interface to include attribute and element types. (#44)
- Added state, config, and plan types, and support for getting values from them. (#46)
- Added support for Object types. (#38)
- Added support for bools, numbers, and strings. (#29)
- Added support for defining schemas and attributes. (#27)
- Added support for lists. (#36)
- Added support for maps. (#37)
- Added support for provider, resource, and data source types. (#32)
- Added the ability to serve providers. (#45)