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
Documentation for mapping between SDKv2 and the Framework (#660)
* Adding table to provide mapping between SDKv2 schema validators and framework attribute and data source, provider and resource validators (#659)
* Adding a table to provide mapping between SDK schema fields and Framework (#659)
* Apply suggestions from code review
Co-authored-by: Brian Flad <[email protected]>
* Adding a table to provide mapping between SDK schema fields and Framework for Blocks (#659)
* Add import statements for usage of timeouts module (#659)
* Apply suggestions from code review
Co-authored-by: Brian Flad <[email protected]>
---------
Co-authored-by: Brian Flad <[email protected]>
Copy file name to clipboardExpand all lines: website/docs/plugin/framework/migrating/attributes-blocks/blocks.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,38 @@ This page explains how to migrate nested blocks that are not computed (i.e., do
14
14
[Blocks with Computed Fields](/plugin/framework/migrating/attributes-blocks/blocks-computed) for more details
15
15
about migrating nested blocks that contain fields that are computed.
16
16
17
+
The following table describes the mapping between [SDK Schema Fields](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/schema#Schema) and the Framework.
| Type |[ListNestedBlock](/plugin/framework/migrating/attributes-blocks/blocks), [SetNestedBlock](/plugin/framework/migrating/attributes-blocks/blocks)|
22
+
| ConfigMode | Schema must be explictly defined using [Attributes](/plugin/framework/migrating/attributes-blocks/attribute-schema) and [Blocks](/plugin/framework/migrating/attributes-blocks/blocks)|
| Computed |[Blocks with Computed Fields](/plugin/framework/migrating/attributes-blocks/blocks-computed)|
26
+
| ForceNew |[RequiresReplace](/plugin/framework/migrating/attributes-blocks/force-new) on `PlanModifiers` field on attribute within block or implementation of [ResourceWithModifyPlan](/plugin/framework/migrating/resources/plan-modification#framework) interface |
27
+
| DiffSuppressFunc |[PlanModifiers](/framework/migrating/resources/plan-modification#framework) field on attribute within block or implementation of [ResourceWithModifyPlan](/plugin/framework/migrating/resources/plan-modification#framework) interface |
28
+
| DiffSuppressOnRefresh |[Read](/plugin/framework/migrating/resources/crud) method on resource |
29
+
| Default |[PlanModifiers](/framework/migrating/resources/plan-modification#framework) field on attribute within block or implementation of [ResourceWithModifyPlan](/plugin/framework/migrating/resources/plan-modification#framework) interface |
30
+
| DefaultFunc |[PlanModifiers](/framework/migrating/resources/plan-modification#framework) field on attribute within block or implementation of [ResourceWithModifyPlan](/plugin/framework/migrating/resources/plan-modification#framework) interface |
31
+
| Description |`Description` field on block |
32
+
| InputDefault | N/A - no longer valid |
33
+
| StateFunc | Requires implementation of bespoke logic before storing state, for instance in resource [Create method](plugin/framework/migrating/resources/crud#framework-1)|
34
+
| Elem |`NestedObject` within block |
35
+
| MaxItems | Use [listValidator.SizeAtMost](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/listvalidator#SizeAtMost) or [setvalidator.SizeAtMost](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/setvalidator#SizeAtMost) on `Validators` field on `ListNestedBlock` or `SetNestedBlock`|
36
+
| MinItems | Use [listValidator.SizeAtLeast](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/listvalidator#SizeAtLeast) or [setvalidator.SizeAtLeast](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/setvalidator#SizeAtLeast) on `Validators` field on `ListNestedBlock` or `SetNestedBlock`|
0 commit comments