Import and moved blocks

The import and moved blocks let you evolve a configuration without destroying resources. import attaches an existing resource to a Terraform address, moved indicates that a resource or module has changed address. They are written in code and checked with plan.

Example

moved { from = aws_s3_bucket.ancien to = aws_s3_bucket.logs }

Related concepts

The whole glossary