💾 Archived View for cfdocs.wetterberg.nu › refactor-stacks.gemini captured on 2024-03-21 at 15:24:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

Moving resources between stacks

Search

Using the `resource import` feature, you can move resources between, or *refactor*, stacks. You need to first add a `Retain` deletion policy to the resource you want to move to ensure that the resource is preserved when you remove it from the source stack and import it to the target stack.

Not all resources support import operations. See Resources that support import operations before you remove a resource from your stack. If you remove a resource that doesn't support import operations from your stack, you can't import the resource into another stack or bring it back into the source stack.

Resources that support import operations

Refactor a stack using the AWS Management Console

DeletionPolicy

Controlling access with AWS Identity and Access Management

stack-level tags

Refactor a stack using the AWS CLI

DeletionPolicy

stack-level tags

It's not necessary to run drift detection on the target stack after this import operation because the resource is already managed by AWS CloudFormation.