Skip to content

Resources

Terminal window
layer resource [project] [options]
layer resource list [project] [options]
layer resource delete [project] (--resource <logical-id> | --all) [options]
OptionValueNotes
--env<name>Local state scope name.
--account-id<id>Cloudflare account id.
--resource<id>Resource logical id for delete.
--allDelete all retired or orphaned resources.
--show-migrationsShow migration resource rows.
--show-ownershipShow ownership metadata in resource list.
-h, --helpShow help.
Terminal window
layer scan [project] [options]
layer drift [project] [options]
layer reconcile [project] [options]
OptionValueNotes
--env<name>Local state scope name.
--account-id<id>Cloudflare account id.
--zone-id<id>Cloudflare zone id.
--app-name<name>Cloudflare Worker app name override.
-h, --helpShow help.
OptionModeNotes
--planplanShow reconcile plan.
--accept-cloudaccept-cloudAccept observed Cloudflare state into local state.
--restore-layeronrestore-layeronApply Layeron desired state back to Cloudflare.
--adoptadoptRecord tagged external resources as adopted.
--retireretireMark cloud-only tagged resources for manual cleanup.

layer destroy retires persistent resources by default. A retired resource remains in local deployment state and keeps enough provider metadata for manual cleanup.

Use layer resource delete to delete retired or orphaned resources after you have checked the retained data and provider state.