How do you move existing resources into a module without destroying them?

AdvancedConceptModules
Answer

Wrap the resources in the module, then add moved blocks in the root mapping old addresses to new ones.

moved {
  from = aws_s3_bucket.logs
  to   = module.logs.aws_s3_bucket.this
}

Plan must show moves and no replacements. For many resources or across state files, terraform state mv is the manual alternative.

All Terraform questions Roadmap: Terraform

More on Modules