NOTES:
- tfprotov5+tfprotov6: An upcoming release will require the
EphemeralResourceServer
implementation as part ofProviderServer
. (#441)
FEATURES:
- tfprotov5+tfprotov6: Upgraded protocols and added types to support the new ephemeral resource type (#441)
BREAKING CHANGES:
- tfprotov5+tfprotov6: Removed temporary
ResourceServerWithMoveResourceState
interface type. UseResourceServer
instead. (#408)
NOTES:
- all: If using terraform-plugin-mux, it must be upgraded to v0.16.0 or later to prevent compilation errors (#408)
- 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. (#428)
BUG FIXES:
- logging: Add existing
MoveResourceState
server capability to v5 and v6 logging (#432)
BREAKING CHANGES:
- tfprotov5+tfprotov6:
FunctionServer
interface is now required inProviderServer
. Implementations not needing function support can return errors from theGetFunctions
andCallFunction
methods. (#388) - tfprotov5+tfprotov6:
MoveResourceState
method is now required inResourceServer
. Implementations not needing move state support can return errors from theMoveResourceState
method. (#388)
NOTES:
- all: To prevent compilation errors, ensure your Go module is updated to at least [email protected], [email protected], terraform-plugin-sdk/[email protected], and [email protected] before upgrading this dependency. (#388)
FEATURES:
- tfprotov5+tfprotov6: Upgraded protocols and added types to support deferred actions (#403)
BUG FIXES:
- tftypes: Large integers are always encoded as msgpack integers rather than float values to ensure the decoded value will not be rounded to 52-bit precision (#396)
NOTES:
- all: Upgraded google.golang.org/protobuf dependency, which includes a fix for CVE-2024-24786. While the fixed feature is not used in this Go module, this upgrade may silence security vulnerability scanner reports that are based purely on dependency versions. (#385)
BUG FIXES:
- tftypes: Fixed an edge-case where
(Value).Equal
would panic when comparing two values with underlyingDynamicPseudoType
types and different concrete values. (#383)
BREAKING CHANGES:
- tfprotov5+tfprotov6: Modified the response returned from the CallFunction RPC, replacing diagnostics with function error (#380)
NOTES:
- all: This Go module has been updated 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. (#381)
- all: If using terraform-plugin-framework, terraform-plugin-mux, or terraform-plugin-sdk, only upgrade this Go module when upgrading those Go modules to [email protected], [email protected], and terraform-plugin-sdk/[email protected], or greater, respectively (#380)
NOTES:
- tfprotov5+tfprotov6: An upcoming release will require the MoveResourceState implementation as part of ResourceServer (#364)
FEATURES:
- tfprotov5+tfprotov6: Upgraded protocols and added types to support the
MoveResourceState
RPC (#364)
NOTES:
- tfprotov5+tfprotov6: An upcoming release will require the FunctionServer implementation as part of ProviderServer. (#351)
- Provider-defined function support is in technical preview and offered without compatibility promises until Terraform 1.8 is generally available. (#351)
FEATURES:
- tfprotov5+tfprotov6: Upgraded protocols and added types to support provider-defined functions (#351)
NOTES:
- This release introduces no functional changes. It does however include dependency updates, such as
google.golang.org/grpc
, which address upstream CVEs. (#324)
NOTES:
- all: If using terraform-plugin-framework, terraform-plugin-mux, or terraform-plugin-sdk, only upgrade this Go module when upgrading those Go modules or you may receive a
missing GetMetadata method
error when compiling (#310) - 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. (#321)
FEATURES:
- tfprotov5: Upgraded protocol to 5.4 and implemented
GetMetadata
RPC (#310) - tfprotov6: Upgraded protocol to 6.4 and implemented
GetMetadata
RPC (#310)
ENHANCEMENTS:
- tfprotov5: Added
ServerCapabilities
typeGetProviderSchemaOptional
field, which when enabled can signal that the provider supports RPC operations without theGetProviderSchema
RPC being called first (#310) - tfprotov6: Added
ServerCapabilities
typeGetProviderSchemaOptional
field, which when enabled can signal that the provider supports RPC operations without theGetProviderSchema
RPC being called first (#310)
ENHANCEMENTS:
- tftypes: Added
AttributePath
typeNextStep()
method, which returns the next step in the path without first copying viaSteps()
(#307)
BUG FIXES:
- tftypes: Significantly reduced compute and memory usage of
Value
type walking and transformation (#307) - tftypes: Removed unnecessary memory allocations from
AttributePath
typeEqual()
,LastStep()
, andWithoutLastStep()
methods (#307) - tftypes: Removed unnecessary memory allocations from
NewValue()
function (#307)
ENHANCEMENTS:
- tfprotov5: Added
DynamicValue
typeIsNull
method, which enables checking if the value is null without type information and fully decoding underlying data (#305) - tfprotov6: Added
DynamicValue
typeIsNull
method, which enables checking if the value is null without type information and fully decoding underlying data (#305)
ENHANCEMENTS:
- all: Improved SDK logging performance when messages would be skipped due to configured logging level (#289)
BUG FIXES:
- tfprotov6/tf6server: Ensure interrupts route to StopProvider RPC (#301)
NOTES:
- all: This Go module has been updated to Go 1.19 per the Go support policy. It is recommended to review the Go 1.19 release notes before upgrading. Any consumers building on earlier Go versions may experience errors. (#266)
BUG FIXES:
- tfprotov5/tf5server: Prevented
TF_LOG_SDK_PROTO_DATA_DIR
file overlap by switching from second to millisecond file naming granularity (#245) - tfprotov6/tf6server: Prevented
TF_LOG_SDK_PROTO_DATA_DIR
file overlap by switching from second to millisecond file naming granularity (#245)
BUG FIXES:
- tfprotov5: 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. (#237)
- tfprotov6: 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. (#237)
NOTES:
- No expected changes with this Go module's functionality. Contains updates to dependencies such as
google.golang.org/grpc
andgithub.com/hashicorp/go-plugin
, which may be beneficial for consumers.
NOTES:
- This Go module has been updated to Go 1.18 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#219)
ENHANCEMENTS:
- tfprotov5/tf5server: Added resource private state when protocol data output is enabled (#221)
- tfprotov6/tf6server: Added resource private state when protocol data output is enabled (#221)
BUG FIXES:
- tfprotov5/tf5server: Fixed
ApplyResourceChange
request RPC protocol data output to includePriorState
andProviderMeta
fields (#221) - tfprotov6/tf6server: Fixed
ApplyResourceChange
request RPC protocol data output to includePriorState
andProviderMeta
fields (#221)
ENHANCEMENTS:
- tfprotov5: Added
RawState
typeUnmarshalWithOpts
method to facilitate configurable behaviour during unmarshalling (#213) - tfprotov6: Added
RawState
typeUnmarshalWithOpts
method to facilitate configurable behaviour during unmarshalling (#213)
BUG FIXES:
- tftypes: Clarified
ValueFromJSON
error messaging with object attribute key issues (#214)
NOTES:
- The underlying
terraform-plugin-log
dependency has been updated to v0.6.0, which includes log filtering support and breaking changes ofWith()
toSetField()
function names. Any provider logging which calls those functions may require updates. (#209)
FEATURES:
- Added support for protocol version 5.3 and 6.3, which allows providers to opt into the
PlanResourceChange
RPC for resource destruction (#205)
ENHANCEMENTS:
- tfprotov5: Added
ServerCapabilities
type andServerCapabilities
field toGetProviderSchemaResponse
(#205) - tfprotov6: Added
ServerCapabilities
type andServerCapabilities
field toGetProviderSchemaResponse
(#205)
ENHANCEMENTS:
- tfprotov5/tf5server: Added downstream RPC request duration and response diagnostics logging (#203)
- tfprotov6/tf6server: Added downstream RPC request duration and response diagnostics logging (#203)
BUG FIXES:
- tftypes: Prevented loss of number precision with integers between 54 and 64 bits (#190)
NOTES:
- This Go module has been updated to Go 1.17 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#175)
ENHANCEMENTS:
- tftypes: Added
Type
support toWalkAttributePath()
function (#163)
BUG FIXES:
- tfprotov5/tf5server: Ensured
@caller
in protocol logging entries accurately reflected calling code location (#179) - tfprotov6/tf6server: Ensured
@caller
in protocol logging entries accurately reflected calling code location (#179)
NOTES:
- The underlying
terraform-plugin-log
dependency has been updated to v0.3.0, which includes a breaking change in the optional additional fields parameter of logging function calls to ensure correctness and catch coding errors during compilation. Any early adopter provider logging which calls those functions may require updates. (#166)
ENHANCEMENTS:
- tfprotov5: Added
ValueType()
methods toSchema
,SchemaAttribute
,SchemaBlock
, andSchemaNestedBlock
types. (#158) - tfprotov6: Added
ValueType()
methods toSchema
,SchemaAttribute
,SchemaBlock
,SchemaNestedBlock
, andSchemaObject
types. (#158)
BUG FIXES:
- tfprotov5/tf5server: Ensure server options are passed through on startup (#153)
- tfprotov5/tf5server: Prevent empty provider address error logs on startup (#150)
BREAKING CHANGES:
- tfprotov6: The
SchemaObject.MaxItems
andSchemaObject.MinItems
fields have been removed without replacement. These were never used in the protocol and did not perform any validation. (#143)
BUG FIXES:
- tfprotov6: The
ApplyResourceChangeResponse.UnsafeToUseLegacyTypeSystem
andPlanResourceChangeResponse.UnsafeToUseLegacyTypeSystem
fields are now properly passed into and out of the protocol (#143)
ENHANCEMENTS:
- tfprotov5/tf5server: Added
WithManagedDebug()
ServeOpt
, which implements outputting reattach configuration to stdout and stopping on SIGINT (#137) - tfprotov5/tf5server: Added support for writing protocol data to disk by setting
TF_LOG_SDK_PROTO_DATA_DIR
environment variable (#135) - tfprotov5/tf5server: Increased maximum gRPC send and receive message size limit to 256MB (#139)
- tfprotov6/tf6server: Added
WithManagedDebug()
ServeOpt
, which implements outputting reattach configuration to stdout and stopping on SIGINT (#137) - tfprotov6/tf6server: Added support for writing protocol data to disk by setting
TF_LOG_SDK_PROTO_DATA_DIR
environment variable (#135) - tfprotov6/tf6server: Increased maximum gRPC send and receive message size limit to 256MB (#139)
BUG FIXES:
- Prevent potential process leak on Windows platforms (#123)
- tftypes: Fixed regression with DynamicPseudoType handling since v0.4.0, allowing usage of known values again and preventing msgpack decoding errors in Terraform CLI (#136)
BREAKING CHANGES:
tf6server.New
andtf5server.New
now accept a name argument (meant to be the full registry path of the provider, e.g. registry.terraform.io/hashicorp/random) and a variadic argument ofServeOpts
, just like theServe
function. Providers callingServe
will not notice any change. Providers callingNew
directly should pass the name and any options they would like the server to be configured with. (#93)
FEATURES:
- Added support for terraform-plugin-log v0.2.0, injecting loggers for SDKs and the provider into requests and adding trace and error log lines to request handlers. (#93)
ENHANCEMENTS:
- New
WithoutLogStderrOverride
,WithLogEnvVarName
, andWithoutLogLocation
ServeOpt
helper functions have been added totf6server
andtf5server
. These helpers can be passed toServe
orNew
to control logging behaviors for SDK and provider logs.WithoutLogStderrOverride
disables using the stderr that existed at startup instead of the one that exists when the log function is called; it is recommended to not use this unless you understand the impacts, as Terraform's default behavior is counter-intuitive.WithLogEnvVarName
sets the name of the provider's log module and controls what followsTF_LOG_PROVIDER_
as the environment variable to control the log's level.WithoutLogLocation
excludes filename and line numbers from log output. (#93) - tftypes: Added
AttributePath
LastStep()
method andAttributePathStep
Equal()
method (#112)
BUG FIXES:
- Fixed a panic when using DynamicPseudoType attributes in an object. (#116)
- tftypes: Return null
Number
whenNewValue
receives(*big.Float)(nil)
(#114)
BREAKING CHANGES:
- The
AttributeType
property oftftypes.Map
has been renamed toElementType
. (#105) - The
tf5server
package's import path is nowgithub.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server
instead ofgithub.com/hashicorp/terraform-plugin-go/tfprotov5/server
. (#103) - The
tf6server
package's import path is nowgithub.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server
instead ofgithub.com/hashicorp/terraform-plugin-go/tfprotov6/server
. (#103) - With the release of Go 1.17, Go 1.16 is now the lowest supported version of Go to use with terraform-plugin-go. (#102)
- tftypes: The
Is()
method on types implementing theType
interface now only perform a shallow type check, no longer comparing any underlying attribute or element type(s). Use theEqual()
method for deep type checking. (#94) - tftypes:
(AttributePath).WithElementKeyInt()
now has anint
parameter instead ofint64
. Using(AttributePath).WithElementKeyInt()
withinfor ... range
loops no longer requiresint64()
conversion. (#101)
ENHANCEMENTS:
- tftypes: All types implementing the
Type
interface now provide anEqual()
method for deep type checking andUsableAs()
method for type conformance checking. (#94)
BUG FIXES:
- tftypes: Ensure
NewValue()
panics onDynamicPseudoType
and known values. (#94) - tftypes: Fixed elements of
Tuple
andMap
and attributes ofObject
havingDynamicPseudoType
as their type when unmarshaling JSON values from Terraform. (#94) - tftypes: Fixed elements of
Tuple
andMap
and attributes ofObject
havingDynamicPseudoType
as their type when unmarshaling msgpack values from Terraform. (#100) - tftypes: Prevent potential panic unmarshaling null DynamicPseudoType in msgpack (#99)
- tftypes: Return error instead of panic when calling
(Value).Diff()
with eitherValue
missing type (#104) - tftypes: Return error instead of panic when calling
Transform()
withValue
missing type (#104)
BUG FIXES:
- Fixed AttributePaths pointing to the root of the value to be omitted instead of prefixing the error with
:
. (#87) - Fixed a panic when
.String()
is called on an emptytftypes.Value
. (#86) - Fixed a panic when calling
tftypes.Value.As
and passing a pointer to an uninstantiated *big.Float. (#85) - Fixed a panic when calling
tftypes.Value.As
and passing a pointer to an uninstantiated *bool, *string, *map[string]Value or *[]Value. (#88) - Fixed a panic when comparing the empty value of a tftypes.Value to a non-empty value. (#90)
BREAKING CHANGES:
- Previously,
tftypes.NewValue
would panic if the Go type supplied wasn't a valid Go type for anytftypes.Type
. Nowtftypes.NewValue
will panic if the Go type supplied isn't a valid Go type for the specifictftypes.Type
supplied. (#67) - Removed support for
*float32
(andfloat32
, which was only documented and never implemented) when creating atftypes.Number
usingtftypes.NewValue
. We can't find a lossless way to convert afloat32
to a*big.Float
and so require provider developers to choose the lossy conversion they find acceptable. (#67) - Removed the now-unnecessary
tftypes.ValueComparer
helper, which helpedgithub.com/google/go-cmp
comparetftypes.Value
s.tftypes.Value
s now have anEqual
method thatgo-cmp
can use, and don't need any special options passed anymore. (#67) - The
tftypes
package has been moved to the root of the module and is no longer under thetfprotov5
package. Providers can automatically rewrite their import paths using a command likesed -i 's/"github.com\/hashicorp\/terraform-plugin-go\/tfprotov5\/tftypes"/"github.com\/hashicorp\/terraform-plugin-go\/tftypes"/g' **/*.go
on Unix-like systems. (#70) - With the release of Go 1.16, Go 1.15 is now the lowest supported version of Go to use with terraform-plugin-go. (#62)
tftypes.AttributePath
is now referenced as a pointer instead of a value pretty much everywhere it is used. This enables much more ergonomic use withtfprotov5.Diagnostic
values. (#68)tftypes.AttributePath
'sSteps
property is now internal-only. Usetftypes.AttributePath.Steps()
to access the list oftftypes.AttributePathSteps
, andtftypes.NewAttributePath
ortftypes.NewAttributePathWithSteps
to create a newtftypes.AttributePath
. (#68)tftypes.String
,tftypes.Number
,tftypes.Bool
, andtftypes.DynamicPseudoType
are now represented by a different Go type. Uses of==
andswitch
on them will no longer work. The recommended way to compare any type is usingIs
. (#58)tftypes.Value
s no longer have anIs
method. Usetftypes.Value.Type().Is
instead. (#58)- tftypes.AttributePath.WithAttributeName, WithElementKeyString, WithElementKeyInt, and WithElementKeyValue no longer accept pointers and mutate the AttributePath. They now copy the AttributePath, and return a version of it with the new AttributePathStep appended. (#60)
FEATURES:
- Added tftypes.Diff function to return the elements and attributes that are different between two tftypes.Values. (#60)
- Added tftypes.Walk and tftypes.Transform functions for the tftypes.Value type, allowing providers to traverse and mutate a tftypes.Value, respectively. (#60)
tftypes.Value
s now have aType
method, exposing theirtftypes.Type
. (#58)
ENHANCEMENTS:
- A number of methods in
tftypes
are benefitting from a better error message fortftypes.AttributePathError
s, which are returned in various places, and will now surface the path associated with the error as part of the error message. (#68) - Added Equal method to tftypes.Type implementations, allowing them to be compared using github.com/google/go-cmp. (#74)
- Added a Copy method to tftypes.Value, returning a clone of the tftypes.Value such that modifying the clone is guaranteed to not modify the original. (#60)
- Added a String method to tftypes.AttributePath to return a string representation of the tftypes.AttributePath. (#60)
- Added a String method to tftypes.Value, returning a string representation of the tftypes.Value. (#60)
- Added a
tftypes.ValidateValue
function that returns an error if the combination of thetftypes.Type
and Go type passed when panic when passed totftypes.NewValue
. (#67) - Added an Equal method to tftypes.AttributePath to compares two tftypes.AttributePaths. (#60)
- Added an Equal method to tftypes.Value to compare two tftypes.Values. (#60)
- Added support for OptionalAttributes to tftypes.Objects, allowing for objects with attributes that can be set or can be omitted. See https://www.terraform.io/docs/language/expressions/type-constraints.html#experimental-optional-object-type-attributes for more information on optional attributes in objects. (#74)
- Added support for
uint
,uint8
,uint16
,uint32
,uint64
,int
,int8
,int16
,int32
,int64
, andfloat64
conversions when creating atftypes.Number
withtftypes.NewValue
. These were mistakenly omitted previously. (#67) - Added support for version 6 of the Terraform protocol, in a new tfprotov6 package. (#71)
- Updated the String method of all tftypes.Type implementations to include any element or attribute types in the string as well. (#60)
tftypes.AttributePathError
is now exported. Provider developers can useerrors.Is
anderrors.As
to check fortftypes.AttributePathError
s,errors.Unwrap
to get to the underlying error, and thePath
property on atftypes.AttributePathError
to access thetftypes.AttributePath
the error is associated with.tftypes.AttributePath.NewError
andtftypes.AttributePath.NewErrorf
are still the supported ways to create atftypes.AttributePathError
. (#68)
BUG FIXES:
- Fixed a bug in
tftypes.Value.IsFullyKnown
that would cause a panic when callingIsFullyKnown
ontftypes.Value
with atftypes.Type
of Map, Object, List, Set, or Tuple if thetftypes.Value
was null. (#69) - Fixed a bug where
*uint8
,*uint16
, and*uint32
would be coerced toint64
s as part of their conversion intftypes.NewValue
. This may have had no impact, as all those types can be represented in anint64
, but to be sure our conversion is accurate, the conversion was fixed to convert them to auint64
instead. (#67)
BUG FIXES:
- Fixed a bug that could cause a crash when a provider was prematurely stopped. (#49)
ENHANCEMENTS:
tftypes.NewValue
can now accept a wider array of standard library types which will be automatically converted to their standard representation (#46] [#47)tfprotov5.RawState
now has anUnmarshal
method, just liketfprotov5.DynamicValue
, yielding atftypes.Value
. (#42)
Initial release.