Skip to content

Releases: hashicorp/terraform-plugin-framework

v1.8.0

18 Apr 19:33
Compare
Choose a tag to compare

BREAKING CHANGES:

  • function: Removed Definition type Parameter() 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 the ValidateableAttribute interface. A ValidatableParameter interface has also been added to the function 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: Add BoolParameterValidator, DynamicParameterValidator, Float64ParameterValidator, Int64ParameterValidator, ListParameterValidator, MapParameterValidator, NumberParameterValidator, ObjectParameterValidator, SetParameterValidator, and StringParameterValidator interfaces for custom function parameter validation implementations. (#971)
  • function: Add ParameterWithBoolValidators, ParameterWithInt64Validators, ParameterWithFloat64Validators, ParameterWithDynamicValidators, ParameterWithListValidators, ParameterWithMapValidators, ParameterWithNumberValidators, ParameterWithObjectValidators, ParameterWithSetValidators, and ParameterWithStringValidators interfaces to enable parameter-based validation support (#971)

BUG FIXES:

  • types/basetypes: Prevented panic in the MapValue types Equal method when the receiver has a nil elementType (#961)
  • types/basetypes: Prevented panic in the ListValue types Equal method when the receiver has a nil elementType (#961)
  • types/basetypes: Prevented panic in the SetValue types Equal method when the receiver has a nil elementType (#961)
  • resource: Ensured computed-only dynamic attributes will not cause wrong final value type errors during planning (#969)

v1.7.0

21 Mar 19:19
Compare
Choose a tag to compare

BREAKING CHANGES:

  • function: All parameters must be explicitly named via the Name field (#964)
  • function: DefaultParameterNamePrefix and DefaultVariadicParameterName constants have been removed (#964)

FEATURES:

  • types/basetypes: Added DynamicType and DynamicValue implementations for dynamic value handling (#147)
  • types/basetypes: Added interfaces basetypes.DynamicTypable, basetypes.DynamicValuable, and basetypes.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 and DynamicReturn 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

05 Mar 17:09
Compare
Choose a tag to compare

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 to varparam. (#926)

v1.6.0

28 Feb 12:20
Compare
Choose a tag to compare

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 a types.List for retrieving variadic argument data will need to update their code to use types.Tuple. (#923)
  • function: Altered the RunResponse type, replacing Diagnostics with FuncError (#925)
  • diag: Removed DiagnosticWithFunctionArgument interface. Removed NewArgumentErrorDiagnostic(), NewArgumentWarningDiagnostic() and WithFunctionArgument() functions. Removed AddArgumentError() and AddArgumentWarning() methods from Diagnostics. (#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 with nil or zero-length value (#910)
  • function: Added FuncError type, required for RunResponse (#925)
  • function: Added NewFuncError() and NewArgumentFuncError() functions, which create a FuncError (#925)
  • function: Added ConcatFuncErrors() and FuncErrorFromDiags() helper functions for use when working with FuncError (#925)

v1.5.0

11 Jan 20:03
Compare
Choose a tag to compare

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 and TupleValue implementations, which are only necessary for dynamic value handling (#870)
  • diag: Added NewArgumentErrorDiagnostic() and NewArgumentWarningDiagnostic() 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)

v1.4.2

24 Oct 15:26
Compare
Choose a tag to compare

BUG FIXES:

  • resource: Add Private field to DeleteResource type, which was missing to allow provider logic to update private state on errors (#863)
  • resource: Prevented private state data loss if resource destruction returned an error (#863)

v1.4.1

09 Oct 11:01
Compare
Choose a tag to compare

BUG FIXES:

  • providerserver: Prevented Data Source Type Not Found and Resource Type Not Found errors with Terraform 1.6 and later (#853)

v1.4.0

06 Sep 17:01
Compare
Choose a tag to compare

NOTES:

  • all: This Go module has been updated to Go 1.20 per the Go support policy. It is recommended to review the Go 1.20 release notes before upgrading. Any consumers building on earlier Go versions may experience errors. (#835)

FEATURES:

  • providerserver: Upgrade to protocol versions 5.4 and 6.4, which can significantly reduce memory usage with Terraform 1.6 and later when a configuration includes multiple instances of the same provider (#828)

v1.3.5

17 Aug 17:05
Compare
Choose a tag to compare

NOTES:

  • internal: Changed provider defined method execution logs from DEBUG log level to TRACE (#818)

BUG FIXES:

  • internal/fwserver: Prevented Invalid Element Type diagnostics for nested attributes and blocks implementing CustomType field (#823)

v1.3.4

03 Aug 18:34
Compare
Choose a tag to compare

BUG FIXES:

  • types/basetypes: Prevented Float64Value Terraform data consistency errors for numbers with high precision floating point rounding errors (#817)