diff --git a/website/docs/plugin/framework/migrating/attributes-blocks/validators-custom.mdx b/website/docs/plugin/framework/migrating/attributes-blocks/validators-custom.mdx index d7f02a10b..419b35722 100644 --- a/website/docs/plugin/framework/migrating/attributes-blocks/validators-custom.mdx +++ b/website/docs/plugin/framework/migrating/attributes-blocks/validators-custom.mdx @@ -11,7 +11,7 @@ description: >- You can write custom validations that give users feedback about required syntax, types, and acceptable values in your provider. The Framework has a collection of [predefined validators](https://github.com/hashicorp/terraform-plugin-framework-validators). Refer to -[Predefined Validators](/plugin/framework/migrating/validators-predefined) to learn how to use them. +[Predefined Validators](/plugin/framework/migrating/attributes-blocks/validators-predefined) to learn how to use them. This page explains how to migrate attribute validation functions from SDKv2 to attribute validators in the Framework. @@ -58,7 +58,7 @@ Remember the following details when migrating from SDKv2 to the Framework. - In SDKv2, `ValidateDiagFunc` is a field on `schema.Schema` that you can use to define custom validation functions. In the Framework, `Validators` is a field on each `tfsdk.Attribute` struct that can be used for custom validations. -- Use [predefined validators](/plugin/framework/migrating/validators-predefined) when there is a validator that meets +- Use [predefined validators](/plugin/framework/migrating/attributes-blocks/validators-predefined) when there is a validator that meets your requirements. ## Example diff --git a/website/docs/plugin/framework/migrating/attributes-blocks/validators-predefined.mdx b/website/docs/plugin/framework/migrating/attributes-blocks/validators-predefined.mdx index d5873b6f6..efa5245c9 100644 --- a/website/docs/plugin/framework/migrating/attributes-blocks/validators-predefined.mdx +++ b/website/docs/plugin/framework/migrating/attributes-blocks/validators-predefined.mdx @@ -41,7 +41,7 @@ struct with types that satisfy the `tfsdk.AttributeValidator` interface. Validat predefined validators in SDKv2 are [available for the Framework](https://github.com/hashicorp/terraform-plugin-framework-validators). If the predefined validators do not meet your needs, you must define -[custom validators](/plugin/framework/migrating/validators-custom). +[custom validators](/plugin/framework/migrating/attributes-blocks/validators-custom). ```go func (d *resourceTypeExample) GetSchema(context.Context) (tfsdk.Schema, diag.Diagnostics) { @@ -83,7 +83,7 @@ available for the Framework: - [ExactlyOneOf](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/schemavalidator#ExactlyOneOf) - [AtLeastOneOf](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/schemavalidator#AtLeastOneOf) - [AlsoRequires](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-validators/schemavalidator#AlsoRequires) -- Define [custom validators](/plugin/framework/migrating/validators-custom) when the predefined validators do not meet +- Define [custom validators](/plugin/framework/migrating/attributes-blocks/validators-custom) when the predefined validators do not meet your requirements. ## Example diff --git a/website/docs/plugin/framework/migrating/providers/index.mdx b/website/docs/plugin/framework/migrating/providers/index.mdx index 26cf5d125..010c11a51 100644 --- a/website/docs/plugin/framework/migrating/providers/index.mdx +++ b/website/docs/plugin/framework/migrating/providers/index.mdx @@ -319,8 +319,8 @@ func (p *provider) GetSchema(ctx context.Context) (tfsdk.Schema, diag.Diagnostic } ``` -Refer to the [Attributes](/plugin/framework/migrating/attributes-blocks#attributes) and -[Blocks](/plugin/framework/migrating/attributes-blocks#blocks) pages in this migration guide to learn how to migrate +Refer to the [Attributes](/plugin/framework/migrating/attributes-blocks/attribute-schema) and +[Blocks](/plugin/framework/migrating/attributes-blocks/blocks) pages in this migration guide to learn how to migrate those fields to the Framework. ### Migration Notes diff --git a/website/docs/plugin/framework/migrating/resources/plan-modification.mdx b/website/docs/plugin/framework/migrating/resources/plan-modification.mdx index 7524de5e4..23a238b68 100644 --- a/website/docs/plugin/framework/migrating/resources/plan-modification.mdx +++ b/website/docs/plugin/framework/migrating/resources/plan-modification.mdx @@ -31,8 +31,8 @@ func resourceExample() *schema.Resource { In the Framework, you implement plan modification either by implementing the `ResourceWithModifyPlan` interface on your resource type, or by implementing `PlanModifiers` on individual attributes. This page demonstrates how to implement the plan modifiers on individual attributes. Refer to -[Attributes - Default Values](/plugin/framework/migrating/attributes#default-values) and -[Attributes - Force New](/plugin/framework/migrating/attributes#force-new) in this guide for further information on how +[Attributes - Default Values](/plugin/framework/migrating/attributes-blocks/default-values) and +[Attributes - Force New](/plugin/framework/migrating/attributes-blocks/force-new) in this guide for further information on how to implement a plan modifier on an attribute. The `ResourceWithModifyPlan` interface requires a `ModifyPlan` function.