open-consul/website/content/commands/peering/delete.mdx
Jeff Boruszak fe2f650240
docs: CLI page descriptions for automated checker (#16056)
* ACL

* ACL

* Catalog

* consul config

* consul connect

* top-level updates

* consul intention

* consul kv

* consul namespace

* consul peering

* consul peering delete

* consul services

* consul snapshot

* consul tls

* consul acl auth-method

* acl binding-rule

* acl policy

* acl role

* acl token

* fix

* standardization

* Update website/content/commands/snapshot/save.mdx

Co-authored-by: Bryce Kalow <bkalow@hashicorp.com>

* consul debug
consul keyring

Co-authored-by: Bryce Kalow <bkalow@hashicorp.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2023-01-26 12:42:13 -06:00

52 lines
1.6 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Peering Delete'
description: |
The `consul peering delete` command ends a cluster peering connection with another cluster.
---
# Consul Peering Delete
Command: `consul peering delete`
Corresponding HTTP API Endpoint: [\[DELETE\] /v1/peering/:name](/consul/api-docs/peering#delete-a-peering-connection)
The `peering delete` removes a peering connection with another cluster.
Consul deletes all data imported from the peer in the background.
The peering connection is removed after all associated data has been deleted.
Operators can still read the peering connections while the data is being removed.
The command adds a `DeletedAt` field to the peering connection object with the timestamp of when the peering was marked for deletion.
You can only use a peering token to establish the connection once. If you need to reestablish a peering connection, you must generate a new token.
The table below shows this command's [required ACLs](/consul/api-docs/api-structure#authentication).
| ACL Required |
| ------------ |
| `peering:write` |
## Usage
Usage: `consul peering delete [options] -name <peer name>`
#### Command Options
- `-name=<string>` - (Required) The name of the peer.
#### Enterprise Options
@include 'http_api_partition_options.mdx'
#### API Options
@include 'http_api_options_client.mdx'
## Examples
The following examples deletes a peering connection to a cluster locally referred to as "cluster-02":
```shell-session hideClipboard
$ consul peering delete -name cluster-02
Successfully submitted peering connection, cluster-02, for deletion
```