Skip to content

Commit 1b972ed

Browse files
committed
resolve PR comments
1 parent 70b2bc6 commit 1b972ed

File tree

13 files changed

+10
-25
lines changed

13 files changed

+10
-25
lines changed

action/action.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ type Action interface {
1212
// Metadata should return the full name of the action, such as examplecloud_do_thing.
1313
Metadata(context.Context, MetadataRequest, *MetadataResponse)
1414

15-
// Invoke is called to run the logic of the action and update linked resources if applicable.
16-
// Config, linked resource planned state, and linked resource prior state values should
17-
// be read from the InvokeRequest and new linked resource state values set on the InvokeResponse.
15+
// Invoke is called to run the logic of the action. Config values should be read from the InvokeRequest
16+
// and potential diagnostics set in InvokeResponse.
1817
//
1918
// The [InvokeResponse.SendProgress] function can be called in the Invoke method to immediately
2019
// report progress events related to the invocation of the action to Terraform.

action/invoke.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ type InvokeResponse struct {
2626

2727
// SendProgress will immediately send a progress update to Terraform core during action invocation.
2828
// This function is provided by the framework and can be called multiple times while action logic is running.
29-
//
30-
// TODO:Actions: More documentation about when you should use this / when you shouldn't
3129
SendProgress func(event InvokeProgressEvent)
3230
}
3331

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.24.2
66

77
require (
88
github.com/google/go-cmp v0.7.0
9-
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915191812-03e996589dc2
9+
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0
1010
github.com/hashicorp/terraform-plugin-log v0.9.0
1111
)
1212

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C
2525
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
2626
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915191812-03e996589dc2 h1:pIsyFp21b3YVOSd/94yiQI1MWXsBWTsSZ6Qj8/gkMc8=
2727
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915191812-03e996589dc2/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM=
28+
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0 h1:4dh8RXeFIH1v4mOgv70OvrbZWC5vDEWiEXIRFIA63S0=
29+
github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM=
2830
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
2931
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
3032
github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=

internal/fromproto5/invokeaction.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,5 @@ func InvokeActionRequest(ctx context.Context, proto5 *tfprotov5.InvokeActionRequ
4747

4848
fw.Config = config
4949

50-
// TODO:Actions: Add linked resources when new action schema types are introduced
51-
5250
return fw, diags
5351
}

internal/fromproto5/planaction.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,5 @@ func PlanActionRequest(ctx context.Context, proto5 *tfprotov5.PlanActionRequest,
4848

4949
fw.Config = config
5050

51-
// TODO:Actions: Add linked resources when new action schema types are introduced
52-
5351
return fw, diags
5452
}

internal/fromproto5/validateactionconfig.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ package fromproto5
66
import (
77
"context"
88

9+
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
10+
911
"github.com/hashicorp/terraform-plugin-framework/action"
1012
"github.com/hashicorp/terraform-plugin-framework/diag"
1113
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema"
1214
"github.com/hashicorp/terraform-plugin-framework/internal/fwserver"
13-
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
1415
)
1516

1617
// ValidateActionConfigRequest returns the *fwserver.ValidateActionConfigRequest
@@ -27,7 +28,5 @@ func ValidateActionConfigRequest(ctx context.Context, proto5 *tfprotov5.Validate
2728
fw.Config = config
2829
fw.Action = reqAction
2930

30-
// TODO:Actions: Add linked resource configs when new action schema types are introduced
31-
3231
return fw, diags
3332
}

internal/fromproto6/invokeaction.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,5 @@ func InvokeActionRequest(ctx context.Context, proto6 *tfprotov6.InvokeActionRequ
4747

4848
fw.Config = config
4949

50-
// TODO:Actions: Add linked resources when new action schema types are introduced
51-
5250
return fw, diags
5351
}

internal/fromproto6/planaction.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,5 @@ func PlanActionRequest(ctx context.Context, proto6 *tfprotov6.PlanActionRequest,
4848

4949
fw.Config = config
5050

51-
// TODO:Actions: Add linked resources when new action schema types are introduced
52-
5351
return fw, diags
5452
}

internal/fromproto6/validateactionconfig.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ package fromproto6
66
import (
77
"context"
88

9+
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
10+
911
"github.com/hashicorp/terraform-plugin-framework/action"
1012
"github.com/hashicorp/terraform-plugin-framework/diag"
1113
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema"
1214
"github.com/hashicorp/terraform-plugin-framework/internal/fwserver"
13-
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
1415
)
1516

1617
// ValidateActionConfigRequest returns the *fwserver.ValidateActionConfigRequest
@@ -27,7 +28,5 @@ func ValidateActionConfigRequest(ctx context.Context, proto6 *tfprotov6.Validate
2728
fw.Config = config
2829
fw.Action = reqAction
2930

30-
// TODO:Actions: Add linked resource configs when new action schema types are introduced
31-
3231
return fw, diags
3332
}

0 commit comments

Comments
 (0)