You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [`action.Action` interface `Schema` method](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/action#Action.Schema) defines a [schema](/terraform/plugin/framework/handling-data/schemas) describing what data is available in the action configuration. An action itself does not have output data that can be referenced by other parts of a Terraform configuration.
46
46
47
-
### Unlinked action
47
+
### Action
48
48
49
-
An unlinked action is an action type that cannot make changes to state, which can be defined by using the [`schema.UnlinkedSchema`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/action/schema#UnlinkedSchema) type in the `Schema` field:
49
+
An action can be defined by using the [`schema.Schema`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/action/schema#Schema) type in the `Schema` field:
Unlinked actions can only return diagnostics and progress messages (during [`Invoke`](#invoke-method)). Unlinked actions still participate in planning operations
66
+
Actions can only return diagnostics and progress messages (during [`Invoke`](#invoke-method)). Actions still participate in planning operations
67
67
via [`ModifyPlan`](#modifyplan-method), which can be used as an "online" validation for the action configuration.
68
68
69
69
@@ -173,7 +173,7 @@ type DoThingActionModel struct {
Actions have a limited ability to participate in the planning process of Terraform, which is facilitated by the `PlanAction` RPC. As actions do not have any output data that can be consumed by
340
-
other parts of the Terraform configuration, the only impact an action can have on the plan is by returning diagnostics, like performing validation that requires API client access.
341
-
342
-
Action types that can modify resource state will be able to plan whatever changes are needed during the `PlanAction` RPC. These action types are not available in Terraform 1.14, but are planned for future releases.
340
+
other parts of the Terraform configuration, the only impact an action can have on the plan is by returning diagnostics, like performing validation that requires API client access. Actions are currently not able to propose resource state modifications during the plan, but future work is planned to support this.
343
341
344
342
Actions can participate in the planning operation of Terraform by implementing the [`action.ActionWithModifyPlan` interface](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework/action#ActionWithModifyPlan). For example:
Copy file name to clipboardExpand all lines: content/terraform-plugin-framework/v1.16.x/docs/plugin/framework/actions/index.mdx
+1-9Lines changed: 1 addition & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,7 @@ can use actions to express workflows that don't strictly fit into typical [CRUD
19
19
such as disaster recovery or ad-hoc maintenance. Actions can be invoked directly with the Terraform CLI or with
20
20
a trigger in a plan/apply workflow.
21
21
22
-
## Action types
23
-
24
-
Each action in a provider has a statically defined action type in the [schema](/terraform/plugin/framework/actions/implementation#schema-method), which informs Terraform how the action can be used
25
-
by the practitioner and what effect the action can have on [resource state](/terraform/plugin/framework/handling-data/terraform-concepts#state).
26
-
Currently, the only available action type is:
27
-
28
-
-[Unlinked](/terraform/plugin/framework/actions/implementation#unlinked-action) - An action type that cannot cause changes to state.
29
-
30
-
Action types that can modify resource state are not available in Terraform 1.14, but are planned for future releases.
22
+
Actions are currently not able to modify resource state, but future work is planned to support this.
0 commit comments