From 81555f5bb3bbc1ef2378d746e3457be24b873a43 Mon Sep 17 00:00:00 2001 From: Liam Cervante Date: Fri, 5 Apr 2024 17:44:21 +0200 Subject: [PATCH] Update docs to clarify cross-type moves (#34950) * Update docs to clarify cross-type moves * Apply suggestions from code review Co-authored-by: Brian McClain --------- Co-authored-by: Brian McClain --- .../docs/language/modules/develop/refactoring.mdx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/website/docs/language/modules/develop/refactoring.mdx b/website/docs/language/modules/develop/refactoring.mdx index 4be1c898bc..1344b0d791 100644 --- a/website/docs/language/modules/develop/refactoring.mdx +++ b/website/docs/language/modules/develop/refactoring.mdx @@ -103,11 +103,13 @@ so Terraform recognizes the move for all instances of the resource. That is, it covers both `aws_instance.a[0]` and `aws_instance.a[1]` without the need to identify each one separately. -Each resource type has a separate schema and so objects of different types -are not compatible. Therefore, although you can use `moved` to change the name -of a resource, you _cannot_ use `moved` to change to a different resource type -or to change a managed resource (a `resource` block) into a data resource -(a `data` block). +Each resource type has a separate schema so objects of different types +are not typically compatible. You can always use the `moved` block to change +the name of a resource, but some providers also let you change an object from +one resource type to another. Refer to the provider documentation for details +on which resources can move between types. You _cannot_ use the `moved` +block to change a managed resource (a `resource` block) into a data +resource (a `data` block). ## Enabling `count` or `for_each` For a Resource