Move content to another file

Apache 2.0

Move content to another HCL file, deleting it in the original file.

org.openrewrite.hcl.MoveContentToFile

Required

A JSONPath expression specifying the block to move.

The source path of the file from which content is being moved.

The source path of the file to move the content to.

mod run . --recipe=org.openrewrite.hcl.MoveContentToFile \ -P contentPath='$.provider' \ -P fromPath=from.tf \ -P destinationPath=to.tf

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.