Releases: hashicorp/terraform-plugin-framework
Releases · hashicorp/terraform-plugin-framework
v1.3.2
BUG FIXES:
- resource/schema: Ensured
Default
implementations received requestPath
and have responseDiagnostics
handled (#778) - resource/schema: Prevented panics with
Default
implementations on list, map, and set where no responseDiagnostics
orPlanValue
was returned (#778) - providerserver: Ensured Terraform CLI interrupts (e.g. Ctrl-c) properly cancel the
context.Context
of inflight requests (#782) - providerserver: Prevented caching of unused data and managed resource schemas (#784)
v1.3.1
BUG FIXES:
- datasource/schema: Ensure nested attribute and block Equal methods check nested attribute and block definition equality (#752)
- provider/metaschema: Ensure nested attribute Equal methods check nested attribute definition equality (#752)
- provider/schema: Ensure nested attribute and block Equal methods check nested attribute and block definition equality (#752)
- resource/schema: Ensure nested attribute and block Equal methods check nested attribute and block definition equality (#752)
- types/basetypes: Prevented panics in
ListType
,MapType
, andSetType
methods whenElemType
field is not set (#714) - resource/schema: Prevented
Value Conversion Error
diagnostics for attributes and blocks implementing bothCustomType
andPlanModifiers
fields (#754) - types/basetypes: Prevented panic with
ListTypableWithSemanticEquals
andSetTypableWithSemanticEquals
when proposed new element count was greater than prior element count (#772)
v1.3.0
NOTES:
- datasource/schema: The
Schema
typeValidate()
method has been deprecated in preference ofValidateImplementation()
(#699) - provider/metaschema: The
Schema
typeValidate()
method has been deprecated in preference ofValidateImplementation()
(#699) - provider/schema: The
Schema
typeValidate()
method has been deprecated in preference ofValidateImplementation()
(#699) - resource/schema: The
Schema
typeValidate()
method has been deprecated in preference ofValidateImplementation()
(#699)
ENHANCEMENTS:
- datasource/schema: Added
Schema
typeValidateImplementation()
method, which performs framework-defined schema validation and can be used in unit testing (#699) - provider/metaschema: Added
Schema
typeValidateImplementation()
method, which performs framework-defined schema validation and can be used in unit testing (#699) - provider/schema: Added
Schema
typeValidateImplementation()
method, which performs framework-defined schema validation and can be used in unit testing (#699) - resource/schema: Added
Schema
typeValidateImplementation()
method, which performs framework-defined schema validation and can be used in unit testing (#699) - datasource/schema: Raise validation errors if attempting to use top-level
for_each
attribute name, which requires special Terraform configuration syntax to be usable by the data source (#704) - resource/schema: Raise validation errors if attempting to use top-level
for_each
attribute name, which requires special Terraform configuration syntax to be usable by the resource (#704) - datasource/schema: Raise validation errors if attempting to use attribute names with leading numerics (0-9), which are invalid in the Terraform configuration language (#705)
- provider/schema: Raise validation errors if attempting to use attribute names with leading numerics (0-9), which are invalid in the Terraform configuration language (#705)
- resource/schema: Raise validation errors if attempting to use attribute names with leading numerics (0-9), which are invalid in the Terraform configuration language (#705)
- all: Improved SDK logging performance when messages would be skipped due to configured logging level (#744)
BUG FIXES:
- datasource/schema: Raise errors with
ListAttribute
,MapAttribute
,ObjectAttribute
, andSetAttribute
implementations instead of panics when missing requiredAttributeTypes
orElementTypes
fields (#699) - provider/metaschema: Raise errors with
ListAttribute
,MapAttribute
,ObjectAttribute
, andSetAttribute
implementations instead of panics when missing requiredAttributeTypes
orElementTypes
fields (#699) - provider/schema: Raise errors with
ListAttribute
,MapAttribute
,ObjectAttribute
, andSetAttribute
implementations instead of panics when missing requiredAttributeTypes
orElementTypes
fields (#699) - resource/schema: Raise errors with
ListAttribute
,MapAttribute
,ObjectAttribute
, andSetAttribute
implementations instead of panics when missing requiredAttributeTypes
orElementTypes
fields (#699) - tfsdk: Raise framework errors instead of generic upstream errors or panics when encountering unexpected values with
Set()
methods (#715)
v1.2.0
NOTES:
- New
DEBUG
levelDetected value change between proposed new state and prior state
log messages with the offending attribute path are now emitted when proposed new state value differences would cause the framework to automatically mark all unconfiguredComputed
attributes as unknown during planning. These can be used to troubleshoot potential resource implementation issues, or framework and Terraform plan logic bugs. (#630) - This Go module has been updated to Go 1.19 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#682)
FEATURES:
- resource/schema: Introduce packages, interface types, and built-in static value functionality for schema-based default values (#674)
ENHANCEMENTS:
- internal/fwserver: Added
DEBUG
logging to aid troubleshooting unexpected plans with unknown values (#630) - types/basetypes: Add
BoolValue
typeNewBoolPointerValue()
creation function andValueBoolPointer()
method (#689) - types/basetypes: Add
Float64Value
typeNewFloat64PointerValue()
creation function andValueFloat64Pointer()
method (#689) - types/basetypes: Add
Int64Value
typeNewInt64PointerValue()
creation function andValueInt64Pointer()
method (#689) - types/basetypes: Add
StringValue
typeNewStringPointerValue()
creation function andValueStringPointer()
method (#689) - resource/schema: Added
Default
fields toAttribute
types, which support schema-based default values (#674)
BUG FIXES:
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: