Releases: hashicorp/terraform-plugin-framework
Releases · hashicorp/terraform-plugin-framework
v1.1.1
v1.1.0
NOTES:
- all: For data handling consistency with attributes, unconfigured list and set blocks will now be represented as a null list or set instead of a known list or set with zero elements. This prevents confusing situations with validation and plan modification, where it was previously required to check block values for the number of elements. Logic that was previously missing null value checks for blocks may require updates. (#604)
- tfsdk: The
Config
,Plan
, andState
typePathMatches()
method logic previously returnedInvalid Path Expression for Schema Data
errors based on implementation details of the underlying data, which prevented returning zero matches in cases where the expression is valid for the schema, but there was no actual data at the path. Providers can now determine whether zero matches is consequential for their use case. (#602)
ENHANCEMENTS:
- path: Added
Expressions
typeMatches
method for checking if any expression in the collection matches a given path (#604) - tfsdk: Automatically prevented Terraform
nested blocks must be empty to indicate no blocks
errors for responses containingPlan
andState
types (#621)
BUG FIXES:
- datasource/schema: Prevented
ListNestedBlock
andSetNestedBlock
typeDeprecationMessage
field from causingBlock Deprecated
warnings with unconfigured blocks (#604) - datasource: Prevented
ConfigValidators
from unexpectedly modifying or removing prior validator diagnostics (#619) - provider/schema: Prevented
ListNestedBlock
andSetNestedBlock
typeDeprecationMessage
field from causingBlock Deprecated
warnings with unconfigured blocks (#604) - provider: Prevented
ConfigValidators
from unexpectedly modifying or removing prior validator diagnostics (#619) - resource/schema: Prevented
ListNestedBlock
andSetNestedBlock
typeDeprecationMessage
field from causingBlock Deprecated
warnings with unconfigured blocks (#604) - resource: Prevented
ConfigValidators
from unexpectedly modifying or removing prior validator diagnostics (#619) - tfsdk: Fixed false positive
Invalid Path Expression for Schema Data
error to be schema-determined instead of data-determined (#602) - types/basetypes: Fixed
ObjectType
typeApplyTerraform5AttributePathStep
method to return an error instead ofnil
for invalid attribute name steps (#602)
v1.0.1
BUG FIXES:
- resource/schema/planmodifier: Prevented
assignment to entry in nil map
panic forObject
type plan modifiers (#591) - types/basetypes: Prevented type mutation via the
ObjectType
typeAttributeTypes()
method return (#591) - types/basetypes: Prevented value mutation via the
ListValue
,MapValue
, andSetValue
typeElements()
method return (#591) - types/basetypes: Prevented value mutation via the
ObjectValue
typeAttributeTypes()
andAttributes()
method returns (#591)
v1.0.0
NOTES:
- The Terraform Plugin Framework is now generally available with semantic versioning compatibility promises. (#578)
- types: Framework type implementations have been moved into the underlying
basetypes
package. Value creation functions and type aliases have been created in thetypes
package that should prevent any breaking changes. (#567)
BREAKING CHANGES:
- provider: The
Provider
interface now requires theMetadata
method. It can be left empty or set theMetadataResponse
typeTypeName
field to populatedatasource.MetadataRequest
andresource.MetadataRequest
typeProviderTypeName
fields. (#580) - resource: The
RequiresReplace()
plan modifier has been removed. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.RequiresReplace()
orresource/schema/stringplanmodifier.RequiresReplaceIfConfigured()
(#576) - resource: The
RequiresReplaceIf()
plan modifier has been removed. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.RequiresReplaceIf()
(#576) - resource: The
Resource
typeGetSchema
method has been removed. Use theSchema
method instead. (#576) - resource: The
StateUpgrader
typePriorSchema
field type has been migrated fromtfsdk.Schema
toresource/schema.Schema
, similar to other resource schema handling (#573) - resource: The
UseStateForUnknown()
plan modifier has been removed. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.UseStateForUnknown()
(#576) - tfsdk: The
AttributePlanModifier
interface has been removed. Use the type-specific plan modifier interfaces in theresource/schema/planmodifier
package instead. (#576) - tfsdk: The
AttributeValidator
interface has been removed. Use the type-specific validator interfaces in theschema/validator
package instead. (#576) - tfsdk: The
Attribute
,Block
, andSchema
types have been removed. Use the similarly named types in thedatasource/schema
,provider/schema
, andresource/schema
packages instead. (#576) - tfsdk: The
ListNestedAttributes
,MapNestedAttributes
,SetNestedAttributes
, andSingleNestedAttributes
functions have been removed. Use the similarly named types in thedatasource/schema
,provider/schema
, andresource/schema
packages instead. (#576) - types: The type-specific
Typable
andValuable
interfaces have been moved into the underlyingbasetypes
package. (#567)
FEATURES:
- types/basetypes: New package which contains embeddable types for custom types (#567)
BUG FIXES:
- datasource: Add
Validate
function toSchema
to prevent usage of reserved and invalid names for attributes and blocks (#548) - provider: Add
Validate
function toMetaSchema
to prevent usage of reserved and invalid names for attributes and blocks (#548) - provider: Add
Validate
function toSchema
to prevent usage of reserved and invalid names for attributes and blocks (#548) - resource: Add
Validate
function toSchema
to prevent usage of reserved and invalid names for attributes and blocks (#548)
v0.17.0
NOTES:
- datasource: The
DataSource
typeGetSchema
method has been deprecated. Use theSchema
method instead. (#546) - provider: The
Provider
typeGetSchema
method has been deprecated. Use theSchema
method instead. (#553) - resource: The
RequiresReplace()
plan modifier has been deprecated. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.RequiresReplace()
orresource/schema/stringplanmodifier.RequiresReplaceIfConfigured()
(#565) - resource: The
RequiresReplaceIf()
plan modifier has been deprecated. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.RequiresReplaceIf()
(#565) - resource: The
Resource
typeGetSchema
method has been deprecated. Use theSchema
method instead. (#558) - resource: The
UseStateForUnknown()
plan modifier has been deprecated. Use a type-specific plan modifier instead, such asresource/schema/stringplanmodifier.UseStateForUnknown()
(#565) - tfsdk: The
Attribute
,Block
, andSchema
types have been deprecated. Use the similarly named types in thedatasource/schema
,provider/schema
, andresource/schema
packages instead. (#563) - tfsdk: The
ListNestedAttributes
,MapNestedAttributes
,SetNestedAttributes
, andSingleNestedAttributes
functions have been deprecated. Use the similarly named types in thedatasource/schema
,provider/schema
, andresource/schema
packages instead. (#563)
BREAKING CHANGES:
- provider: The
ProviderWithMetaSchema
typeGetMetaSchema
method has been replaced with theMetaSchema
method (#562) - tfsdk: The
Attribute
typeFrameworkType()
method has been removed. Use theGetType()
method instead which returns the same information. (#543) - tfsdk: The
Attribute
typeGetType()
method now returns type information whether the attribute implements theType
field orAttributes
field. (#543) - tfsdk: The
Config
,Plan
, andState
typeSchema
field type has been updated fromtfsdk.Schema
to the genericfwschema.Schema
interface to enable additional schema implementations (#544)
FEATURES:
- datasource/schema: New package which contains schema interfaces and types relevant to data sources (#546)
- provider/schema: New package which contains schema interfaces and types relevant to providers (#553)
- resource/schema/planmodifier: New package which contains type-specific schema plan modifier interfaces (#557)
- resource/schema: New package which contains schema interfaces and types relevant to resources (#558)
- resource/schema: New packages, such as
stringplanmodifier
which contain type-specific schema plan modifier implementations (#565) - schema/validator: New package which contains type-specific schema validator interfaces (#542)
BUG FIXES:
- diag: Allow diagnostic messages with incorrect UTF-8 encoding to pass through with the invalid sequences replaced with the Unicode Replacement Character. This avoids returning the unhelpful message "string field contains invalid UTF-8" in that case. (#549)
- internal/fwserver: Ensured blocks are ignored when marking computed nils as unknown during resource change planning (#552)
v0.16.0
BREAKING CHANGES:
- types: The
Bool
typeNull
,Unknown
, andValue
fields have been removed. Use theBoolNull()
,BoolUnknown()
, andBoolValue()
creation functions andIsNull()
,IsUnknown()
, andValueBool()
methods instead. (#523) - types: The
Float64
typeNull
,Unknown
, andValue
fields have been removed. Use theFloat64Null()
,Float64Unknown()
, andFloat64Value()
creation functions andIsNull()
,IsUnknown()
, andValueFloat64()
methods instead. (#523) - types: The
Int64
typeNull
,Unknown
, andValue
fields have been removed. Use theInt64Null()
,Int64Unknown()
, andInt64Value()
creation functions andIsNull()
,IsUnknown()
, andValueInt64()
methods instead. (#523) - types: The
List
typeElems
,ElemType
,Null
, andUnknown
fields have been removed. Use theListNull()
,ListUnknown()
,ListValue()
, andListValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods instead. (#523) - types: The
Map
typeElems
,ElemType
,Null
, andUnknown
fields have been removed. Use theMapNull()
,MapUnknown()
,MapValue()
, andMapValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods instead. (#523) - types: The
Number
typeNull
,Unknown
, andValue
fields have been removed. Use theNumberNull()
,NumberUnknown()
, andNumberValue()
creation functions andIsNull()
,IsUnknown()
, andValueBigFloat()
methods instead. (#523) - types: The
Object
typeAttrs
,AttrTypes
,Null
, andUnknown
fields have been removed. Use theObjectNull()
,ObjectUnknown()
,ObjectValue()
, andObjectValueMust()
creation functions andAs()
,Attributes()
,AttributeTypes()
,IsNull()
, andIsUnknown()
methods instead. (#523) - types: The
Set
typeElems
,ElemType
,Null
, andUnknown
fields have been removed. Use theSetNull()
,SetUnknown()
,SetValue()
, andSetValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods instead. (#523) - types: The
String
typeNull
,Unknown
, andValue
fields have been removed. Use theStringNull()
,StringUnknown()
, andStringValue()
creation functions andIsNull()
,IsUnknown()
, andValueString()
methods instead. (#523)
ENHANCEMENTS:
- attr: Added
ValueState
type, which custom types can use to consistently represent the three possible value states (known, null, and unknown) (#523) - types: Added
BoolTypable
andBoolValuable
interface types, which enable embedding existing boolean types for custom types (#536) - types: Added
Float64Typable
andFloat64Valuable
interface types, which enable embedding existing float64 types for custom types (#536) - types: Added
Int64Typable
andInt64Valuable
interface types, which enable embedding existing int64 types for custom types (#536) - types: Added
ListTypable
andListValuable
interface types, which enable embedding existing list types for custom types (#536) - types: Added
MapTypable
andMapValuable
interface types, which enable embedding existing map types for custom types (#536) - types: Added
NumberTypable
andNumberValuable
interface types, which enable embedding existing number types for custom types (#536) - types: Added
ObjectTypable
andObjectValuable
interface types, which enable embedding existing object types for custom types (#536) - types: Added
SetTypable
andSetValuable
interface types, which enable embedding existing set types for custom types (#536) - types: Added
StringTypable
andStringValuable
interface types, which enable embedding existing string types for custom types (#536)
BUG FIXES:
v0.15.0
NOTES:
- types: The
Bool
typeNull
,Unknown
, andValue
fields have been deprecated in preference of theBoolNull()
,BoolUnknown()
, andBoolValue()
creation functions andIsNull()
,IsUnknown()
, andValueBool()
methods. The fields will be removed in a future release. (#502) - types: The
Float64
typeNull
,Unknown
, andValue
fields have been deprecated in preference of theFloat64Null()
,Float64Unknown()
, andFloat64Value()
creation functions andIsNull()
,IsUnknown()
, andValueFloat64()
methods. The fields will be removed in a future release. (#502) - types: The
Int64
typeNull
,Unknown
, andValue
fields have been deprecated in preference of theInt64Null()
,Int64Unknown()
, andInt64Value()
creation functions andIsNull()
,IsUnknown()
, andValueInt64()
methods. The fields will be removed in a future release. (#502) - types: The
List
typeElems
,ElemType
,Null
, andUnknown
fields have been deprecated in preference of theListNull()
,ListUnknown()
,ListValue()
, andListValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods. The fields will be removed in a future release. (#502) - types: The
Map
typeElems
,ElemType
,Null
, andUnknown
fields have been deprecated in preference of theMapNull()
,MapUnknown()
,MapValue()
, andMapValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods. The fields will be removed in a future release. (#502) - types: The
Number
typeNull
,Unknown
, andValue
fields have been deprecated in preference of theNumberNull()
,NumberUnknown()
, andNumberValue()
creation functions andIsNull()
,IsUnknown()
, andValueBigFloat()
methods. The fields will be removed in a future release. (#502) - types: The
Object
typeAttrs
,AttrTypes
,Null
, andUnknown
fields have been deprecated in preference of theObjectNull()
,ObjectUnknown()
,ObjectValue()
, andObjectValueMust()
creation functions andAs()
,Attributes()
,AttributeTypes()
,IsNull()
, andIsUnknown()
methods. The fields will be removed in a future release. (#502) - types: The
Set
typeElems
,ElemType
,Null
, andUnknown
fields have been deprecated in preference of theSetNull()
,SetUnknown()
,SetValue()
, andSetValueMust()
creation functions andElements()
,ElementsAs()
,ElementType()
,IsNull()
, andIsUnknown()
methods. The fields will be removed in a future release. (#502) - types: The
String
typeNull
,Unknown
, andValue
fields have been deprecated in preference of theStringNull()
,StringUnknown()
, andStringValue()
creation functions andIsNull()
,IsUnknown()
, andValueString()
methods. The fields will be removed in a future release. (#502)
ENHANCEMENTS:
- types: Added
BoolNull()
,BoolUnknown()
, andBoolValue()
functions, which create immutableBool
values (#502) - types: Added
Bool
typeValueBool()
method, which returns thebool
of the known value orfalse
if null or unknown (#502) - types: Added
Float64Null()
,Float64Unknown()
, andFloat64Value()
functions, which create immutableFloat64
values (#502) - types: Added
Float64
typeValueFloat64()
method, which returns thefloat64
of the known value or0.0
if null or unknown (#502) - types: Added
Int64Null()
,Int64Unknown()
, andInt64Value()
functions, which create immutableInt64
values (#502) - types: Added
Int64
typeValueInt64()
method, which returns theint64
of the known value or0
if null or unknown (#502) - types: Added
ListNull()
,ListUnknown()
,ListValue()
, andListValueMust()
functions, which create immutableList
values (#502) - types: Added
ListValueFrom()
,MapValueFrom()
,ObjectValueFrom()
, andSetValueFrom()
functions, which can create value types from standard Go types using reflection similar totfsdk.ValueFrom()
(#522) - types: Added
List
typeElements()
method, which returns the[]attr.Value
of the known values ornil
if null or unknown (#502) - types: Added
MapNull()
,MapUnknown()
,MapValue()
, andMapValueMust()
functions, which create immutableMap
values (#502) - types: Added
Map
typeElements()
method, which returns themap[string]attr.Value
of the known values ornil
if null or unknown (#502) - types: Added
NumberNull()
,NumberUnknown()
, andNumberValue()
functions, which create immutableNumber
values (#502) - types: Added
Number
typeValueBigFloat()
method, which returns the*big.Float
of the known value ornil
if null or unknown (#502) - types: Added
SetNull()
,SetUnknown()
,SetValue()
, andSetValueMust()
functions, which create immutableSet
values (#502) - types: Added
Set
typeElements()
method, which returns the[]attr.Value
of the known values ornil
if null or unknown (#502) - types: Added
StringNull()
,StringUnknown()
, andStringValue()
functions, which create immutableString
values (#502) - types: Added
String
typeValueString()
method, which returns thestring
of the known value or""
if null or unknown (#502)
v0.14.0
NOTES:
- The Terraform Plugin Framework is now in beta. Feedback towards a general availability release in the future with compatibility promises is appreciated. (#500)
BREAKING CHANGES:
- attr: The
Type
interface now requires theValueType
method, which is used for enhancing error diagnostics from the framework (#497)
ENHANCEMENTS:
- internal/reflect: Added
attr.Value
type suggestions to error diagnostics (#497)
v0.13.0
NOTES:
- tfsdk: Schema definitions may now introduce single nested mode blocks, however this support is only intended for migrating terraform-plugin-sdk timeouts blocks. New implementations should prefer single nested attributes instead. (#477)
BREAKING CHANGES:
- datasource: The
DataSource
interface now requires theGetSchema
andMetadata
methods. (#478) - provider: The
DataSourceType
andResourceType
types have been removed. Use theGetSchema
,Metadata
, and optionally theConfigure
methods ondatasource.DataSource
andresource.Resource
implementations instead. (#478) - provider: The
Provider
interfaceGetDataSources
andGetResources
methods have been removed. Use theDataSources
andResources
methods instead. (#478) - resource: The
Resource
interface now requires theGetSchema
andMetadata
methods. (#478)
ENHANCEMENTS:
- tfsdk: Added single nested mode block support (#477)
BUG FIXES:
v0.12.0
NOTES:
- datasource: The
DataSource
typeGetSchema
andMetadata
methods will be required in the next version. (#472) - provider: The
DataSourceType
type has been deprecated in preference of moving theGetSchema
method to thedatasource.DataSource
type and optionally implementing theNewResource
method logic to a newConfigure
method. TheDataSourceType
type will be removed in the next version. (#472) - provider: The
Provider
typeGetDataSources
method has been deprecated in preference of theDataSources
method. Alldatasource.DataSource
types must implement theMetadata
method after migrating. Support for theGetDataSources
method will be removed in the next version. (#472) - provider: The
Provider
typeGetResources
method has been deprecated in preference of theResources
method. Allresource.Resource
types must implement theMetadata
method after migrating. Support for theGetResources
method will be removed in the next version. (#472) - provider: The
ResourceType
type has been deprecated in preference of moving theGetSchema
method to theresource.Resource
type and optionally implementing theNewResource
method logic to a newConfigure
method. TheResourceType
type will be removed in the next version. (#472) - resource: The
Resource
typeGetSchema
andMetadata
methods will be required in the next version. (#472)
BREAKING CHANGES:
- tfsdk: The
Schema
typeAttributeAtPath()
method signature has be updated with apath.Path
parameter anddiag.Diagnostics
return. Use theAttributeAtTerraformPath()
method instead if*tftypes.AttributePath
or specificerror
handling is still necessary. (#450) - tfsdk: The previously deprecated
Schema
typeAttributeType()
method has been removed. Use theType()
method instead. (#450) - tfsdk: The previously deprecated
Schema
typeAttributeTypeAtPath()
method has been removed. Use theTypeAtPath()
orTypeAtTerraformPath()
method instead. (#450) - tfsdk: The previously deprecated
Schema
typeTerraformType()
method has been removed. UseType().TerraformType()
instead. (#450)
ENHANCEMENTS:
- datasource: Added
DataSource
typeConfigure
,GetSchema
, andMetadata
method support (#472) - provider: Added
ConfigureResponse
typeDataSourceData
field, which will set thedatasource.ConfigureRequest.ProviderData
field (#472) - provider: Added
ConfigureResponse
typeResourceData
field, which will set theresource.ConfigureRequest.ProviderData
field (#472) - provider: Added
Provider
typeMetadata
method support, which theMetadataResponse.TypeName
field will set thedatasource.MetadataRequest.ProviderTypeName
andresource.MetadataRequest.ProviderTypeName
fields (#472) - resource: Added
Resource
typeConfigure
,GetSchema
, andMetadata
method support (#472)
BUG FIXES: