Skip to content

delete

Usage

The rapd target command is used to delete Target resources.

Terminal window
rapd target delete (Name...) [flags]

Flags

These are the flags available in the rapd target delete command:

Flag NameShort NameDefault ValueRequiredDescription
--file-fNoSpecify a file or directory
--label-lNoDelete resources matching the specified label
--allforegroundNoDelete all objects under the specified resource
--cascade-ANoChoose the deletion strategy
--ignore-not-foundNoIgnore errors when the resource does not exist (returns exit code 0)
--waittrueNoWait for the resource deletion to complete
--timeoutNoWait for the specified timeout period
--approvedNoAutomatically approve resource deletion without confirmation (yes/no)

Deletion strategies (cascade):

  • foreground: Deletes the specified resource and waits for all child resources to be deleted.
  • background: Deletes the specified resource without waiting for child resources to be deleted.
  • orphan: Deletes the parent resource without automatically deleting its child resources.

Examples

Here are some examples of using the rapd target delete command:

  1. Delete a resource by name:
Terminal window
rapd target delete bind-gcp -e default-env
  1. Delete a resource specified by a file:
Terminal window
rapd target delete -f filename.yaml

Output

After successfully executing the command, the output will look similar to the following:

Terminal window
Deleting Target bind-gcp
Deleting Target bind-aws
Delete bind-gcp success
Delete bind-aws success
Delete Target, 2 success, failed