From 2089228b23730be89008862b531b3fdf13c8bfc6 Mon Sep 17 00:00:00 2001 From: Austin Valle Date: Wed, 3 Sep 2025 10:09:36 -0400 Subject: [PATCH 1/2] update comments and pkg docs --- action/action.go | 3 - action/invoke.go | 4 +- action/modify_plan.go | 4 +- action/schema.go | 4 +- action/schema/doc.go | 4 +- action/schema/schema_type.go | 7 +-- go.mod | 22 +++---- go.sum | 66 +++++++++++---------- internal/fromproto5/invokeaction.go | 2 +- internal/fromproto5/planaction.go | 2 +- internal/fromproto5/validateactionconfig.go | 2 + internal/fromproto6/invokeaction.go | 2 +- internal/fromproto6/planaction.go | 2 +- internal/fromproto6/validateactionconfig.go | 2 + internal/fwserver/server_planaction.go | 2 +- internal/toproto5/action_schema.go | 2 +- internal/toproto5/invoke_action_event.go | 2 +- internal/toproto5/planaction.go | 2 +- internal/toproto6/action_schema.go | 2 +- internal/toproto6/invoke_action_event.go | 2 +- internal/toproto6/planaction.go | 2 +- 21 files changed, 67 insertions(+), 73 deletions(-) diff --git a/action/action.go b/action/action.go index a53b6d212..e060c6a11 100644 --- a/action/action.go +++ b/action/action.go @@ -42,9 +42,6 @@ type ActionWithModifyPlan interface { // during the apply phase with any unknown values from configuration // filled in with their final values. // - // Actions do not have computed attributes that can be modified during the plan, - // but linked and lifecycle actions can modify the plan of linked resources. - // // All action schema types can use the plan as an opportunity to raise early // diagnostics to practitioners, such as validation errors. ModifyPlan(context.Context, ModifyPlanRequest, *ModifyPlanResponse) diff --git a/action/invoke.go b/action/invoke.go index 2e86a509e..14ddfe126 100644 --- a/action/invoke.go +++ b/action/invoke.go @@ -14,7 +14,7 @@ type InvokeRequest struct { // Config is the configuration the user supplied for the action. Config tfsdk.Config - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced } // InvokeResponse represents a response to an InvokeRequest. An @@ -32,7 +32,7 @@ type InvokeResponse struct { // This function is pre-populated by the framework and can be called multiple times while action logic is running. SendProgress func(event InvokeProgressEvent) - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced } // InvokeProgressEvent is the event returned to Terraform while an action is being invoked. diff --git a/action/modify_plan.go b/action/modify_plan.go index 708656f33..86d4f7200 100644 --- a/action/modify_plan.go +++ b/action/modify_plan.go @@ -30,7 +30,7 @@ type ModifyPlanRequest struct { // from knowing the value at request time. Config tfsdk.Config - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced // ClientCapabilities defines optionally supported protocol features for the // PlanAction RPC, such as forward-compatible Terraform behavior changes. @@ -48,7 +48,7 @@ type ModifyPlanResponse struct { // generated. Diagnostics diag.Diagnostics - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced // Deferred indicates that Terraform should defer planning this // action until a follow-up apply operation. diff --git a/action/schema.go b/action/schema.go index d8bc1b72d..b6ba937d7 100644 --- a/action/schema.go +++ b/action/schema.go @@ -20,11 +20,9 @@ type SchemaResponse struct { // Schema is the schema of the action. // - // There are three different types of actions, which define how a practitioner can trigger an action, + // There is currently only one type of action, which defines how a practitioner can trigger an action, // as well as what effect the action can have on the state. // - [schema.UnlinkedSchema] actions are actions that cannot cause changes to resource states. - // - [schema.LifecycleSchema] actions are actions that can cause changes to exactly one resource state. - // - [schema.LinkedSchema] actions are actions that can cause changes to one or more resource states. Schema schema.SchemaType // Diagnostics report errors or warnings related to retrieving the action schema. diff --git a/action/schema/doc.go b/action/schema/doc.go index 2a8503c1a..8fc552bec 100644 --- a/action/schema/doc.go +++ b/action/schema/doc.go @@ -5,9 +5,7 @@ // Action schemas define the structure and value types for configuration data. // Schemas are implemented via the action.Action type Schema method. // -// There are three different types of action schemas, which define how a practitioner can trigger an action, +// There is currently one type of action schema, which defines how a practitioner can trigger an action, // as well as what effect the action can have on the state. // - [UnlinkedSchema] actions are actions that cannot cause changes to resource states. -// - [LifecycleSchema] actions are actions that can cause changes to exactly one resource state. -// - [LinkedSchema] actions are actions that can cause changes to one or more resource states. package schema diff --git a/action/schema/schema_type.go b/action/schema/schema_type.go index f9c5d689a..93bc8ddb5 100644 --- a/action/schema/schema_type.go +++ b/action/schema/schema_type.go @@ -10,18 +10,13 @@ import ( "github.com/hashicorp/terraform-plugin-framework/internal/fwschema" ) -// TODO:Actions: Implement lifecycle and linked schemas -// // SchemaType is the interface that an action schema type must implement. Action // schema types are statically definined in the protocol, so all implementations // are defined in this package. // // SchemaType implementations define how a practitioner can trigger an action, as well -// as what effect the action can have on the state. There are currently three different -// types of actions: +// as what effect the action can have on the state. There is currently only one type of action: // - [UnlinkedSchema] actions are actions that cannot cause changes to resource states. -// - [LifecycleSchema] actions are actions that can cause changes to exactly one resource state. -// - [LinkedSchema] actions are actions that can cause changes to one or more resource states. type SchemaType interface { fwschema.Schema diff --git a/go.mod b/go.mod index 42e35c907..ea64ddd89 100644 --- a/go.mod +++ b/go.mod @@ -6,29 +6,29 @@ toolchain go1.23.7 require ( github.com/google/go-cmp v0.7.0 - github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 + github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a github.com/hashicorp/terraform-plugin-log v0.9.0 ) require ( github.com/fatih/color v1.13.0 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-plugin v1.6.3 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/terraform-registry-address v0.3.0 // indirect + github.com/hashicorp/terraform-registry-address v0.4.0 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/oklog/run v1.0.0 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/net v0.41.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.26.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/text v0.28.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/grpc v1.75.0 // indirect + google.golang.org/protobuf v1.36.8 // indirect ) diff --git a/go.sum b/go.sum index 08319daaf..23b0bf1fc 100644 --- a/go.sum +++ b/go.sum @@ -15,22 +15,22 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0UUrwg= github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 h1:xeHlRQYev3iMXwX2W7+D1bSfLRBs9jojZXqE6hmNxMI= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1/go.mod h1:5pww/UULn9C2tItq6o5sbScEkJxBUt9X9kI4DkeRsIw= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a h1:PaFC8iFzSfP7dYTaFOF43aNdsAucQcnt7bWcteEvpxw= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a/go.mod h1:ALzufgzXQhdmGGUgpYRwUtBdMluh8cYn8vNnmQXxo5s= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-registry-address v0.3.0 h1:HMpK3nqaGFPS9VmgRXrJL/dzHNdheGVKk5k7VlFxzCo= -github.com/hashicorp/terraform-registry-address v0.3.0/go.mod h1:jRGCMiLaY9zii3GLC7hqpSnwhfnCN5yzvY0hh4iCGbM= +github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk= +github.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -42,8 +42,8 @@ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPn github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -56,34 +56,36 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/fromproto5/invokeaction.go b/internal/fromproto5/invokeaction.go index 85690b707..cfbf8b260 100644 --- a/internal/fromproto5/invokeaction.go +++ b/internal/fromproto5/invokeaction.go @@ -47,7 +47,7 @@ func InvokeActionRequest(ctx context.Context, proto5 *tfprotov5.InvokeActionRequ fw.Config = config - // TODO:Actions: Here we need to retrieve linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return fw, diags } diff --git a/internal/fromproto5/planaction.go b/internal/fromproto5/planaction.go index b01b0d410..ec1d32ae8 100644 --- a/internal/fromproto5/planaction.go +++ b/internal/fromproto5/planaction.go @@ -48,7 +48,7 @@ func PlanActionRequest(ctx context.Context, proto5 *tfprotov5.PlanActionRequest, fw.Config = config - // TODO:Actions: Here we need to retrieve linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return fw, diags } diff --git a/internal/fromproto5/validateactionconfig.go b/internal/fromproto5/validateactionconfig.go index d43a1115f..397599ea3 100644 --- a/internal/fromproto5/validateactionconfig.go +++ b/internal/fromproto5/validateactionconfig.go @@ -27,5 +27,7 @@ func ValidateActionConfigRequest(ctx context.Context, proto5 *tfprotov5.Validate fw.Config = config fw.Action = reqAction + // TODO:Actions: Add linked resource configs when new action schema types are introduced + return fw, diags } diff --git a/internal/fromproto6/invokeaction.go b/internal/fromproto6/invokeaction.go index 04ca704b4..6759531a7 100644 --- a/internal/fromproto6/invokeaction.go +++ b/internal/fromproto6/invokeaction.go @@ -47,7 +47,7 @@ func InvokeActionRequest(ctx context.Context, proto6 *tfprotov6.InvokeActionRequ fw.Config = config - // TODO:Actions: Here we need to retrieve linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return fw, diags } diff --git a/internal/fromproto6/planaction.go b/internal/fromproto6/planaction.go index 838698a87..0cb71e3dd 100644 --- a/internal/fromproto6/planaction.go +++ b/internal/fromproto6/planaction.go @@ -48,7 +48,7 @@ func PlanActionRequest(ctx context.Context, proto6 *tfprotov6.PlanActionRequest, fw.Config = config - // TODO:Actions: Here we need to retrieve linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return fw, diags } diff --git a/internal/fromproto6/validateactionconfig.go b/internal/fromproto6/validateactionconfig.go index 898aabf8d..9c1f36303 100644 --- a/internal/fromproto6/validateactionconfig.go +++ b/internal/fromproto6/validateactionconfig.go @@ -27,5 +27,7 @@ func ValidateActionConfigRequest(ctx context.Context, proto6 *tfprotov6.Validate fw.Config = config fw.Action = reqAction + // TODO:Actions: Add linked resource configs when new action schema types are introduced + return fw, diags } diff --git a/internal/fwserver/server_planaction.go b/internal/fwserver/server_planaction.go index 4ed956e20..38ab5b9ee 100644 --- a/internal/fwserver/server_planaction.go +++ b/internal/fwserver/server_planaction.go @@ -34,7 +34,7 @@ func (s *Server) PlanAction(ctx context.Context, req *PlanActionRequest, resp *P return } - // TODO:Actions: When linked resources are introduced, pass-through proposed -> planned state similar to + // TODO:Actions: When action schemas that use linked resources are introduced, pass-through proposed -> planned state similar to // how normal resource planning works. if s.deferred != nil { diff --git a/internal/toproto5/action_schema.go b/internal/toproto5/action_schema.go index 3b3296668..2b2139bfa 100644 --- a/internal/toproto5/action_schema.go +++ b/internal/toproto5/action_schema.go @@ -26,7 +26,7 @@ func ActionSchema(ctx context.Context, s actionschema.SchemaType) (*tfprotov5.Ac Schema: configSchema, } - // TODO:Actions: Implement linked and lifecycle action schema types + // TODO:Actions: Implement action schema types that can modify state switch s.(type) { case actionschema.UnlinkedSchema: result.Type = tfprotov5.UnlinkedActionSchemaType{} diff --git a/internal/toproto5/invoke_action_event.go b/internal/toproto5/invoke_action_event.go index d52e8a6eb..f858635a2 100644 --- a/internal/toproto5/invoke_action_event.go +++ b/internal/toproto5/invoke_action_event.go @@ -21,7 +21,7 @@ func ProgressInvokeActionEventType(ctx context.Context, event fwserver.InvokePro func CompletedInvokeActionEventType(ctx context.Context, event *fwserver.InvokeActionResponse) tfprotov5.InvokeActionEvent { return tfprotov5.InvokeActionEvent{ Type: tfprotov5.CompletedInvokeActionEventType{ - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced Diagnostics: Diagnostics(ctx, event.Diagnostics), }, } diff --git a/internal/toproto5/planaction.go b/internal/toproto5/planaction.go index 06f12faaf..2a50c500e 100644 --- a/internal/toproto5/planaction.go +++ b/internal/toproto5/planaction.go @@ -22,7 +22,7 @@ func PlanActionResponse(ctx context.Context, fw *fwserver.PlanActionResponse) *t Deferred: ActionDeferred(fw.Deferred), } - // TODO:Actions: Here we need to set linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return proto5 } diff --git a/internal/toproto6/action_schema.go b/internal/toproto6/action_schema.go index 94aaa7416..ce6e1be45 100644 --- a/internal/toproto6/action_schema.go +++ b/internal/toproto6/action_schema.go @@ -26,7 +26,7 @@ func ActionSchema(ctx context.Context, s actionschema.SchemaType) (*tfprotov6.Ac Schema: configSchema, } - // TODO:Actions: Implement linked and lifecycle action schema types + // TODO:Actions: Implement action schema types that can modify state switch s.(type) { case actionschema.UnlinkedSchema: result.Type = tfprotov6.UnlinkedActionSchemaType{} diff --git a/internal/toproto6/invoke_action_event.go b/internal/toproto6/invoke_action_event.go index c4410ae4e..921d46464 100644 --- a/internal/toproto6/invoke_action_event.go +++ b/internal/toproto6/invoke_action_event.go @@ -21,7 +21,7 @@ func ProgressInvokeActionEventType(ctx context.Context, event fwserver.InvokePro func CompletedInvokeActionEventType(ctx context.Context, event *fwserver.InvokeActionResponse) tfprotov6.InvokeActionEvent { return tfprotov6.InvokeActionEvent{ Type: tfprotov6.CompletedInvokeActionEventType{ - // TODO:Actions: Add linked resources once lifecycle/linked actions are implemented + // TODO:Actions: Add linked resources when new action schema types are introduced Diagnostics: Diagnostics(ctx, event.Diagnostics), }, } diff --git a/internal/toproto6/planaction.go b/internal/toproto6/planaction.go index 6411005f4..8dd6503c6 100644 --- a/internal/toproto6/planaction.go +++ b/internal/toproto6/planaction.go @@ -22,7 +22,7 @@ func PlanActionResponse(ctx context.Context, fw *fwserver.PlanActionResponse) *t Deferred: ActionDeferred(fw.Deferred), } - // TODO:Actions: Here we need to set linked resource data + // TODO:Actions: Add linked resources when new action schema types are introduced return proto6 } From ab8ef0cd4e579fd6cc1cd0dcc0504940dc7a176f Mon Sep 17 00:00:00 2001 From: Austin Valle Date: Mon, 8 Sep 2025 11:03:56 -0400 Subject: [PATCH 2/2] update plugin go --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ea64ddd89..a54cd014d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.7 require ( github.com/google/go-cmp v0.7.0 - github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a + github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250904144425-4c19f069077d github.com/hashicorp/terraform-plugin-log v0.9.0 ) diff --git a/go.sum b/go.sum index 23b0bf1fc..a8c7cadd0 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0U github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a h1:PaFC8iFzSfP7dYTaFOF43aNdsAucQcnt7bWcteEvpxw= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250903123823-f82f646e532a/go.mod h1:ALzufgzXQhdmGGUgpYRwUtBdMluh8cYn8vNnmQXxo5s= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250904144425-4c19f069077d h1:sr9OmOzsMvVLJNS03rXBaKlnN04dIbv3GIysvb29lEA= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250904144425-4c19f069077d/go.mod h1:ALzufgzXQhdmGGUgpYRwUtBdMluh8cYn8vNnmQXxo5s= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=