Skip to main content

Find dangling resources

For larger (and especially shared) Depot environments, it is sometimes possible for experimental or dev/feature branch deployments to fail and leave behind what we refer to as "dangling resources".

These resources are those which are still left over in the Depot configuration repository (CodeCommit), but which were actually deleted by CloudFormation during a stack's deployment rollback process for example.

The CLI's list-dangling-resources (or ldr alias for short) command can help you identify dangling resources for a target environment.

Usage

# list dangling resources and use your currently default Depot environment (stored in .depotrc config) and use specific AWS named profile
depot ldr --awsprofile my-profile

# list dangling resources for a targeted environment with id env123
depot list-dangling-resources --env env123

# list dangling resources and output verbose logging information
depot ldr --env env123 --verbose

# list dangling resources and filter with jq to see only the names (ids) of resources
depot ldr --env env123 | jq -r '.[].name'