Skip to content

Commit

Permalink
website: Add links for SDKv2 resource data consistency errors page to…
Browse files Browse the repository at this point in the history
… migration guide (#819)

Reference: hashicorp/terraform-plugin-sdk#1229

Co-authored-by: Benjamin Bennett <[email protected]>
  • Loading branch information
bflad and bendbennett authored Aug 24, 2023
1 parent b5ccd8f commit 26b488a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions website/docs/plugin/framework/migrating/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ As you complete the migration, we recommend that you follow Test Driven Developm
Take the following steps when you migrate a provider from SDKv2 to the Framework:

- Ensure all [tests](/terraform/plugin/framework/migrating/testing#testing-migration) pass.
- Consider [finding SDKv2 resource data consistency errors](/terraform/plugin/sdkv2/resources/data-consistency-errors), which might affect migrating to the Framework. Some errors can be resolved and verified with SDKv2 code before migration, if desired, otherwise resolving these errors must be part of the migration.
- [Serve the provider](/terraform/plugin/framework/migrating/providers#serving-the-provider) via the Framework.
- Implement [muxing](/terraform/plugin/framework/migrating/mux), if you plan to migrate the provider iteratively.
- Update the [provider definition](/terraform/plugin/framework/migrating/providers#provider-definition) to use the Framework.
Expand Down
1 change: 1 addition & 0 deletions website/docs/plugin/framework/migrating/resources/crud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function. In the Framework, you must implement each of the CRUD lifecycle functi
`schema.ResourceData`. In the Framework, you get attribute values from the configuration and plan by accessing
`Config` and `Plan` on `resource.CreateRequest`. You set attribute values in Terraform's state by mutating `State`
on `resource.CreateResponse`.
- In SDKv2, certain resource schema definition and data consistency errors are only visible as Terraform warning logs by default. After migration, these errors will always be visible to practitioners and prevent further Terraform operations. The [SDKv2 resource data consistency errors documentation](/terraform/plugin/sdkv2/resources/data-consistency-errors) discusses how to find and potentially resolve these.
## Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ the `resource.Resource` interface, which includes a `Schema` method that returns
- SDKv2 implements a resource's CRUD operations as functions on the `schema.Resource`. In the Framework, you define a
type that implements the `resource.Resource` interface. The resource interface contains the functions that define your resource's
CRUD operations.
- SDKv2 by default demotes certain resource schema definition and data consistency errors to only be visible as Terraform warning logs. After migration, these errors will always be visible to practitioners and prevent further Terraform operations. The [SDKv2 resource data consistency errors documentation](/terraform/plugin/sdkv2/resources/data-consistency-errors) discusses how to find and potentially resolve these.

## Example

Expand Down

0 comments on commit 26b488a

Please sign in to comment.