+
+
+
+ )
}
-export default NextApp
+App.getInitialProps = async function ({ Component, ctx }) {
+ let pageProps = {}
+
+ if (Component.getInitialProps) {
+ pageProps = await Component.getInitialProps(ctx)
+ } else if (Component.isMDXComponent) {
+ // fix for https://github.com/mdx-js/mdx/issues/382
+ const mdxLayoutComponent = Component({}).props.originalType
+ if (mdxLayoutComponent.getInitialProps) {
+ pageProps = await mdxLayoutComponent.getInitialProps(ctx)
+ }
+ }
+
+ return { pageProps }
+}
+
+export default App
diff --git a/website/pages/_error.jsx b/website/pages/_error.jsx
index 433da07d6f..a71e603878 100644
--- a/website/pages/_error.jsx
+++ b/website/pages/_error.jsx
@@ -1,13 +1,15 @@
-import React from 'react'
-import ErrorPage from 'next/error'
-import bugsnagClient from '../lib/bugsnag'
+import NotFound from './404'
+import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
-export default class Page extends React.Component {
- static async getInitialProps(ctx) {
- if (ctx.err) bugsnagClient.notify(ctx.err)
- return ErrorPage.getInitialProps(ctx)
- }
- render() {
- return
- }
+function Error({ statusCode }) {
+ console.log('this is working')
+ return
}
+
+Error.getInitialProps = ({ res, err }) => {
+ if (err) Bugsnag.notify(err)
+ const statusCode = res ? res.statusCode : err ? err.statusCode : 404
+ return { statusCode }
+}
+
+export default Error
diff --git a/website/pages/api-docs/acl-legacy.mdx b/website/pages/api-docs/acl-legacy.mdx
index 068d800e41..4a4f88ff6c 100644
--- a/website/pages/api-docs/acl-legacy.mdx
+++ b/website/pages/api-docs/acl-legacy.mdx
@@ -42,7 +42,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -108,7 +108,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -160,7 +160,7 @@ required.
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -202,7 +202,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/destroy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -241,7 +241,7 @@ Note: No ACL is required because the ACL is specified in the URL path.
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/info/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/clone/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -322,7 +322,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/list
```
@@ -373,7 +373,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/replication
```
diff --git a/website/pages/api-docs/acl/auth-methods.mdx b/website/pages/api-docs/acl/auth-methods.mdx
index eb4cc3e4a7..3a695dea5d 100644
--- a/website/pages/api-docs/acl/auth-methods.mdx
+++ b/website/pages/api-docs/acl/auth-methods.mdx
@@ -54,7 +54,7 @@ The table below shows this endpoint's support for
- `MaxTokenTTL` `(duration: 0s)` - This specifies the maximum life of any token
created by this auth method. When set it will initialize the
[`ExpirationTime`](/api/acl/tokens.html#expirationtime) field on all tokens
- to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
+ to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
persisted beyond its initial use. Can be specified in the form of `"60s"` or
`"5m"` (i.e., 60 seconds or 5 minutes, respectively). This value must be no
smaller than 1 minute and no longer than 24 hours. Added in Consul 1.8.0.
@@ -114,7 +114,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/auth-method
@@ -170,7 +170,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/auth-method/minikube
```
@@ -229,7 +229,7 @@ The table below shows this endpoint's support for
- `MaxTokenTTL` `(duration: 0s)` - This specifies the maximum life of any token
created by this auth method. When set it will initialize the
[`ExpirationTime`](/api/acl/tokens.html#expirationtime) field on all tokens
- to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
+ to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
persisted beyond its initial use. Can be specified in the form of `"60s"` or
`"5m"` (i.e., 60 seconds or 5 minutes, respectively). This value must be no
smaller than 1 minute and no longer than 24 hours. Added in Consul 1.8.0.
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/auth-method/minikube
@@ -349,7 +349,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/auth-method/minikube
```
@@ -389,7 +389,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/auth-methods
```
diff --git a/website/pages/api-docs/acl/binding-rules.mdx b/website/pages/api-docs/acl/binding-rules.mdx
index 1edaff87ee..c02af9542f 100644
--- a/website/pages/api-docs/acl/binding-rules.mdx
+++ b/website/pages/api-docs/acl/binding-rules.mdx
@@ -107,7 +107,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/binding-rule
@@ -161,7 +161,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
```
@@ -275,7 +275,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
@@ -330,7 +330,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
```
@@ -373,7 +373,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/binding-rules
```
diff --git a/website/pages/api-docs/acl/index.mdx b/website/pages/api-docs/acl/index.mdx
index 3e32facea6..15bbddf1a8 100644
--- a/website/pages/api-docs/acl/index.mdx
+++ b/website/pages/api-docs/acl/index.mdx
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -112,7 +112,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/acl/replication
@@ -213,7 +213,7 @@ agent "" {
### Sample Request
-```text
+```shell-session
$ curl -X POST -d @rules.hcl http://127.0.0.1:8500/v1/acl/rules/translate
```
@@ -252,7 +252,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/rules/translate/4f48f7e6-9359-4890-8e67-6144a962b0a5
```
@@ -320,7 +320,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -379,7 +379,7 @@ deleting a token for which you already must possess its secret.
### Sample Request
-```shell
+```shell-session
$ curl \
-H "X-Consul-Token: b78d37c7-0ca7-5f4d-99ee-6d9975ce4586" \
--request POST \
@@ -388,7 +388,10 @@ $ curl \
## OIDC Authorization URL Request
- This is an enterprise only endpoint. This feature is currently in beta.
+
+ {' '}
+ This is an enterprise only endpoint. This feature is currently in beta.{' '}
+
This endpoint was added in Consul 1.8.0 and is used to obtain an authorization
URL from Consul to start an [OIDC login flow](/docs/acl/auth-methods/oidc).
@@ -417,9 +420,9 @@ replication enabled.
### Parameters
- `AuthMethod` `(string: )` - The name of the auth method to use for
- login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
+ login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
-- `RedirectURI` `(string: )` - See [Redirect
+- `RedirectURI` `(string: )` - See [Redirect
URIs](/docs/acl/auth-methods/oidc#redirect-uris) for more information.
- `ClientNonce` `(string: "")` - Optional client-provided nonce that must match
@@ -447,7 +450,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -464,7 +467,10 @@ $ curl \
## OIDC Callback
- This is an enterprise only endpoint. This feature is currently in beta.
+
+ {' '}
+ This is an enterprise only endpoint. This feature is currently in beta.{' '}
+
This endpoint was added in Consul 1.8.0 and is used to exchange an OIDC
authorization code for an OIDC ID Token. The ID token will in turn be exchanged
@@ -494,7 +500,7 @@ replication enabled.
### Parameters
- `AuthMethod` `(string: )` - The name of the auth method to use for
- login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
+ login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
- `State` `(string: )` - Opaque state ID that is part of the
Authorization URL and will be included in the the redirect following
@@ -529,7 +535,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
diff --git a/website/pages/api-docs/acl/legacy.mdx b/website/pages/api-docs/acl/legacy.mdx
index 90e53f7c2c..49b8b7205d 100644
--- a/website/pages/api-docs/acl/legacy.mdx
+++ b/website/pages/api-docs/acl/legacy.mdx
@@ -60,7 +60,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -112,7 +112,7 @@ required.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -155,7 +155,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/destroy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -194,7 +194,7 @@ Note: No ACL is required because the ACL is specified in the URL path.
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/info/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -241,7 +241,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/clone/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -275,7 +275,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/list
```
diff --git a/website/pages/api-docs/acl/policies.mdx b/website/pages/api-docs/acl/policies.mdx
index 06f4ae4957..75f2f9f20a 100644
--- a/website/pages/api-docs/acl/policies.mdx
+++ b/website/pages/api-docs/acl/policies.mdx
@@ -68,7 +68,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/policy
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policy/e359bd81-baca-903e-7e64-1ccd9fdc78f5
```
@@ -170,7 +170,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policy/name/node-read
```
@@ -245,7 +245,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/policy/c01a1f82-44be-41b0-a686-685fb6e0f485
@@ -299,7 +299,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/policy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -339,7 +339,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policies
```
diff --git a/website/pages/api-docs/acl/roles.mdx b/website/pages/api-docs/acl/roles.mdx
index e61a9d67db..0b4797970c 100644
--- a/website/pages/api-docs/acl/roles.mdx
+++ b/website/pages/api-docs/acl/roles.mdx
@@ -96,7 +96,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/role
@@ -162,7 +162,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/role/aa770e5b-8b0b-7fcf-e5a1-8535fcc388b4
```
@@ -226,7 +226,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/role/name/example-role
```
@@ -326,7 +326,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/role/8bec74a4-5ced-45ed-9c9d-bca6153490bb
@@ -389,7 +389,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/role/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -434,7 +434,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/roles
```
diff --git a/website/pages/api-docs/acl/tokens.mdx b/website/pages/api-docs/acl/tokens.mdx
index deec7555b5..d49d5ef883 100644
--- a/website/pages/api-docs/acl/tokens.mdx
+++ b/website/pages/api-docs/acl/tokens.mdx
@@ -113,7 +113,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token
@@ -175,7 +175,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511
```
@@ -234,7 +234,7 @@ retrieving the data for a token that you must already possess its secret.
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: 6a1253d2-1785-24fd-91c2-f8e78c745511" \
http://127.0.0.1:8500/v1/acl/token/self
```
@@ -365,7 +365,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511
@@ -441,7 +441,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511/clone
@@ -510,7 +510,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/token/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -565,7 +565,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/tokens
```
diff --git a/website/pages/api-docs/agent/check.mdx b/website/pages/api-docs/agent/check.mdx
index fd441c1227..5976c1a1b5 100644
--- a/website/pages/api-docs/agent/check.mdx
+++ b/website/pages/api-docs/agent/check.mdx
@@ -43,7 +43,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/checks
```
@@ -220,7 +220,7 @@ The table below shows this endpoint's support for
"Shell": "/bin/bash",
"HTTP": "https://example.com",
"Method": "POST",
- "Header": { "Content-Type": ["application/json"]},
+ "Header": { "Content-Type": ["application/json"] },
"Body": "{\"check\":\"mem\"}",
"TCP": "example.com:22",
"Interval": "10s",
@@ -231,7 +231,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -265,7 +265,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/check/deregister/my-check-id
@@ -300,7 +300,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/pass/my-check-id
```
@@ -334,7 +334,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/warn/my-check-id
```
@@ -368,7 +368,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/fail/my-check-id
```
@@ -414,7 +414,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/agent/connect.mdx b/website/pages/api-docs/agent/connect.mdx
index 75aeb2cef8..dee7d3aa5b 100644
--- a/website/pages/api-docs/agent/connect.mdx
+++ b/website/pages/api-docs/agent/connect.mdx
@@ -76,7 +76,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/connect/ca/roots
```
@@ -190,7 +190,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/connect/ca/leaf/web
```
diff --git a/website/pages/api-docs/agent/index.mdx b/website/pages/api-docs/agent/index.mdx
index f4a9164a02..043fd734b6 100644
--- a/website/pages/api-docs/agent/index.mdx
+++ b/website/pages/api-docs/agent/index.mdx
@@ -53,7 +53,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/members
```
@@ -107,7 +107,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/self
```
@@ -187,7 +187,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/reload
@@ -230,7 +230,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/maintenance?enable=true&reason=For+API+docs
@@ -268,7 +268,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/metrics
```
@@ -397,7 +397,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/monitor
```
@@ -443,7 +443,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/join/1.2.3.4
```
@@ -474,7 +474,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/leave
@@ -515,7 +515,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/force-leave/agent-one
@@ -580,7 +580,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/agent/service.mdx b/website/pages/api-docs/agent/service.mdx
index a28685cbf4..d65072fa61 100644
--- a/website/pages/api-docs/agent/service.mdx
+++ b/website/pages/api-docs/agent/service.mdx
@@ -45,7 +45,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/services
```
@@ -155,7 +155,7 @@ only.
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/service/web-sidecar-proxy
```
@@ -614,7 +614,7 @@ For the `Connect` field, the parameters are:
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -650,7 +650,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/service/deregister/my-service-id
@@ -694,7 +694,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/service/maintenance/my-service-id?enable=true&reason=For+the+docs
diff --git a/website/pages/api-docs/catalog.mdx b/website/pages/api-docs/catalog.mdx
index 88f7ceb7c1..2dbdd18a4a 100644
--- a/website/pages/api-docs/catalog.mdx
+++ b/website/pages/api-docs/catalog.mdx
@@ -156,7 +156,7 @@ and vice versa. A catalog entry can have either, neither, or both.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -236,7 +236,7 @@ The behavior of the endpoint depends on what keys are provided.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -269,7 +269,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/datacenters
```
@@ -319,7 +319,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/nodes
```
@@ -409,7 +409,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/services?ns=foo
```
@@ -478,7 +478,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/service/my-service?ns=default
```
@@ -682,7 +682,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/node/my-node
```
@@ -810,7 +810,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/node-services/my-node
```
diff --git a/website/pages/api-docs/config.mdx b/website/pages/api-docs/config.mdx
index 075d74043e..e667c9d247 100644
--- a/website/pages/api-docs/config.mdx
+++ b/website/pages/api-docs/config.mdx
@@ -72,7 +72,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload \
@@ -123,7 +123,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/config/service-defaults/web
@@ -182,7 +182,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/config/service-defaults
@@ -253,7 +253,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/config/service-defaults/web
diff --git a/website/pages/api-docs/connect/ca.mdx b/website/pages/api-docs/connect/ca.mdx
index 91258b526d..113a4f65df 100644
--- a/website/pages/api-docs/connect/ca.mdx
+++ b/website/pages/api-docs/connect/ca.mdx
@@ -33,7 +33,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/ca/roots
```
@@ -85,7 +85,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/ca/configuration
```
@@ -157,7 +157,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/connect/intentions.mdx b/website/pages/api-docs/connect/intentions.mdx
index 3b3f6fd7bb..372bba61ca 100644
--- a/website/pages/api-docs/connect/intentions.mdx
+++ b/website/pages/api-docs/connect/intentions.mdx
@@ -79,7 +79,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -128,7 +128,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/intentions/e9ebc19f-d481-42b1-4871-4d298d3acd5c
```
@@ -190,7 +190,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
'http://127.0.0.1:8500/v1/connect/intentions?filter=SourceName==web'
```
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -329,7 +329,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/connect/intentions/e9ebc19f-d481-42b1-4871-4d298d3acd5c
@@ -378,7 +378,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/intentions/check?source=web&destination=db
```
@@ -431,7 +431,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/intentions/match?by=source&name=web
```
diff --git a/website/pages/api-docs/coordinate.mdx b/website/pages/api-docs/coordinate.mdx
index 5eadeb027e..50d795868a 100644
--- a/website/pages/api-docs/coordinate.mdx
+++ b/website/pages/api-docs/coordinate.mdx
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/datacenters
```
@@ -104,7 +104,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/nodes
```
@@ -161,7 +161,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/node/agent-one
```
@@ -229,7 +229,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/discovery-chain.mdx b/website/pages/api-docs/discovery-chain.mdx
index 7434586170..6ea256e67a 100644
--- a/website/pages/api-docs/discovery-chain.mdx
+++ b/website/pages/api-docs/discovery-chain.mdx
@@ -126,7 +126,7 @@ failover = {
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web
```
@@ -203,7 +203,7 @@ redirect {
Request:
-```text
+```shell-session
$ curl -X POST \
-d'
{
@@ -292,7 +292,7 @@ splits = [
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web?compile-dc=dc2
```
@@ -428,7 +428,7 @@ routes = [
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web
```
diff --git a/website/pages/api-docs/event.mdx b/website/pages/api-docs/event.mdx
index fc44eac54c..e93302b569 100644
--- a/website/pages/api-docs/event.mdx
+++ b/website/pages/api-docs/event.mdx
@@ -60,7 +60,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit...
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload \
@@ -122,7 +122,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/event/list
```
diff --git a/website/pages/api-docs/health.mdx b/website/pages/api-docs/health.mdx
index 3746f825ff..6a77876cc8 100644
--- a/website/pages/api-docs/health.mdx
+++ b/website/pages/api-docs/health.mdx
@@ -53,7 +53,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
-H "X-Consul-Namespace: *" \
http://127.0.0.1:8500/v1/health/node/my-node
@@ -157,7 +157,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/checks/my-service?ns=default
```
@@ -256,7 +256,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/service/my-service?ns=default
```
@@ -451,7 +451,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/state/passing?ns=default
```
diff --git a/website/pages/api-docs/index.mdx b/website/pages/api-docs/index.mdx
index 5a843b2fa9..c9c2b7fbd2 100644
--- a/website/pages/api-docs/index.mdx
+++ b/website/pages/api-docs/index.mdx
@@ -23,7 +23,7 @@ clients should communicate via TLS. If you don’t provide a token in the reques
Below is an example using `curl` with `X-Consul-Token`.
-```shell
+```shell-session
$ curl \
--header "X-Consul-Token: " \
http://127.0.0.1:8500/v1/agent/members
@@ -31,7 +31,7 @@ $ curl \
Below is an example using `curl` with Bearer scheme.
-```shell
+```shell-session
$ curl \
--header "Authorization: Bearer " \
http://127.0.0.1:8500/v1/agent/members
@@ -69,7 +69,7 @@ the `GET` operation reads an existing key.
Here is the same example using `curl`:
-```shell
+```shell-session
$ curl \
--request PUT \
--data 'hello consul' \
diff --git a/website/pages/api-docs/kv.mdx b/website/pages/api-docs/kv.mdx
index 3c1db7185d..e0c3f88b55 100644
--- a/website/pages/api-docs/kv.mdx
+++ b/website/pages/api-docs/kv.mdx
@@ -76,7 +76,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/kv/my-key
```
@@ -215,7 +215,7 @@ The payload is arbitrary, and is loaded directly into Consul as supplied.
### Sample Requests
-```bash
+```shell-session
$ curl \
--request PUT \
--data @contents \
@@ -272,7 +272,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/kv/my-key
diff --git a/website/pages/api-docs/namespaces.mdx b/website/pages/api-docs/namespaces.mdx
index 50dbc86dc8..a6dc14aef7 100644
--- a/website/pages/api-docs/namespaces.mdx
+++ b/website/pages/api-docs/namespaces.mdx
@@ -94,7 +94,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
-H "X-Consul-Token: 5cdcae6c-0cce-4210-86fe-5dff3b984a6e" \
--data @payload.json \
@@ -165,7 +165,7 @@ the request has been granted any access in the namespace (read, list or write).
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: b23b3cad-5ea1-4413-919e-c76884b9ad60" \
http://127.0.0.1:8500/v1/namespace/team-1
```
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
-H "X-Consul-Token: 5cdcae6c-0cce-4210-86fe-5dff3b984a6e" \
--data @payload.json \
@@ -364,7 +364,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
-H "X-Consul-Token: b23b3cad-5ea1-4413-919e-c76884b9ad60" \
http://127.0.0.1:8500/v1/namespace/team-1
@@ -431,7 +431,7 @@ the request has been granted any access in the namespace (read, list or write).
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: 0137db51-5895-4c25-b6cd-d9ed992f4a52" \
http://127.0.0.1:8500/v1/namespaces
```
diff --git a/website/pages/api-docs/operator/area.mdx b/website/pages/api-docs/operator/area.mdx
index eda90dc5b3..e668561736 100644
--- a/website/pages/api-docs/operator/area.mdx
+++ b/website/pages/api-docs/operator/area.mdx
@@ -79,7 +79,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area
```
@@ -174,7 +174,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -210,7 +210,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -256,7 +256,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -300,7 +300,7 @@ This can be provided as `IP`, `IP:port`, `hostname`, or `hostname:port`.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -365,7 +365,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/members
```
diff --git a/website/pages/api-docs/operator/autopilot.mdx b/website/pages/api-docs/operator/autopilot.mdx
index beb90c830c..3e5d765c75 100644
--- a/website/pages/api-docs/operator/autopilot.mdx
+++ b/website/pages/api-docs/operator/autopilot.mdx
@@ -46,7 +46,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/autopilot/configuration
```
@@ -173,7 +173,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/autopilot/health
```
diff --git a/website/pages/api-docs/operator/keyring.mdx b/website/pages/api-docs/operator/keyring.mdx
index 146d04a8fc..c9bc8264d4 100644
--- a/website/pages/api-docs/operator/keyring.mdx
+++ b/website/pages/api-docs/operator/keyring.mdx
@@ -48,7 +48,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/keyring
```
@@ -132,7 +132,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -178,7 +178,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -223,7 +223,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
--data @payload.json \
diff --git a/website/pages/api-docs/operator/license.mdx b/website/pages/api-docs/operator/license.mdx
index a919497c12..6986232f0f 100644
--- a/website/pages/api-docs/operator/license.mdx
+++ b/website/pages/api-docs/operator/license.mdx
@@ -40,7 +40,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/license
```
@@ -106,7 +106,7 @@ The payload is the raw license blob.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @consul.license \
@@ -169,7 +169,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/license
diff --git a/website/pages/api-docs/operator/raft.mdx b/website/pages/api-docs/operator/raft.mdx
index a70db4522d..483dcaacd3 100644
--- a/website/pages/api-docs/operator/raft.mdx
+++ b/website/pages/api-docs/operator/raft.mdx
@@ -48,7 +48,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/raft/configuration
```
@@ -141,7 +141,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/raft/peer?address=1.2.3.4:5678
diff --git a/website/pages/api-docs/operator/segment.mdx b/website/pages/api-docs/operator/segment.mdx
index 2965c7b854..f1d2acd892 100644
--- a/website/pages/api-docs/operator/segment.mdx
+++ b/website/pages/api-docs/operator/segment.mdx
@@ -47,7 +47,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/segment
```
diff --git a/website/pages/api-docs/query.mdx b/website/pages/api-docs/query.mdx
index 02d7bf8f3e..a2a3f3a740 100644
--- a/website/pages/api-docs/query.mdx
+++ b/website/pages/api-docs/query.mdx
@@ -278,7 +278,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -319,7 +319,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query
```
@@ -388,7 +388,7 @@ more information.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -425,7 +425,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -465,7 +465,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -523,7 +523,7 @@ be used.
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/execute?near=_agent
```
@@ -632,7 +632,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/explain
```
diff --git a/website/pages/api-docs/session.mdx b/website/pages/api-docs/session.mdx
index 806de02ea5..98a28c8895 100644
--- a/website/pages/api-docs/session.mdx
+++ b/website/pages/api-docs/session.mdx
@@ -80,7 +80,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -137,7 +137,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/session/destroy/adf4238a-882b-9ddc-4a9d-5b6758e4159e
@@ -183,7 +183,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/info/adf4238a-882b-9ddc-4a9d-5b6758e4159e
```
@@ -244,7 +244,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/node/node-abcd1234
```
@@ -299,7 +299,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/list
```
@@ -357,7 +357,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/session/renew/adf4238a-882b-9ddc-4a9d-5b6758e4159e
diff --git a/website/pages/api-docs/snapshot.mdx b/website/pages/api-docs/snapshot.mdx
index ab079c3b0b..a416ae01bd 100644
--- a/website/pages/api-docs/snapshot.mdx
+++ b/website/pages/api-docs/snapshot.mdx
@@ -60,7 +60,7 @@ The table below shows this endpoint's support for
With a custom datacenter:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/snapshot?dc=my-datacenter -o snapshot.tgz
```
@@ -103,7 +103,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data-binary @snapshot.tgz \
diff --git a/website/pages/api-docs/status.mdx b/website/pages/api-docs/status.mdx
index b4cdc21d4f..2e7d65ea3a 100644
--- a/website/pages/api-docs/status.mdx
+++ b/website/pages/api-docs/status.mdx
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/status/leader
```
@@ -79,7 +79,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/status/peers
```
diff --git a/website/pages/api-docs/txn.mdx b/website/pages/api-docs/txn.mdx
index efd60d8da3..ae12697463 100644
--- a/website/pages/api-docs/txn.mdx
+++ b/website/pages/api-docs/txn.mdx
@@ -172,7 +172,7 @@ atomic transaction. Up to 64 operations may be present in a single transaction.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/docs/acl/acl-legacy.mdx b/website/pages/docs/acl/acl-legacy.mdx
index 8e7054cecf..d6cda59388 100644
--- a/website/pages/docs/acl/acl-legacy.mdx
+++ b/website/pages/docs/acl/acl-legacy.mdx
@@ -306,7 +306,7 @@ In Consul 0.9.1 and later, you can use the [/v1/acl/bootstrap API](/api/acl/acl#
to make the initial master token, so a token never needs to be placed into a configuration
file. To use this approach, omit `acl_master_token` from the above config and then call the API:
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -337,7 +337,7 @@ own internal operations like updating its node information in the catalog and pe
[anti-entropy](/docs/internals/anti-entropy) syncing. We can create a token using the
ACL API, and the ACL master token we set in the previous step:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -367,7 +367,7 @@ configuration and restart the servers once more to apply it:
In Consul 0.9.1 and later you can also introduce the agent token using an API,
so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -402,7 +402,7 @@ with a configuration file that enables ACLs:
Similar to the previous example, in Consul 0.9.1 and later you can also introduce the
agent token using an API, so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -431,7 +431,7 @@ At this point ACLs are bootstrapped with ACL agent tokens configured, but there
other policies set up. Even basic operations like `consul members` will be restricted
by the ACL default policy of "deny":
-```
+```shell-session
$ consul members
```
@@ -441,7 +441,7 @@ see any nodes by default.
If we supply the token we created above we will be able to see a listing of nodes because
it has write privileges to an empty `node` prefix, meaning it has access to all nodes:
-```
+```shell-session
$ CONSUL_HTTP_TOKEN=fe3b8d40-0ee0-8783-6cc2-ab1aa9bb16c1 consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -454,7 +454,7 @@ configure Consul's behavior when no token is supplied. The anonymous token is ma
like any other ACL token, except that `anonymous` is used for the ID. In this example
we will give the anonymous token read privileges for all nodes:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -471,7 +471,7 @@ $ curl \
The anonymous token is implicitly used if no token is supplied, so now we can run
`consul members` without supplying a token and we will be able to see the nodes:
-```
+```shell-session
$ consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -481,7 +481,7 @@ node-2 127.0.0.2:8301 alive client 0.9.0dev 2 dc1
The anonymous token is also used for DNS lookups since there's no way to pass a
token as part of a DNS request. Here's an example lookup for the "consul" service:
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -507,7 +507,7 @@ consul. 0 IN SOA ns.consul. postmaster.consul. 14
Now we get an `NXDOMAIN` error because the anonymous token doesn't have access to the
"consul" service. Let's add that to the anonymous token's policy:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -523,7 +523,7 @@ $ curl \
With that new policy in place, the DNS lookup will succeed:
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -573,7 +573,7 @@ not function fully using the anonymous ACL token. It is recommended
that a UI-specific ACL token is used, which can be set in the UI during the
web browser session to authenticate the interface.
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -663,7 +663,7 @@ of the rules section.
Here's a sample request using the HCL form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
@@ -676,7 +676,7 @@ $ curl \
Here's an equivalent request using the JSON form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
diff --git a/website/pages/docs/acl/acl-migrate-tokens.mdx b/website/pages/docs/acl/acl-migrate-tokens.mdx
index 2319e6aa04..c31b5f04a1 100644
--- a/website/pages/docs/acl/acl-migrate-tokens.mdx
+++ b/website/pages/docs/acl/acl-migrate-tokens.mdx
@@ -167,7 +167,7 @@ potentially identical policies to manage or clean up later.
You can get the AccessorID of every legacy token from the API. For example,
using `curl` and `jq` in bash:
-```shell
+```shell-session
$ LEGACY_IDS=$(curl -sH "X-Consul-Token: $CONSUL_HTTP_TOKEN" \
'localhost:8500/v1/acl/tokens' | jq -r '.[] | select (.Legacy) | .AccessorID')
$ echo "$LEGACY_IDS"
@@ -188,7 +188,7 @@ done
Each policy now has an identical set of rules to the original token. You can
inspect these:
-```shell
+```shell-session
$ consul acl policy read -name migrated-621cbd12-dde7-de06-9be0-e28d067b5b7f
ID: 573d84bd-8b08-3061-e391-d2602e1b4947
Name: migrated-621cbd12-dde7-de06-9be0-e28d067b5b7f
@@ -230,7 +230,7 @@ manipulate policies.
You can get the AccessorID of every legacy token from the API. For example,
using `curl` and `jq` in bash:
-```shell
+```shell-session
$ LEGACY_IDS=$(curl -sH "X-Consul-Token: $CONSUL_HTTP_TOKEN" \
'localhost:8500/v1/acl/tokens' | jq -r '.[] | select (.Legacy) | .AccessorID')
$ echo "$LEGACY_IDS"
@@ -243,7 +243,7 @@ Now we want to read the actual policy for each legacy token and de-duplicate
them. We can use the `translate-rules` helper sub-command which will read the
token's policy and return a new ACL policy that is exactly equivalent.
-```shell
+```shell-session
$ for id in $LEGACY_IDS; do \
echo "Policy for $id:"
consul acl translate-rules -token-accessor "$id"; \
@@ -268,7 +268,7 @@ We can change the loop above to take a hash of this policy definition to
de-duplicate the policies into a set of files locally. This example uses command
available on macOS but equivalents for other platforms should be easy to find.
-```shell
+```shell-session
$ mkdir policies
$ for id in $LEGACY_IDS; do \
# Fetch the equivalent new policy rules based on the legacy token rules
@@ -290,7 +290,7 @@ You can now manually inspect and potentially edit these policies. For example we
could rename them according to their intended use. In this case we maintain the
hash as it will allow us to match tokens to policies later.
-```shell
+```shell-session
$ cat policies/024ce11f26f59436c518fb31f0999d1400485c17.hcl
service_prefix "bar" {
policy = "write"
@@ -304,7 +304,7 @@ You might also choose to tighten up the rules, for example if you know you never
rely on prefix-matching the service name `foo` you might choose to modify the
policy to use exact match.
-```shell
+```shell-session
$ cat policies/501b787c9444fbd62f346ab257eeb27197be2444.hcl
service_prefix "foo" {
policy = "write"
@@ -320,7 +320,7 @@ $ mv policies/501b787c9444fbd62f346ab257eeb27197be2444.hcl \
We now have a minimal set of policies to create, with human-readable names. We
can create each one with something like the following.
-```shell
+```shell-session
$ for p in $(ls policies | grep ".hcl"); do \
# Extract the hash part of the file name
HASH=$(echo "$p" | cut -d - -f 1); \
@@ -356,7 +356,7 @@ policy file names. The `-upgrade-legacy` flag removes the token's legacy
embedded rules at the same time as associating them with the new policies
created from those rules.
-```shell
+```shell-session
$ for id in $LEGACY_IDS; do \
NEW_POLICY=$(consul acl translate-rules -token-accessor "$id"); \
HASH=$(echo -n "$NEW_POLICY" | shasum | awk '{ print $1 }'); \
diff --git a/website/pages/docs/acl/acl-rules.mdx b/website/pages/docs/acl/acl-rules.mdx
index 9a7f1c518d..6671d6eaec 100644
--- a/website/pages/docs/acl/acl-rules.mdx
+++ b/website/pages/docs/acl/acl-rules.mdx
@@ -109,7 +109,7 @@ of the rules section of a policy.
Here's a sample request using the HCL form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
@@ -121,7 +121,7 @@ $ curl \
Here's an equivalent request using the JSON form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
diff --git a/website/pages/docs/acl/auth-methods/oidc.mdx b/website/pages/docs/acl/auth-methods/oidc.mdx
index ccbdd7696b..dd78df231b 100644
--- a/website/pages/docs/acl/auth-methods/oidc.mdx
+++ b/website/pages/docs/acl/auth-methods/oidc.mdx
@@ -55,7 +55,7 @@ parameters are required to properly configure an auth method of type
- `AllowedRedirectURIs` `(array)` - Comma-separated list of allowed
values for `redirect_uri`. Must be non-empty.
-- `ClaimMappings` `(map[string]string)` - Mappings of claims (key) that
+- `ClaimMappings` `(map[string]string)` - Mappings of claims (key) that
[will be copied to a metadata field](#trusted-identity-attributes-via-claim-mappings)
(value). Use this if the claim you are capturing is singular (such as an attribute).
@@ -79,7 +79,7 @@ parameters are required to properly configure an auth method of type
login; any match is sufficient.
- `VerboseOIDCLogging` `(bool: false)` - Log received OIDC tokens and claims when
- debug-level logging is active. Not recommended in production since sensitive
+ debug-level logging is active. Not recommended in production since sensitive
information may be present in OIDC responses.
### Sample Config
@@ -140,8 +140,7 @@ The "host:port" must be correct for the Consul agent serving the Consul UI.
#### CLI
-If you plan to support authentication via `consul login -type=oidc
--method=`, a localhost redirect URI must be set (usually this is
+If you plan to support authentication via `consul login -type=oidc -method=`, a localhost redirect URI must be set (usually this is
`http://localhost:8550/oidc/callback`). Logins via the CLI may specify a
different host and/or listening port if needed, and a URI with this host/port
must match one of the configured redirected URIs. These same "localhost" URIs
@@ -157,7 +156,7 @@ must be added to the provider as well.
#### CLI
-```
+```shell-session
$ consul login -method=oidc -type=oidc -token-sink-file=consul.token
Complete the login via your OIDC provider. Launching browser to:
diff --git a/website/pages/docs/agent/cloud-auto-join.mdx b/website/pages/docs/agent/cloud-auto-join.mdx
index b93f31a8a6..7742c42568 100644
--- a/website/pages/docs/agent/cloud-auto-join.mdx
+++ b/website/pages/docs/agent/cloud-auto-join.mdx
@@ -22,7 +22,7 @@ As of Consul 1.0 the values are taken literally and must not be URL
encoded. If the values contain spaces, equals, backslashes or double quotes then
they need to be double quoted and the usual escaping rules apply.
-```shell
+```shell-session
$ consul agent -retry-join 'provider=my-cloud config=val config2="some other val" ...'
```
@@ -50,7 +50,7 @@ provider.
This returns the first private IP address of all servers in the given
region which have the given `tag_key` and `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=aws tag_key=... tag_value=..."
```
@@ -88,7 +88,7 @@ This returns the first private IP address of all servers in the given region
which have the given `tag_key` and `tag_value` in the tenant and subscription, or in
the given `resource_group` of a `vm_scale_set` for Virtual Machine Scale Sets.
-```shell
+```shell-session
$ consul agent -retry-join "provider=azure tag_name=... tag_value=... tenant_id=... client_id=... subscription_id=... secret_access_key=..."
```
@@ -133,7 +133,7 @@ When using Virtual Machine Scale Sets the only role action needed is `Microsoft.
This returns the first private IP address of all servers in the given
project which have the given `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=gce project_name=... tag_value=..."
```
@@ -168,7 +168,7 @@ Credentials are searched using the following paths, in order of precedence.
This returns the first private IP address of all servers for the given
datacenter with the given `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=softlayer datacenter=... tag_value=... username=... api_key=..."
```
@@ -194,7 +194,7 @@ $ consul agent -retry-join "provider=softlayer datacenter=... tag_value=... user
This returns the first private IP address of all servers for the given
`region` with the given `tag_key` and `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=aliyun region=... tag_key=consul tag_value=... access_key_id=... access_key_secret=..."
```
@@ -221,7 +221,7 @@ It is recommended you make a dedicated key used to auto-join.
This returns the first private IP address of all servers for the given
`region` with the given `tag_name`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=digitalocean region=... tag_name=... api_token=..."
```
@@ -241,7 +241,7 @@ $ consul agent -retry-join "provider=digitalocean region=... tag_name=... api_to
This returns the first private IP address of all servers for the given
`region` with the given `tag_key` and `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=os tag_key=consul tag_value=server username=... password=... auth_url=..."
```
@@ -273,7 +273,7 @@ The configuration can also be provided by environment variables.
This returns the first private IP address of all servers for the given
`region` with the given `tag_name`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=scaleway organization=my-org tag_name=consul-server token=... region=..."
```
@@ -295,7 +295,7 @@ $ consul agent -retry-join "provider=scaleway organization=my-org tag_name=consu
This returns the first IP address of all servers for the given `region` with the given `tag_key` and `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=tencentcloud region=... tag_key=consul tag_value=... access_key_id=... access_key_secret=..."
```
@@ -322,7 +322,7 @@ It is recommended you make a dedicated key used to auto-join the Consul datacent
This returns the first PrimaryIP addresses for all servers with the given `tag_key` and `tag_value`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=triton account=testaccount url=https://us-sw-1.api.joyentcloud.com key_id=... tag_key=consul-role tag_value=server"
```
@@ -345,7 +345,7 @@ $ consul agent -retry-join "provider=triton account=testaccount url=https://us-s
This returns the first private IP address of all servers for the given region with the given `tag_name` and `category_name`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=vsphere category_name=consul-role tag_name=consul-server host=... user=... password=... insecure_ssl=[true|false]"
```
@@ -370,7 +370,7 @@ $ consul agent -retry-join "provider=vsphere category_name=consul-role tag_name=
This returns the first private IP address (or the IP address of `address type`) of all servers with the given `project` and `auth_token`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=packet auth_token=token project=uuid url=... address_type=..."
```
@@ -392,7 +392,7 @@ $ consul agent -retry-join "provider=packet auth_token=token project=uuid url=..
This returns the first private IP address of all servers for the given `region` with the given `tag_name`.
-```shell
+```shell-session
$ consul agent -retry-join "provider=linode region=us-east tag_name=consul-server"
```
@@ -429,7 +429,7 @@ gossip port (default behavior with all join requests). The pod may specify
the `consul.hashicorp.com/auto-join-port` annotation to set the port. The value
may be an integer or a named port.
-```shell
+```shell-session
$ consul agent -retry-join "provider=k8s label_selector=\"app=consul,component=server\""
```
diff --git a/website/pages/docs/agent/config-entries/index.mdx b/website/pages/docs/agent/config-entries/index.mdx
index cbcfc10d82..10e102377c 100644
--- a/website/pages/docs/agent/config-entries/index.mdx
+++ b/website/pages/docs/agent/config-entries/index.mdx
@@ -30,19 +30,19 @@ The supported `Kind` names for configuration entries are:
- [`proxy-defaults`](/docs/agent/config-entries/proxy-defaults) - controls
proxy configuration
-
+
- [`service-defaults`](/docs/agent/config-entries/service-defaults) - configures
defaults for all the instances of a given service
-
+
- [`service-resolver`](/docs/agent/config-entries/service-resolver) - matches
service instances with a specific Connect upstream discovery requests
-
+
- [`service-router`](/docs/agent/config-entries/service-router) - defines
where to send layer 7 traffic based on the HTTP route
- [`service-splitter`](/docs/agent/config-entries/service-splitter) - defines
how to divide requests for a single HTTP route based on percentages
-
+
- [`terminating-gateway`](/docs/agent/config-entries/terminating-gateway) - defines the
services associated with terminating gateway
@@ -76,7 +76,7 @@ Config {
Then to apply this configuration, run:
-```bash
+```shell-session
$ consul config write proxy-defaults.hcl
```
@@ -95,7 +95,7 @@ Consul's HTTP API.
Example:
-```bash
+```shell-session
$ consul config read -kind service-defaults -name web
{
"Kind": "service-defaults",
@@ -111,7 +111,7 @@ list out all the configuration entries for a given kind.
Example:
-```bash
+```shell-session
$ consul config list -kind service-defaults
web
api
@@ -125,7 +125,7 @@ to delete an entry by specifying both its `kind` and `name`.
Example:
-```bash
+```shell-session
$ consul config delete -kind service-defaults -name web
```
@@ -139,11 +139,11 @@ added in Consul 1.7.0.
Example:
-```bash
+```shell-session
$ consul config write service-defaults.hcl -namespace foo
```
-```bash
+```shell-session
$ consul config list -kind service-defaults -namespace foo
web
api
diff --git a/website/pages/docs/agent/dns.mdx b/website/pages/docs/agent/dns.mdx
index 315e08e49d..bd5f012542 100644
--- a/website/pages/docs/agent/dns.mdx
+++ b/website/pages/docs/agent/dns.mdx
@@ -40,7 +40,7 @@ domain to a Consul agent from the existing DNS server. Review the
You can experiment with Consul's DNS server on the command line using tools such as `dig`:
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 redis.service.dc1.consul. ANY
```
@@ -68,7 +68,7 @@ For a node lookup, the only records returned are A and AAAA records
containing the IP address, and TXT records containing the
`node_meta` values of the node.
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 foo.node.consul ANY
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 foo.node.consul ANY
@@ -146,7 +146,7 @@ provide the port that a service is registered on, enabling clients to avoid rely
on well-known ports. SRV records are only served if the client specifically requests
them, like so:
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul SRV
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul ANY
@@ -185,7 +185,7 @@ of the RFC style lookup is the same as the standard style of lookup.
If you registered the service `rabbitmq` on port 5672 and tagged it with `amqp`,
you could make an RFC 2782 query for its SRV record as `_rabbitmq._amqp.service.consul`:
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 _rabbitmq._amqp.service.consul SRV
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 _rabbitmq._amqp.service.consul ANY
diff --git a/website/pages/docs/agent/encryption.mdx b/website/pages/docs/agent/encryption.mdx
index db8088f6f7..5acf928d88 100644
--- a/website/pages/docs/agent/encryption.mdx
+++ b/website/pages/docs/agent/encryption.mdx
@@ -29,7 +29,7 @@ The key must be 32-bytes, Base64 encoded. As a convenience, Consul provides the
[`consul keygen`](/docs/commands/keygen) command to generate a
cryptographically suitable key:
-```text
+```shell-session
$ consul keygen
pUqJrVyVRj5jsiYEkM/tFQYfWyJIv4s3XkvDwy7Cu5s=
```
@@ -37,7 +37,7 @@ pUqJrVyVRj5jsiYEkM/tFQYfWyJIv4s3XkvDwy7Cu5s=
With that key, you can enable encryption on the agent. If encryption is enabled,
the output of [`consul agent`](/docs/commands/agent) will include "Encrypt: true":
-```text
+```shell-session
$ cat encrypt.json
{"encrypt": "pUqJrVyVRj5jsiYEkM/tFQYfWyJIv4s3XkvDwy7Cu5s="}
diff --git a/website/pages/docs/agent/index.mdx b/website/pages/docs/agent/index.mdx
index a39509290c..7d27e71aa2 100644
--- a/website/pages/docs/agent/index.mdx
+++ b/website/pages/docs/agent/index.mdx
@@ -33,7 +33,7 @@ of [`configuration options`](/docs/agent/options#command-line-options), but most
When running [`consul agent`](/docs/commands/agent), you should see output similar to this:
-```text
+```shell-session
$ consul agent -data-dir=/tmp/consul
==> Starting Consul agent...
==> Consul agent running!
diff --git a/website/pages/docs/agent/watches.mdx b/website/pages/docs/agent/watches.mdx
index a8cdce18f8..333a1b19f6 100644
--- a/website/pages/docs/agent/watches.mdx
+++ b/website/pages/docs/agent/watches.mdx
@@ -137,7 +137,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=key -key=foo/bar/baz /usr/bin/my-key-handler.sh
```
@@ -176,7 +176,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=keyprefix -prefix=foo/ /usr/bin/my-prefix-handler.sh
```
@@ -307,13 +307,13 @@ Or, using the watch command:
Single tag:
-```shell
+```shell-session
$ consul watch -type=service -service=redis -tag=bar /usr/bin/my-service-handler.sh
```
Multiple tag:
-```shell
+```shell-session
$ consul watch -type=service -service=redis -tag=bar -tag=foo /usr/bin/my-service-handler.sh
```
@@ -392,13 +392,13 @@ Or, using the watch command:
State:
-```shell
+```shell-session
$ consul watch -type=checks -state=passing /usr/bin/my-check-handler.sh -passing
```
Service:
-```shell
+```shell-session
$ consul watch -type=checks -service=redis /usr/bin/my-check-handler.sh -redis
```
@@ -440,7 +440,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=event -name=web-deploy /usr/bin/my-event-handler.sh -web-deploy
```
@@ -464,6 +464,6 @@ An example of the output of this command:
To fire a new `web-deploy` event the following could be used:
-```shell
+```shell-session
$ consul event -name=web-deploy 1609030
```
diff --git a/website/pages/docs/commands/acl/auth-method/create.mdx b/website/pages/docs/commands/acl/auth-method/create.mdx
index afe6620cf2..de957da89a 100644
--- a/website/pages/docs/commands/acl/auth-method/create.mdx
+++ b/website/pages/docs/commands/acl/auth-method/create.mdx
@@ -71,7 +71,7 @@ Usage: `consul acl auth-method create [options] [args]`
Create a new Kubernetes auth method:
-```shell
+```shell-session
$ consul acl auth-method create -name minikube -type kubernetes \
-description 'minikube auth method' \
-kubernetes-host 'https://192.0.2.42:8443' \
diff --git a/website/pages/docs/commands/acl/auth-method/delete.mdx b/website/pages/docs/commands/acl/auth-method/delete.mdx
index 2b99d4ca84..a4de93e921 100644
--- a/website/pages/docs/commands/acl/auth-method/delete.mdx
+++ b/website/pages/docs/commands/acl/auth-method/delete.mdx
@@ -32,7 +32,7 @@ Usage: `consul acl auth-method delete [options]`
Delete an auth method:
-```shell
+```shell-session
$ consul acl auth-method delete -name minikube
Auth-method "minikube" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/auth-method/index.mdx b/website/pages/docs/commands/acl/auth-method/index.mdx
index ef180c6c0b..05431814fd 100644
--- a/website/pages/docs/commands/acl/auth-method/index.mdx
+++ b/website/pages/docs/commands/acl/auth-method/index.mdx
@@ -45,7 +45,7 @@ of the subcommand in the sidebar.
Create a new auth method:
-```shell
+```shell-session
$ consul acl auth-method create -type "kubernetes" \
-name "my-k8s" \
-description "This is an example kube auth method" \
@@ -56,13 +56,13 @@ $ consul acl auth-method create -type "kubernetes" \
List all auth methods:
-```shell
+```shell-session
$ consul acl auth-method list
```
Update all editable fields of the auth method:
-```shell
+```shell-session
$ consul acl auth-method update -name "my-k8s" \
-description "new description" \
-kubernetes-host "https://new-apiserver.example.com:8443" \
@@ -72,12 +72,12 @@ $ consul acl auth-method update -name "my-k8s" \
Read an auth method:
-```shell
+```shell-session
$ consul acl auth-method read -name my-k8s
```
Delete an auth method:
-```shell
+```shell-session
$ consul acl auth-method delete -name my-k8s
```
diff --git a/website/pages/docs/commands/acl/auth-method/list.mdx b/website/pages/docs/commands/acl/auth-method/list.mdx
index 4e3165665c..fd15ce18f5 100644
--- a/website/pages/docs/commands/acl/auth-method/list.mdx
+++ b/website/pages/docs/commands/acl/auth-method/list.mdx
@@ -35,7 +35,7 @@ Usage: `consul acl auth-method list`
Default listing.
-```shell
+```shell-session
$ consul acl auth-method list
minikube:
Type: kubernetes
@@ -47,7 +47,7 @@ minikube-two:
Show Metadata.
-```shell
+```shell-session
$ consul acl auth-method list -meta
minikube:
Type: kubernetes
diff --git a/website/pages/docs/commands/acl/auth-method/read.mdx b/website/pages/docs/commands/acl/auth-method/read.mdx
index d403cfb67c..14442da664 100644
--- a/website/pages/docs/commands/acl/auth-method/read.mdx
+++ b/website/pages/docs/commands/acl/auth-method/read.mdx
@@ -37,7 +37,7 @@ Usage: `consul acl auth-method read [options] [args]`
Get auth method details:
-```shell
+```shell-session
$ consul acl auth-method read -name minikube
Name: minikube
Type: kubernetes
diff --git a/website/pages/docs/commands/acl/auth-method/update.mdx b/website/pages/docs/commands/acl/auth-method/update.mdx
index 147bea76cc..16d2f29181 100644
--- a/website/pages/docs/commands/acl/auth-method/update.mdx
+++ b/website/pages/docs/commands/acl/auth-method/update.mdx
@@ -76,7 +76,7 @@ Usage: `consul acl auth-method update [options] [args]`
Update an auth method:
-```shell
+```shell-session
$ consul acl auth-method update -name minikube \
-description 'dev cluster' \
-kubernetes-host 'https://192.0.2.44:8443'
diff --git a/website/pages/docs/commands/acl/binding-rule/create.mdx b/website/pages/docs/commands/acl/binding-rule/create.mdx
index fa7fb51e5b..6324d30423 100644
--- a/website/pages/docs/commands/acl/binding-rule/create.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/create.mdx
@@ -48,7 +48,7 @@ Usage: `consul acl binding-rule create [options] [args]`
Create a new binding rule that binds to a service identity:
-```shell
+```shell-session
$ consul acl binding-rule create -method 'minikube' \
-description 'wildcard service' \
-bind-type 'service' \
@@ -64,7 +64,7 @@ Selector: serviceaccount.namespace==default and serviceaccount.name!=vault
Create a new binding rule that binds to a role:
-```shell
+```shell-session
$ consul acl binding-rule create -method 'minikube' \
-description 'just vault role' \
-bind-type 'role' \
diff --git a/website/pages/docs/commands/acl/binding-rule/delete.mdx b/website/pages/docs/commands/acl/binding-rule/delete.mdx
index 32183586b8..e95ef986ba 100644
--- a/website/pages/docs/commands/acl/binding-rule/delete.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/delete.mdx
@@ -33,7 +33,7 @@ Usage: `consul acl binding-rule delete [options]`
Delete a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule delete -id 0ec1bd
Binding rule "0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/binding-rule/index.mdx b/website/pages/docs/commands/acl/binding-rule/index.mdx
index ea9a41f54d..bd12614808 100644
--- a/website/pages/docs/commands/acl/binding-rule/index.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/index.mdx
@@ -55,7 +55,7 @@ resolved to the full UUID and used.
Create a new binding rule:
-```shell
+```shell-session
$ consul acl binding-rule create \
-method=minikube \
-bind-type=service \
@@ -65,25 +65,25 @@ $ consul acl binding-rule create \
List all binding rules:
-```shell
+```shell-session
$ consul acl binding-rule list
```
Update a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule update -id=43cb72df-9c6f-4315-ac8a-01a9d98155ef \
-bind-name='k8s-${serviceaccount.name}'
```
Read a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule read -id fdabbcb5-9de5-4b1a-961f-77214ae88cba
```
Delete a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule delete -id b6b856da-5193-4e78-845a-7d61ca8371ba
```
diff --git a/website/pages/docs/commands/acl/binding-rule/list.mdx b/website/pages/docs/commands/acl/binding-rule/list.mdx
index faea261a1c..97fd981888 100644
--- a/website/pages/docs/commands/acl/binding-rule/list.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/list.mdx
@@ -35,7 +35,7 @@ Usage: `consul acl binding-rule list`
Default listing.
-```shell
+```shell-session
$ consul acl binding-rule list
0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890:
AuthMethod: minikube
@@ -53,7 +53,7 @@ e21ae868-7b13-a230-0235-f8e83510642c:
Show Metadata.
-```shell
+```shell-session
$ consul acl binding-rule list -meta
0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890:
AuthMethod: minikube
diff --git a/website/pages/docs/commands/acl/binding-rule/read.mdx b/website/pages/docs/commands/acl/binding-rule/read.mdx
index 7e7584397f..ec1c06bbc9 100644
--- a/website/pages/docs/commands/acl/binding-rule/read.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/read.mdx
@@ -38,7 +38,7 @@ Usage: `consul acl binding-rule read [options] [args]`
Get binding rule details:
-```shell
+```shell-session
$ consul acl binding-rule read -id '0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890'
ID: 0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890
AuthMethod: minikube
diff --git a/website/pages/docs/commands/acl/binding-rule/update.mdx b/website/pages/docs/commands/acl/binding-rule/update.mdx
index b61353545d..9b63735c34 100644
--- a/website/pages/docs/commands/acl/binding-rule/update.mdx
+++ b/website/pages/docs/commands/acl/binding-rule/update.mdx
@@ -55,7 +55,7 @@ Usage: `consul acl binding-rule update [options] [args]`
Update a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule update -id '0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890' \
-selector 'serviceaccount.namespace==default'
Binding rule updated successfully
diff --git a/website/pages/docs/commands/acl/index.mdx b/website/pages/docs/commands/acl/index.mdx
index c0eb332b61..c9d319bf19 100644
--- a/website/pages/docs/commands/acl/index.mdx
+++ b/website/pages/docs/commands/acl/index.mdx
@@ -17,7 +17,7 @@ ACLs are also accessible via the [HTTP API](/api/acl/acl).
Bootstrap Consul's ACLs:
-```shell
+```shell-session
$ consul acl bootstrap
AccessorID: 4d123dff-f460-73c3-02c4-8dd64d136e01
SecretID: 86cddfb9-2760-d947-358d-a2811156bf31
@@ -30,7 +30,7 @@ Policies:
Create a policy:
-```shell
+```shell-session
$ consul acl policy create -name "acl-replication" -description "Token capable of replicating ACL policies" -rules 'acl = "read"'
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -42,7 +42,7 @@ acl = "read"
Create a token:
-```shell
+```shell-session
$ consul acl token create -description "Agent Policy Replication - my-agent" -policy-name "acl-replication"
AccessorID: c24c11aa-4e08-e25c-1a67-705a2e8d75a4
SecretID: e7024f9c-f016-02dd-6217-daedbffb86ac
diff --git a/website/pages/docs/commands/acl/policy/create.mdx b/website/pages/docs/commands/acl/policy/create.mdx
index 57f3fcff44..58a3309c7b 100644
--- a/website/pages/docs/commands/acl/policy/create.mdx
+++ b/website/pages/docs/commands/acl/policy/create.mdx
@@ -66,7 +66,7 @@ Usage: `consul acl policy create [options] [args]`
Create a new policy that is valid in all datacenters:
-```shell
+```shell-session
$ consul acl policy create -name "acl-replication" -description "Policy capable of replicating ACL policies" -rules 'acl = "read"'
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -78,7 +78,7 @@ acl = "read"
Create a new policy valid only in specific datacenters with rules read from a file:
-```shell
+```shell-session
$ consul acl policy create -name "replication" -description "Replication" -rules @rules.hcl -valid-datacenter dc1 -valid-datacenter dc2
ID: ca44555b-a2d8-94de-d763-88caffdaf11f
Name: replication
@@ -94,7 +94,7 @@ service_prefix "" {
Create a new policy with rules equivalent to that of a legacy ACL token:
-```shell
+```shell-session
$ consul acl policy create -name "node-services-read" -from-token 5793a5ce -description "Can read any node and service"
ID: 06acc965-df4b-5a99-58cb-3250930c6324
Name: node-services-read
diff --git a/website/pages/docs/commands/acl/policy/delete.mdx b/website/pages/docs/commands/acl/policy/delete.mdx
index e04347464c..8c6af9644e 100644
--- a/website/pages/docs/commands/acl/policy/delete.mdx
+++ b/website/pages/docs/commands/acl/policy/delete.mdx
@@ -35,14 +35,14 @@ Usage: `consul acl policy delete [options]`
Delete a policy:
-```shell
+```shell-session
$ consul acl policy delete -id 35b8
Policy "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
Delete a policy by name:
-```shell
+```shell-session
$ consul acl policy delete -name acl-replication
Policy "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/policy/index.mdx b/website/pages/docs/commands/acl/policy/index.mdx
index c9081a56e1..2acf08d24e 100644
--- a/website/pages/docs/commands/acl/policy/index.mdx
+++ b/website/pages/docs/commands/acl/policy/index.mdx
@@ -63,7 +63,7 @@ Builtin policies:
Create a new ACL policy:
-```shell
+```shell-session
$ consul acl policy create -name "new-policy" \
-description "This is an example policy" \
-datacenter "dc1" \
@@ -73,24 +73,24 @@ $ consul acl policy create -name "new-policy" \
List all policies:
-```shell
+```shell-session
$ consul acl policy list
```
Update a policy:
-```shell
+```shell-session
$ consul acl policy update -name "other-policy" -datacenter "dc1"
```
Read a policy:
-```shell
+```shell-session
$ consul acl policy read -id 0479e93e-091c-4475-9b06-79a004765c24
```
Delete a policy
-```shell
+```shell-session
$ consul acl policy delete -name "my-policy"
```
diff --git a/website/pages/docs/commands/acl/policy/list.mdx b/website/pages/docs/commands/acl/policy/list.mdx
index 710aed87ad..c29d2c1257 100644
--- a/website/pages/docs/commands/acl/policy/list.mdx
+++ b/website/pages/docs/commands/acl/policy/list.mdx
@@ -35,7 +35,7 @@ Usage: `consul acl policy list`
Default listing.
-```shell
+```shell-session
$ consul acl policy list
global-management:
ID: 00000000-0000-0000-0000-000000000001
@@ -49,7 +49,7 @@ acl-replication:
Show Metadata.
-```shell
+```shell-session
$ consul acl policy list -meta
global-management:
ID: 00000000-0000-0000-0000-000000000001
diff --git a/website/pages/docs/commands/acl/policy/read.mdx b/website/pages/docs/commands/acl/policy/read.mdx
index 461a97ebc8..75eedb0629 100644
--- a/website/pages/docs/commands/acl/policy/read.mdx
+++ b/website/pages/docs/commands/acl/policy/read.mdx
@@ -40,7 +40,7 @@ Usage: `consul acl policy read [options] [args]`
Get policy details:
-```shell
+```shell-session
$ consul acl policy read -id 00000000-0000-0000-0000-000000000001
ID: 00000000-0000-0000-0000-000000000001
Name: global-management
@@ -77,7 +77,7 @@ session_prefix "" {
Get policy details by name:
-```shell
+```shell-session
$ consul acl policy read -name "acl-replication"
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -91,7 +91,7 @@ Get policy details (Builtin Policies):
Builtin policies can be accessed by specifying their original name as the value to the `-id` parameter.
-```shell
+```shell-session
$ consul acl policy read -id global-management
ID: 00000000-0000-0000-0000-000000000001
Name: global-management
diff --git a/website/pages/docs/commands/acl/policy/update.mdx b/website/pages/docs/commands/acl/policy/update.mdx
index 247b43a178..5b1e9e945c 100644
--- a/website/pages/docs/commands/acl/policy/update.mdx
+++ b/website/pages/docs/commands/acl/policy/update.mdx
@@ -57,7 +57,7 @@ Usage: `consul acl policy update [options] [args]`
Update a policy:
-```shell
+```shell-session
$ consul acl policy update -id 35b8 -name "replication" -description "Policy capable of replication ACL policies and Intentions" -rules @rules.hcl
Policy updated successfully
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
@@ -75,7 +75,7 @@ service_prefix "" {
Rename a policy:
-```shell
+```shell-session
$ consul acl policy update -id 35b8 -name "dc1-replication"
Policy updated successfully
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
diff --git a/website/pages/docs/commands/acl/role/create.mdx b/website/pages/docs/commands/acl/role/create.mdx
index 9375db4f6e..9124510d87 100644
--- a/website/pages/docs/commands/acl/role/create.mdx
+++ b/website/pages/docs/commands/acl/role/create.mdx
@@ -49,7 +49,7 @@ Usage: `consul acl role create [options] [args]`
Create a new role with one policy:
-```shell
+```shell-session
$ consul acl role create -name "crawler" -description "web crawler role" -policy-name "crawler-kv"
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
Name: crawler
@@ -60,7 +60,7 @@ Policies:
Create a new role with one service identity:
-```shell
+```shell-session
$ consul acl role create -name archiver -description 'archiver role' -service-identity "archiver:dc2"
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
Name: archiver
diff --git a/website/pages/docs/commands/acl/role/delete.mdx b/website/pages/docs/commands/acl/role/delete.mdx
index 11167bce85..0e80cc6935 100644
--- a/website/pages/docs/commands/acl/role/delete.mdx
+++ b/website/pages/docs/commands/acl/role/delete.mdx
@@ -35,14 +35,14 @@ Usage: `consul acl role delete [options]`
Delete a role by prefix:
-```shell
+```shell-session
$ consul acl role delete -id 57147
Role "57147d87-6bf7-f794-1a6e-7d038c4e4ae9" deleted successfully
```
Delete a role by name:
-```shell
+```shell-session
$ consul acl role delete -name crawler
Role "a365fdc9-ac71-e754-0645-7ab6bd747301" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/role/index.mdx b/website/pages/docs/commands/acl/role/index.mdx
index beec68c7bd..ffa42155f4 100644
--- a/website/pages/docs/commands/acl/role/index.mdx
+++ b/website/pages/docs/commands/acl/role/index.mdx
@@ -55,7 +55,7 @@ full UUID and used.
Create a new ACL role:
-```shell
+```shell-session
$ consul acl role create -name "new-role" \
-description "This is an example role" \
-policy-id 06acc965
@@ -63,24 +63,24 @@ $ consul acl role create -name "new-role" \
List all roles:
-```shell
+```shell-session
$ consul acl role list
```
Update a role:
-```shell
+```shell-session
$ consul acl role update -name "other-role" -datacenter "dc1"
```
Read a role:
-```shell
+```shell-session
$ consul acl role read -id 0479e93e-091c-4475-9b06-79a004765c24
```
Delete a role
-```shell
+```shell-session
$ consul acl role delete -name "my-role"
```
diff --git a/website/pages/docs/commands/acl/role/list.mdx b/website/pages/docs/commands/acl/role/list.mdx
index 5f8dffe12b..b3dddc6339 100644
--- a/website/pages/docs/commands/acl/role/list.mdx
+++ b/website/pages/docs/commands/acl/role/list.mdx
@@ -35,7 +35,7 @@ Usage: `consul acl role list`
Default listing.
-```shell
+```shell-session
$ consul acl role list
web-crawler:
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
@@ -53,7 +53,7 @@ archiver:
Show Metadata.
-```shell
+```shell-session
$ consul acl role list -meta
web-crawler:
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
diff --git a/website/pages/docs/commands/acl/role/read.mdx b/website/pages/docs/commands/acl/role/read.mdx
index 0b11dd7001..b6c625c37d 100644
--- a/website/pages/docs/commands/acl/role/read.mdx
+++ b/website/pages/docs/commands/acl/role/read.mdx
@@ -40,7 +40,7 @@ Usage: `consul acl role read [options] [args]`
Get role details:
-```shell
+```shell-session
$ consul acl role read -id 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
Name: crawler
@@ -51,7 +51,7 @@ Policies:
Get role details by name:
-```shell
+```shell-session
$ consul acl role read -name archiver
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
Name: archiver
diff --git a/website/pages/docs/commands/acl/role/update.mdx b/website/pages/docs/commands/acl/role/update.mdx
index 98e5b9d5c7..b40b93c5ba 100644
--- a/website/pages/docs/commands/acl/role/update.mdx
+++ b/website/pages/docs/commands/acl/role/update.mdx
@@ -60,7 +60,7 @@ Usage: `consul acl role update [options] [args]`
Update a role:
-```shell
+```shell-session
$ consul acl role update -id 57147d87-6bf7-f794-1a6e-7d038c4e4ae9 \
-description 'web crawler updated role' -service-identity 'crawler'
Role updated successfully
@@ -75,7 +75,7 @@ Service Identities:
Rename a role by prefix:
-```shell
+```shell-session
$ consul acl role update -id 57147 -name web-crawler
Role updated successfully
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
diff --git a/website/pages/docs/commands/acl/set-agent-token.mdx b/website/pages/docs/commands/acl/set-agent-token.mdx
index 14664bf953..bc6967adbe 100644
--- a/website/pages/docs/commands/acl/set-agent-token.mdx
+++ b/website/pages/docs/commands/acl/set-agent-token.mdx
@@ -44,6 +44,6 @@ Usage: `consul acl set-agent-token [options] TYPE TOKEN`
Set the `default` token:
-```
+```shell-session
$ consul acl set-agent-token default c4d0f8df-3aba-4ab6-a7a0-35b760dc29a1
```
diff --git a/website/pages/docs/commands/acl/token/clone.mdx b/website/pages/docs/commands/acl/token/clone.mdx
index 47c77a240b..4841d3aecf 100644
--- a/website/pages/docs/commands/acl/token/clone.mdx
+++ b/website/pages/docs/commands/acl/token/clone.mdx
@@ -39,7 +39,7 @@ Usage: `consul acl token clone [options]`
Clone a token:
-```shell
+```shell-session
$ consul acl token clone -id 59f8 -description "Clone of Super User"
Token cloned successfully.
AccessorID: dcfa52ed-9288-b3ff-056d-255ef69d2d88
diff --git a/website/pages/docs/commands/acl/token/create.mdx b/website/pages/docs/commands/acl/token/create.mdx
index fc4e29f583..a2533787ea 100644
--- a/website/pages/docs/commands/acl/token/create.mdx
+++ b/website/pages/docs/commands/acl/token/create.mdx
@@ -63,7 +63,7 @@ Usage: `consul acl token create [options] [args]`
Create a new token:
-```shell
+```shell-session
$ consul acl token create -description "Read Nodes and Services" -policy-id 06acc965
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
SecretID: ec15675e-2999-d789-832e-8c4794daa8d7
@@ -76,7 +76,7 @@ Policies:
Create a new local token:
-```shell
+```shell-session
$ consul acl token create -description "Read Nodes and Services" -policy-id 06acc965 -local
AccessorID: 4fdf0ec8-d251-3865-079c-7247c974fc50
SecretID: 02143514-abf2-6c23-0aa1-ec2107e68f6b
@@ -89,7 +89,7 @@ Policies:
Create a new token and link with policies by name:
-```shell
+```shell-session
$ consul acl token create -description "Super User" -policy-name global-management
AccessorID: 59f86a9b-d3b6-166c-32a0-be4ab3f94caa
SecretID: ada7f751-f654-8872-7f93-498e799158b6
@@ -102,7 +102,7 @@ Policies:
Create a new token with one service identity that expires in 15 minutes:
-```shell
+```shell-session
$ consul acl token create -description 'crawler token' -service-identity 'crawler' -expires-ttl '15m'
AccessorID: 0c083aca-6c15-f0cc-c4d9-30578db54cd9
SecretID: 930dafb6-5c08-040b-23fb-a368a95256f9
diff --git a/website/pages/docs/commands/acl/token/delete.mdx b/website/pages/docs/commands/acl/token/delete.mdx
index d27e055a55..4e7f55b241 100644
--- a/website/pages/docs/commands/acl/token/delete.mdx
+++ b/website/pages/docs/commands/acl/token/delete.mdx
@@ -33,7 +33,7 @@ Usage: `consul acl token delete [options]`
Delete a token:
-```shell
+```shell-session
$ consul acl token delete -id 35b8
Token "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/token/index.mdx b/website/pages/docs/commands/acl/token/index.mdx
index d01004b377..a7dd826283 100644
--- a/website/pages/docs/commands/acl/token/index.mdx
+++ b/website/pages/docs/commands/acl/token/index.mdx
@@ -61,7 +61,7 @@ Builtin Tokens:
Create a new ACL token:
-```shell
+```shell-session
$ consul acl token create \
-description "This is an example token" \
-policy-id 06acc965
@@ -69,24 +69,24 @@ $ consul acl token create \
List all tokens:
-```shell
+```shell-session
$ consul acl token list
```
Update a token:
-```shell
+```shell-session
$ consul acl token update -id 986193 -description "WonderToken"
```
Read a token with an accessor ID:
-```shell
+```shell-session
$ consul acl token read -id 986193
```
Delete a token
-```shell
+```shell-session
$ consul acl token delete -id 986193
```
diff --git a/website/pages/docs/commands/acl/token/list.mdx b/website/pages/docs/commands/acl/token/list.mdx
index dcbb39e544..dd4a41eadb 100644
--- a/website/pages/docs/commands/acl/token/list.mdx
+++ b/website/pages/docs/commands/acl/token/list.mdx
@@ -35,7 +35,7 @@ Usage: `consul acl token list`
Default listing.
-```shell
+```shell-session
$ consul acl token list
AccessorID: 4d123dff-f460-73c3-02c4-8dd64d136e01
Description: Bootstrap Token (Global Management)
diff --git a/website/pages/docs/commands/acl/token/read.mdx b/website/pages/docs/commands/acl/token/read.mdx
index 464ea4eb79..c31b3a9414 100644
--- a/website/pages/docs/commands/acl/token/read.mdx
+++ b/website/pages/docs/commands/acl/token/read.mdx
@@ -41,7 +41,7 @@ Usage: `consul acl token read [options] [args]`
Get token details:
-```shell
+```shell-session
$ consul acl token read -id 986
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
SecretID: ec15675e-2999-d789-832e-8c4794daa8d7
@@ -67,7 +67,7 @@ Policies:
Get token details (Builtin Tokens)
-```shell
+```shell-session
$ consul acl token read -id anonymous
AccessorID: 00000000-0000-0000-0000-000000000002
SecretID: anonymous
diff --git a/website/pages/docs/commands/acl/token/update.mdx b/website/pages/docs/commands/acl/token/update.mdx
index 32b5d2d0b0..543e7f5d9a 100644
--- a/website/pages/docs/commands/acl/token/update.mdx
+++ b/website/pages/docs/commands/acl/token/update.mdx
@@ -69,7 +69,7 @@ guide.
Update the anonymous token:
-```shell
+```shell-session
$ consul acl token update -id anonymous -policy-id 06acc
Token updated successfully.
AccessorID: 00000000-0000-0000-0000-000000000002
@@ -83,7 +83,7 @@ Policies:
Update a token description and take the policies from the existing token:
-```shell
+```shell-session
$ consul acl token update -id 986193 -description "WonderToken" -merge-policies
Token updated successfully.
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
diff --git a/website/pages/docs/commands/acl/translate-rules.mdx b/website/pages/docs/commands/acl/translate-rules.mdx
index 4e12aef55d..3aea79adc7 100644
--- a/website/pages/docs/commands/acl/translate-rules.mdx
+++ b/website/pages/docs/commands/acl/translate-rules.mdx
@@ -42,30 +42,30 @@ Usage: `consul acl translate rules [options] TRANSLATE`
Translate rules within a file:
-```shell
+```shell-session
$ consul acl translate-rules @rules.hcl
```
Translate rules from stdin:
-```shell
+```shell-session
$ consul acl translate-rules -
```
Translate rules from a string argument:
-```shell
+```shell-session
$ consul acl translate-rules 'key "" { policy = "write"}'
```
Translate rules for a legacy ACL token using its SecretID passed from stdin:
-```shell
+```shell-session
$ consul acl translate-rules --token-secret -
```
Translate rules for a legacy ACL token using its AccessorID:
-```shell
+```shell-session
$ consul acl translate-rules 429cd746-03d5-4bbb-a83a-18b164171c89
```
diff --git a/website/pages/docs/commands/catalog/datacenters.mdx b/website/pages/docs/commands/catalog/datacenters.mdx
index dce6eb1339..ef24666524 100644
--- a/website/pages/docs/commands/catalog/datacenters.mdx
+++ b/website/pages/docs/commands/catalog/datacenters.mdx
@@ -14,7 +14,7 @@ The `catalog datacenters` command prints all known datacenters.
List all datacenters:
-```
+```shell-session
$ consul catalog datacenters
dc1
dc2
diff --git a/website/pages/docs/commands/catalog/index.mdx b/website/pages/docs/commands/catalog/index.mdx
index 226696fb06..a6e83c395d 100644
--- a/website/pages/docs/commands/catalog/index.mdx
+++ b/website/pages/docs/commands/catalog/index.mdx
@@ -18,7 +18,7 @@ The catalog is also accessible via the [HTTP API](/api/catalog).
List all datacenters:
-```text
+```shell-session
$ consul catalog datacenters
dc1
dc2
@@ -27,7 +27,7 @@ dc3
List all nodes:
-```text
+```shell-session
$ consul catalog nodes
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -35,7 +35,7 @@ worker-01 1b662d97 10.4.5.31 dc1
List all nodes which provide a particular service:
-```text
+```shell-session
$ consul catalog nodes -service=redis
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -44,7 +44,7 @@ worker-02 d407a592 10.4.4.158 dc1
List all services:
-```text
+```shell-session
$ consul catalog services
consul
postgresql
@@ -53,7 +53,7 @@ redis
List all services on a node:
-```text
+```shell-session
$ consul catalog services -node=worker-01
consul
postgres
diff --git a/website/pages/docs/commands/catalog/nodes.mdx b/website/pages/docs/commands/catalog/nodes.mdx
index fe13fac17a..55044ce379 100644
--- a/website/pages/docs/commands/catalog/nodes.mdx
+++ b/website/pages/docs/commands/catalog/nodes.mdx
@@ -16,7 +16,7 @@ particular service.
List all nodes:
-```text
+```shell-session
$ consul catalog nodes
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -24,7 +24,7 @@ worker-01 1b662d97 10.4.5.31 dc1
Print detailed node information such as tagged addresses and node metadata:
-```text
+```shell-session
$ consul catalog nodes -detailed
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
@@ -32,7 +32,7 @@ worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31,
List nodes which provide the service name "web":
-```text
+```shell-session
$ consul catalog nodes -service=web
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
@@ -40,7 +40,7 @@ worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31,
Sort the resulting node list by estimated round trip time to worker-05:
-```text
+```shell-session
$ consul catalog nodes -near=web-05
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
diff --git a/website/pages/docs/commands/catalog/services.mdx b/website/pages/docs/commands/catalog/services.mdx
index 1154a0e07f..4173b802bc 100644
--- a/website/pages/docs/commands/catalog/services.mdx
+++ b/website/pages/docs/commands/catalog/services.mdx
@@ -16,7 +16,7 @@ particular node provides.
List all services:
-```text
+```shell-session
$ consul catalog services
consul
postgresql
@@ -25,7 +25,7 @@ redis
Show all services with their tags:
-```text
+```shell-session
$ consul catalog services -tags
consul
postgresql leader
@@ -34,7 +34,7 @@ redis primary,v1
List services for the node "worker-01":
-```text
+```shell-session
$ consul catalog services -node=worker-01
consul
redis
diff --git a/website/pages/docs/commands/connect/envoy.mdx b/website/pages/docs/commands/connect/envoy.mdx
index 4af63b1294..6f8b3d5710 100644
--- a/website/pages/docs/commands/connect/envoy.mdx
+++ b/website/pages/docs/commands/connect/envoy.mdx
@@ -145,7 +145,7 @@ service {
The sidecar Envoy process can be started with.
-```text
+```shell-session
$ consul connect envoy -sidecar-for web
```
@@ -158,7 +158,7 @@ agent is using all-default configuration.
To pass additional arguments directly to Envoy, for example output logging
level, you can use:
-```text
+```shell-session
$ consul connect envoy -sidecar-for web -- -l debug
```
@@ -168,7 +168,7 @@ To run multiple different proxy instances on the same host, you will
need to use `-admin-bind` on all but one to ensure they don't attempt to bind to
the same port as in the following example.
-```text
+```shell-session
$ consul connect envoy -sidecar-for db -admin-bind localhost:19001
```
@@ -176,7 +176,7 @@ $ consul connect envoy -sidecar-for db -admin-bind localhost:19001
The mesh gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=mesh -register \
-address '{{ GetInterfaceIP "eth0" }}:8443' \
-wan-address '{{ GetInterfaceIP "eth1" }}:8443'
@@ -186,7 +186,7 @@ $ consul connect envoy -gateway=mesh -register \
The terminating gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=terminating -register -service my-gateway \
-address '{{ GetInterfaceIP "eth0" }}:8443'
```
@@ -195,7 +195,7 @@ $ consul connect envoy -gateway=terminating -register -service my-gateway \
The ingress gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=ingress -register -service ingress-service \
-address '{{ GetInterfaceIP "eth0" }}:8888'
```
diff --git a/website/pages/docs/commands/connect/proxy.mdx b/website/pages/docs/commands/connect/proxy.mdx
index 15f21d97f0..404cd048d8 100644
--- a/website/pages/docs/commands/connect/proxy.mdx
+++ b/website/pages/docs/commands/connect/proxy.mdx
@@ -82,14 +82,14 @@ connections to "db" representing the frontend service. Once running, any
process that creates a TCP connection to the specified port (8181) will
establish a mutual TLS connection to "db" identified as "frontend".
-```text
+```shell-session
$ consul connect proxy -service frontend -upstream db:8181
```
The next example starts a local proxy that also accepts inbound connections
on port 8443, authorizes the connection, then proxies it to port 8080:
-```text
+```shell-session
$ consul connect proxy \
-service frontend \
-service-addr 127.0.0.1:8080 \
diff --git a/website/pages/docs/commands/debug.mdx b/website/pages/docs/commands/debug.mdx
index 9349ce1c1f..4a93b467f1 100644
--- a/website/pages/docs/commands/debug.mdx
+++ b/website/pages/docs/commands/debug.mdx
@@ -91,7 +91,7 @@ directory) on the host where the command runs.
By default the command will capture all available data from the default
agent address on loopback for 2 minutes at 30 second intervals.
-```text
+```shell-session
$ consul debug
...
```
@@ -99,7 +99,7 @@ $ consul debug
In this example, the archive is collected from a different agent on the
network using the standard Consul CLI flag to change the API address.
-```text
+```shell-session
$ consul debug -http-addr=10.0.1.10:8500
...
```
@@ -107,7 +107,7 @@ $ consul debug -http-addr=10.0.1.10:8500
The capture flag can be specified to only record a subset of data
about the agent and environment.
-```text
+```shell-session
$ consul debug -capture agent -capture host -capture logs
...
```
@@ -116,7 +116,7 @@ The duration of the command and interval of capturing dynamic
information (such as metrics) can be specified with the `-interval`
and `-duration` flags.
-```text
+```shell-session
$ consul debug -interval=15s -duration=1m
...
```
diff --git a/website/pages/docs/commands/index.mdx b/website/pages/docs/commands/index.mdx
index 71323063f3..d955cf48a7 100644
--- a/website/pages/docs/commands/index.mdx
+++ b/website/pages/docs/commands/index.mdx
@@ -24,7 +24,7 @@ as you'd most likely expect. And some commands that expect input accept
To view a list of the available commands at any time, just run `consul` with
no arguments:
-```text
+```shell-session
$ consul
Usage: consul [--version] [--help] []
@@ -64,7 +64,7 @@ Available commands are:
To get help for any specific command, pass the `-h` flag to the relevant
subcommand. For example, to see help about the `join` subcommand:
-```text
+```shell-session
$ consul join -h
Usage: consul join [options] address ...
@@ -100,7 +100,7 @@ you can invoke a new shell and use the feature.
For example, assume a tab is typed at the end of each prompt line:
-```shell
+```shell-session
$ consul e
event exec
diff --git a/website/pages/docs/commands/intention/check.mdx b/website/pages/docs/commands/intention/check.mdx
index 2ec5148992..18d9ff5e5f 100644
--- a/website/pages/docs/commands/intention/check.mdx
+++ b/website/pages/docs/commands/intention/check.mdx
@@ -28,7 +28,7 @@ Usage: `consul intention check [options] SRC DST`
## Examples
-```text
+```shell-session
$ consul intention check web db
Denied
diff --git a/website/pages/docs/commands/intention/create.mdx b/website/pages/docs/commands/intention/create.mdx
index fd40ffdf9c..aa3191c632 100644
--- a/website/pages/docs/commands/intention/create.mdx
+++ b/website/pages/docs/commands/intention/create.mdx
@@ -39,18 +39,18 @@ Usage: `consul intention create [options] -f FILE...`
Create an intention `web => db`:
-```shell
+```shell-session
$ consul intention create web db
```
Create intentions from a set of files:
-```shell
+```shell-session
$ consul intention create -file one.json two.json
```
Create intentions from a directory using shell expansion:
-```shell
+```shell-session
$ consul intention create -file intentions/*.json
```
diff --git a/website/pages/docs/commands/intention/delete.mdx b/website/pages/docs/commands/intention/delete.mdx
index 8a6de0db6b..e47cadca23 100644
--- a/website/pages/docs/commands/intention/delete.mdx
+++ b/website/pages/docs/commands/intention/delete.mdx
@@ -25,12 +25,12 @@ Usage:
Delete an intention from "web" to "db" with any action:
-```text
+```shell-session
$ consul intention delete web db
```
Delete an intention by unique ID:
-```text
+```shell-session
$ consul intention delete 4ffed935-439c-695d-4f51-f4fc0b12a7a7
```
diff --git a/website/pages/docs/commands/intention/get.mdx b/website/pages/docs/commands/intention/get.mdx
index 583f328f06..853f874bf2 100644
--- a/website/pages/docs/commands/intention/get.mdx
+++ b/website/pages/docs/commands/intention/get.mdx
@@ -23,7 +23,7 @@ Usage:
## Examples
-```text
+```shell-session
$ consul intention get web db
Source: web
Destination: db
diff --git a/website/pages/docs/commands/intention/index.mdx b/website/pages/docs/commands/intention/index.mdx
index d549c3db24..bdc851513d 100644
--- a/website/pages/docs/commands/intention/index.mdx
+++ b/website/pages/docs/commands/intention/index.mdx
@@ -42,25 +42,25 @@ of the subcommand in the sidebar.
Create an intention to allow "web" to talk to "db":
-```shell
+```shell-session
$ consul intention create web db
```
Create an intention to deny "db" from initiating connections to _any_ service:
-```shell
+```shell-session
$ consul intention create -deny db '*'
Created: db => * (deny)
```
Test whether a "web" is allowed to connect to "db":
-```shell
+```shell-session
$ consul intention check web db
```
Find all intentions for communicating to the "db" service:
-```shell
+```shell-session
$ consul intention match db
```
diff --git a/website/pages/docs/commands/intention/match.mdx b/website/pages/docs/commands/intention/match.mdx
index db319fe75c..bd3b6080da 100644
--- a/website/pages/docs/commands/intention/match.mdx
+++ b/website/pages/docs/commands/intention/match.mdx
@@ -31,7 +31,7 @@ Usage: `consul intention match [options] SRC_OR_DST`
## Examples
-```text
+```shell-session
$ consul intention match -source web
web => db (deny)
web => * (allow)
diff --git a/website/pages/docs/commands/kv/delete.mdx b/website/pages/docs/commands/kv/delete.mdx
index ed84cc6779..997fcf14aa 100644
--- a/website/pages/docs/commands/kv/delete.mdx
+++ b/website/pages/docs/commands/kv/delete.mdx
@@ -41,7 +41,7 @@ Usage: `consul kv delete [options] KEY_OR_PREFIX`
To remove the value for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv delete redis/config/connections
Success! Deleted key: redis/config/connections
```
@@ -49,7 +49,7 @@ Success! Deleted key: redis/config/connections
If the key does not exist, the command will not error, and a success message
will be returned:
-```shell
+```shell-session
$ consul kv delete not-a-real-key
Success! Deleted key: not-a-real-key
```
@@ -57,7 +57,7 @@ Success! Deleted key: not-a-real-key
To only delete a key if it has not been modified since a given index, specify
the `-cas` and `-modify-index` flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections | grep ModifyIndex
ModifyIndex 456
@@ -71,7 +71,7 @@ Success! Deleted key: redis/config/connections
To recursively delete all keys that start with a given prefix, specify the
`-recurse` flag:
-```shell
+```shell-session
$ consul kv delete -recurse redis/
Success! Deleted keys with prefix: redis/
```
@@ -85,7 +85,7 @@ a folder, always use a trailing slash.
It is not valid to combine the `-cas` option with `-recurse`, since you are
deleting multiple keys under a prefix in a single operation:
-```shell
+```shell-session
$ consul kv delete -cas -recurse redis/
Cannot specify both -cas and -recurse!
```
diff --git a/website/pages/docs/commands/kv/export.mdx b/website/pages/docs/commands/kv/export.mdx
index 20b5439a51..48053a14c4 100644
--- a/website/pages/docs/commands/kv/export.mdx
+++ b/website/pages/docs/commands/kv/export.mdx
@@ -31,7 +31,7 @@ Usage: `consul kv export [options] [PREFIX]`
To export the tree at "vault/" in the key value store:
-```
+```shell-session
$ consul kv export vault/
# JSON output
```
diff --git a/website/pages/docs/commands/kv/get.mdx b/website/pages/docs/commands/kv/get.mdx
index b1fdd66173..c748d23d87 100644
--- a/website/pages/docs/commands/kv/get.mdx
+++ b/website/pages/docs/commands/kv/get.mdx
@@ -52,7 +52,7 @@ Usage: `consul kv get [options] [KEY_OR_PREFIX]`
To retrieve the value for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv get redis/config/connections
5
```
@@ -62,7 +62,7 @@ information about the key, specify the "-detailed" flag. This will output all
known metadata about the key including ModifyIndex and any user-supplied
flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections
CreateIndex 336
Flags 0
@@ -75,7 +75,7 @@ Value 5
If the key with the given name does not exist, an error is returned:
-```shell
+```shell-session
$ consul kv get not-a-real-key
Error! No key exists at: not-a-real-key
```
@@ -83,7 +83,7 @@ Error! No key exists at: not-a-real-key
To treat the path as a prefix and list all keys which start with the given
prefix, specify the "-recurse" flag:
-```shell
+```shell-session
$ consul kv get -recurse redis/
redis/config/connections:5
redis/config/cpu:128
@@ -92,7 +92,7 @@ redis/config/memory:512
Or list detailed information about all pairs under a prefix:
-```shell
+```shell-session
$ consul kv get -recurse -detailed redis
CreateIndex 336
Flags 0
@@ -122,7 +122,7 @@ Value 512
To just list the keys which start with the specified prefix, use the "-keys"
option instead. This is more performant and results in a smaller payload:
-```shell
+```shell-session
$ consul kv get -keys redis/config/
redis/config/connections
redis/config/cpu
@@ -133,7 +133,7 @@ By default, the `-keys` operation uses a separator of "/", meaning it will not
recurse beyond that separator. You can choose a different separator by setting
`-separator=""`.
-```shell
+```shell-session
$ consul kv get -keys -separator="c" redis
redis/c
```
@@ -141,7 +141,7 @@ redis/c
Alternatively, you can disable the separator altogether by setting it to the
empty string:
-```shell
+```shell-session
$ consul kv get -keys -separator="" redis
redis/config/connections
redis/config/cpu
@@ -150,7 +150,7 @@ redis/config/memory
To list all keys at the root, simply omit the prefix parameter:
-```shell
+```shell-session
$ consul kv get -keys
memcached/
redis/
diff --git a/website/pages/docs/commands/kv/import.mdx b/website/pages/docs/commands/kv/import.mdx
index ce0f564b7c..02d2a77a0f 100644
--- a/website/pages/docs/commands/kv/import.mdx
+++ b/website/pages/docs/commands/kv/import.mdx
@@ -29,14 +29,14 @@ Usage: `consul kv import [options] [DATA]`
To import from a file, prepend the filename with `@`:
-```shell
+```shell-session
$ consul kv import @values.json
# Output
```
To import from stdin, use `-` as the data parameter:
-```shell
+```shell-session
$ cat values.json | consul kv import -
# Output
```
@@ -44,7 +44,7 @@ $ cat values.json | consul kv import -
You can also pass the JSON directly, however care must be taken with shell
escaping:
-```shell
+```shell-session
$ consul kv import "$(cat values.json)"
# Output
```
diff --git a/website/pages/docs/commands/kv/index.mdx b/website/pages/docs/commands/kv/index.mdx
index 7495daf251..09a1ebdd21 100644
--- a/website/pages/docs/commands/kv/index.mdx
+++ b/website/pages/docs/commands/kv/index.mdx
@@ -51,21 +51,21 @@ of the subcommand in the sidebar or one of the links below:
To create or update the key named "redis/config/connections" to the value "5" in
Consul's KV store:
-```text
+```shell-session
$ consul kv put redis/config/connections 5
Success! Data written to: redis/config/connections
```
To read a value back from Consul:
-```text
+```shell-session
$ consul kv get redis/config/connections
5
```
Or you can query for detailed information:
-```text
+```shell-session
$ consul kv get -detailed redis/config/connections
CreateIndex 336
Flags 0
@@ -78,7 +78,7 @@ Value 5
Finally, deleting a key is just as easy:
-```text
+```shell-session
$ consul kv delete redis/config/connections
Success! Data deleted at key: redis/config/connections
```
diff --git a/website/pages/docs/commands/kv/put.mdx b/website/pages/docs/commands/kv/put.mdx
index b39fed41f8..62007b18a8 100644
--- a/website/pages/docs/commands/kv/put.mdx
+++ b/website/pages/docs/commands/kv/put.mdx
@@ -56,21 +56,21 @@ Usage: `consul kv put [options] KEY [DATA]`
To insert a value of "5" for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv put redis/config/connections 5
Success! Data written to: redis/config/connections
```
If no data is specified, the key will be created with empty data:
-```shell
+```shell-session
$ consul kv put redis/config/connections
Success! Data written to: redis/config/connections
```
If the `-base64` flag is set, the data will be decoded before writing:
-```shell
+```shell-session
$ consul kv put -base64 foo/encoded aGVsbG8gd29ybGQK
Success! Data written to: foo/encoded
```
@@ -81,14 +81,14 @@ the value at the key to the empty value.
For longer or sensitive values, it is possible to read from a file by prefixing
with the `@` symbol:
-```shell
+```shell-session
$ consul kv put redis/config/password @password.txt
Success! Data written to: redis/config/connections
```
Or read values from stdin by specifying the `-` symbol:
-```shell
+```shell-session
$ echo "5" | consul kv put redis/config/password -
Success! Data written to: redis/config/connections
@@ -106,7 +106,7 @@ more robust interface for secret management.
To only update a key if it has not been modified since a given index, specify
the `-cas` and `-modify-index` flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections | grep ModifyIndex
ModifyIndex 456
@@ -120,21 +120,21 @@ Success! Data written to: redis/config/connections
To specify flags on the key, use the `-flags` option. These flags are completely
controlled by the user:
-```shell
+```shell-session
$ consul kv put -flags=42 redis/config/password s3cr3t
Success! Data written to: redis/config/password
```
To create or tune a lock, use the `-acquire` and `-session` flags. The session must already exist (this command will not create it or manage it):
-```shell
+```shell-session
$ consul kv put -acquire -session=abc123 redis/lock/update
Success! Lock acquired on: redis/lock/update
```
When you are finished, release the lock:
-```shell
+```shell-session
$ consul kv put -release -session=acb123 redis/lock/update
Success! Lock released on: redis/lock/update
```
diff --git a/website/pages/docs/commands/login.mdx b/website/pages/docs/commands/login.mdx
index de001441e4..b67a66b9ca 100644
--- a/website/pages/docs/commands/login.mdx
+++ b/website/pages/docs/commands/login.mdx
@@ -52,7 +52,7 @@ Usage: `consul login [options]`
Login to an auth method.
-```shell
+```shell-session
$ consul login -method 'minikube' \
-bearer-token-file '/run/secrets/kubernetes.io/serviceaccount/token' \
-token-sink-file 'consul.token'
diff --git a/website/pages/docs/commands/logout.mdx b/website/pages/docs/commands/logout.mdx
index 3463c8f2e7..a1c9a82104 100644
--- a/website/pages/docs/commands/logout.mdx
+++ b/website/pages/docs/commands/logout.mdx
@@ -30,6 +30,6 @@ Usage: `consul logout [options]`
Logout and delete a login token.
-```shell
+```shell-session
$ consul logout -token-file 'consul.token'
```
diff --git a/website/pages/docs/commands/maint.mdx b/website/pages/docs/commands/maint.mdx
index 9445a2c3e4..ad73614b39 100644
--- a/website/pages/docs/commands/maint.mdx
+++ b/website/pages/docs/commands/maint.mdx
@@ -50,7 +50,7 @@ If neither `-enable` nor `-disable` are passed, the `maint` command will
switch to "list mode", displaying any current maintenances. This may return
blank if nothing is currently under maintenance. The output will look like:
-```shell
+```shell-session
$ consul maint
Node:
Name: node1.local
diff --git a/website/pages/docs/commands/namespace/create.mdx b/website/pages/docs/commands/namespace/create.mdx
index 6757d604ce..125e66cf65 100644
--- a/website/pages/docs/commands/namespace/create.mdx
+++ b/website/pages/docs/commands/namespace/create.mdx
@@ -56,14 +56,14 @@ from the CLI arguments.
Create a new Namespace:
-```shell
+```shell-session
$ consul namespace create -name "team-1"
Name: team-1
```
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace create -name team-1 -show-meta
Name: team-1
Create Index: 339
@@ -72,7 +72,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace create -name team2 -description "Example Namespace" -meta "team-id=574407f3-8b26-4c84-8e51-028bb8cbdd37" -format=json
{
"Name": "team2",
diff --git a/website/pages/docs/commands/namespace/delete.mdx b/website/pages/docs/commands/namespace/delete.mdx
index 3303f5fb35..ef8b305c5f 100644
--- a/website/pages/docs/commands/namespace/delete.mdx
+++ b/website/pages/docs/commands/namespace/delete.mdx
@@ -27,6 +27,6 @@ Usage: `consul namespace delete `
Delete a Namespace:
-```shell
+```shell-session
$ consul namespace delete "team-1"
```
diff --git a/website/pages/docs/commands/namespace/index.mdx b/website/pages/docs/commands/namespace/index.mdx
index fe4cdec742..8a4b03c255 100644
--- a/website/pages/docs/commands/namespace/index.mdx
+++ b/website/pages/docs/commands/namespace/index.mdx
@@ -49,36 +49,36 @@ of the subcommand in the sidebar.
Create a Namespace
-```shell
+```shell-session
$ consul namespace create -name team1
```
Create or Update a Namespace from its full definition:
-```shell
+```shell-session
$ consul namespace write ns1.hcl
```
Read a Namespace:
-```shell
+```shell-session
$ consul namespace read ns1
```
List all Namespaces:
-```shell
+```shell-session
$ consul namespace list
```
Update a namespace
-```shell
+```shell-session
$ consul namespace update -name team1 -description "first namespace"
```
Delete a Namespace:
-```shell
+```shell-session
$ consul namespace delete team1
```
diff --git a/website/pages/docs/commands/namespace/list.mdx b/website/pages/docs/commands/namespace/list.mdx
index ede7230952..e952db58f6 100644
--- a/website/pages/docs/commands/namespace/list.mdx
+++ b/website/pages/docs/commands/namespace/list.mdx
@@ -36,7 +36,7 @@ Usage: `consul namespace list`
List Namespaces:
-```shell
+```shell-session
$ consul namespace list
default:
Description:
@@ -51,7 +51,7 @@ team-1:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace list -meta
default:
Description:
@@ -72,7 +72,7 @@ team-1:
JSON Format:
-```shell
+```shell-session
$ consul namespace list -format=json
[
{
diff --git a/website/pages/docs/commands/namespace/read.mdx b/website/pages/docs/commands/namespace/read.mdx
index e371a27cd0..d45a0aa828 100644
--- a/website/pages/docs/commands/namespace/read.mdx
+++ b/website/pages/docs/commands/namespace/read.mdx
@@ -35,7 +35,7 @@ Usage: `consul namespace read `
Read a Namespace:
-```shell
+```shell-session
$ consul namespace read "team-1"
Name: team-1
Description:
@@ -43,7 +43,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace read -meta "team-1"
Name: team-1
Description:
@@ -53,7 +53,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace read -format=json foo
{
"Name": "foo",
diff --git a/website/pages/docs/commands/namespace/update.mdx b/website/pages/docs/commands/namespace/update.mdx
index e513c29cf8..30d8ad6715 100644
--- a/website/pages/docs/commands/namespace/update.mdx
+++ b/website/pages/docs/commands/namespace/update.mdx
@@ -61,7 +61,7 @@ with the existing namespace definition.
Update a namespace with a new description:
-```shell
+```shell-session
$ consul namespace update -name "team-1" -description "example description"
Name: team-1
Description:
@@ -70,7 +70,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace update -name team-1 -show-meta -default-policy-id 1206bf1c-6239-46e8-b9f8-b426667cf428
Name: team-1
ACLs:
@@ -82,7 +82,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace update -name team2 -description "Example Namespace" -meta "external-source=kubernetes" -format=json
{
"Name": "team2",
diff --git a/website/pages/docs/commands/namespace/write.mdx b/website/pages/docs/commands/namespace/write.mdx
index aa9901691d..057ac3b878 100644
--- a/website/pages/docs/commands/namespace/write.mdx
+++ b/website/pages/docs/commands/namespace/write.mdx
@@ -37,7 +37,7 @@ or HCL format. See [here](/docs/enterprise/namespaces#namespace-definition) for
Create a new Namespace:
-```shell
+```shell-session
$ consul namespace write - <<< 'Name = "team-1"'
Name: team-1
Description:
@@ -45,7 +45,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace write -meta - <<< 'Name = "team-1"'
Name: team-1
Description:
@@ -55,7 +55,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ cat ns.hcl
Name = "foo"
Description = "Example Namespace"
diff --git a/website/pages/docs/commands/rtt.mdx b/website/pages/docs/commands/rtt.mdx
index 3e11fd763f..d7728e5dc9 100644
--- a/website/pages/docs/commands/rtt.mdx
+++ b/website/pages/docs/commands/rtt.mdx
@@ -47,7 +47,7 @@ The following environment variables control accessing the HTTP server via SSL:
If coordinates are available, the command will print the estimated round trip
time between the given nodes:
-```
+```shell-session
$ consul rtt n1 n2
Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
diff --git a/website/pages/docs/commands/services/deregister.mdx b/website/pages/docs/commands/services/deregister.mdx
index c1903f0ecb..b15addf614 100644
--- a/website/pages/docs/commands/services/deregister.mdx
+++ b/website/pages/docs/commands/services/deregister.mdx
@@ -49,13 +49,13 @@ service.
To deregister by ID:
-```text
+```shell-session
$ consul services deregister -id=web
```
To deregister from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/services/index.mdx b/website/pages/docs/commands/services/index.mdx
index d4b70ae95e..6383304fb5 100644
--- a/website/pages/docs/commands/services/index.mdx
+++ b/website/pages/docs/commands/services/index.mdx
@@ -39,13 +39,13 @@ of the subcommand in the sidebar.
To create a simple service:
-```shell
+```shell-session
$ consul services register -name=web
```
To create a service from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/services/register.mdx b/website/pages/docs/commands/services/register.mdx
index 9dd15bc5ac..933f2ebb9c 100644
--- a/website/pages/docs/commands/services/register.mdx
+++ b/website/pages/docs/commands/services/register.mdx
@@ -85,13 +85,13 @@ Please refer to that documentation for full details.
To create a simple service:
-```text
+```shell-session
$ consul services register -name=web
```
To create a service from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/snapshot/agent.mdx b/website/pages/docs/commands/snapshot/agent.mdx
index 16d49e10a5..24d89a6ec5 100644
--- a/website/pages/docs/commands/snapshot/agent.mdx
+++ b/website/pages/docs/commands/snapshot/agent.mdx
@@ -83,53 +83,53 @@ Usage: `consul snapshot agent [options]`
format (shown populated with default values):
```json
- {
- "snapshot_agent": {
- "http_addr": "127.0.0.1:8500",
- "token": "",
- "datacenter": "",
- "ca_file": "",
- "ca_path": "",
- "cert_file": "",
- "key_file": "",
- "tls_server_name": "",
- "log": {
- "level": "INFO",
- "enable_syslog": false,
- "syslog_facility": "LOCAL0"
- },
- "snapshot": {
- "interval": "1h",
- "retain": 30,
- "stale": false,
- "service": "consul-snapshot",
- "deregister_after": "72h",
- "lock_key": "consul-snapshot/lock",
- "max_failures": 3,
- "local_scratch_path": ""
- },
- "local_storage": {
- "path": "."
- },
- "aws_storage": {
- "access_key_id": "",
- "secret_access_key": "",
- "s3_region": "",
- "s3_bucket": "",
- "s3_key_prefix": "consul-snapshot",
- "s3_server_side_encryption": false,
- "s3_static_snapshot_name": ""
- },
- "azure_blob_storage": {
- "account_name": "",
- "account_key": "",
- "container_name": ""
- },
- "google_storage": {
- "bucket": ""
- }
+{
+ "snapshot_agent": {
+ "http_addr": "127.0.0.1:8500",
+ "token": "",
+ "datacenter": "",
+ "ca_file": "",
+ "ca_path": "",
+ "cert_file": "",
+ "key_file": "",
+ "tls_server_name": "",
+ "log": {
+ "level": "INFO",
+ "enable_syslog": false,
+ "syslog_facility": "LOCAL0"
+ },
+ "snapshot": {
+ "interval": "1h",
+ "retain": 30,
+ "stale": false,
+ "service": "consul-snapshot",
+ "deregister_after": "72h",
+ "lock_key": "consul-snapshot/lock",
+ "max_failures": 3,
+ "local_scratch_path": ""
+ },
+ "local_storage": {
+ "path": "."
+ },
+ "aws_storage": {
+ "access_key_id": "",
+ "secret_access_key": "",
+ "s3_region": "",
+ "s3_bucket": "",
+ "s3_key_prefix": "consul-snapshot",
+ "s3_server_side_encryption": false,
+ "s3_static_snapshot_name": ""
+ },
+ "azure_blob_storage": {
+ "account_name": "",
+ "account_key": "",
+ "container_name": ""
+ },
+ "google_storage": {
+ "bucket": ""
}
}
+}
```
All fields are optional, and config files without a `snapshot_agent` object will
@@ -303,7 +303,7 @@ perform leader election for highly available operation, register itself with Con
service discovery with health checks, take snapshots every hour, retain the last 30
snapshots, and save snapshots into the current working directory:
-```shell
+```shell-session
$ consul snapshot agent
```
@@ -311,7 +311,7 @@ To run a one-shot backup, set the backup interval to 0. This will run a single s
and delete any old snapshots based on the retain settings, but it will not perform any
leader election or service registration:
-```shell
+```shell-session
$ consul snapshot agent -interval=0
```
diff --git a/website/pages/docs/commands/snapshot/index.mdx b/website/pages/docs/commands/snapshot/index.mdx
index 3e4e6f4a4b..ee67f32c7d 100644
--- a/website/pages/docs/commands/snapshot/index.mdx
+++ b/website/pages/docs/commands/snapshot/index.mdx
@@ -47,21 +47,21 @@ of the subcommand in the sidebar or one of the links below:
To create a snapshot and save it as a file called "backup.snap":
-```text
+```shell-session
$ consul snapshot save backup.snap
Saved and verified snapshot to index 8419
```
To restore a snapshot from a file called "backup.snap":
-```text
+```shell-session
$ consul snapshot restore backup.snap
Restored snapshot
```
To inspect a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot inspect backup.snap
ID 2-5-1477944140022
Size 667
@@ -72,7 +72,7 @@ Version 1
To run a daemon process that periodically saves snapshots
-```
+```shell-session
$ consul snapshot agent
```
diff --git a/website/pages/docs/commands/snapshot/inspect.mdx b/website/pages/docs/commands/snapshot/inspect.mdx
index c78e83c870..8b93b6a3bf 100644
--- a/website/pages/docs/commands/snapshot/inspect.mdx
+++ b/website/pages/docs/commands/snapshot/inspect.mdx
@@ -34,7 +34,7 @@ Usage: `consul snapshot inspect [options] FILE`
To inspect a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot inspect backup.snap
ID 2-5-1477944140022
Size 667
diff --git a/website/pages/docs/commands/snapshot/restore.mdx b/website/pages/docs/commands/snapshot/restore.mdx
index de48f9585c..ad45851bfd 100644
--- a/website/pages/docs/commands/snapshot/restore.mdx
+++ b/website/pages/docs/commands/snapshot/restore.mdx
@@ -35,7 +35,7 @@ Usage: `consul snapshot restore [options] FILE`
To restore a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot restore backup.snap
Restored snapshot
```
diff --git a/website/pages/docs/commands/snapshot/save.mdx b/website/pages/docs/commands/snapshot/save.mdx
index 7c0d0437d5..6587df12cf 100644
--- a/website/pages/docs/commands/snapshot/save.mdx
+++ b/website/pages/docs/commands/snapshot/save.mdx
@@ -30,7 +30,7 @@ Usage: `consul snapshot save [options] FILE`
To create a snapshot from the leader server and save it to "backup.snap":
-```text
+```shell-session
$ consul snapshot save backup.snap
Saved and verified snapshot to index 8419
```
@@ -45,7 +45,7 @@ integrity.
To create a potentially stale snapshot from any available server, use the stale
consistency mode:
-```text
+```shell-session
$ consul snapshot save -stale backup.snap
# ...
```
diff --git a/website/pages/docs/commands/tls/ca.mdx b/website/pages/docs/commands/tls/ca.mdx
index 6e73de0bec..d6db7486bb 100644
--- a/website/pages/docs/commands/tls/ca.mdx
+++ b/website/pages/docs/commands/tls/ca.mdx
@@ -14,7 +14,7 @@ This command create a self signed CA to be used for Consul TLS setup.
Create CA:
-```bash
+```shell-session
$ consul tls ca create
==> Saved consul-ca.pem
==> Saved consul-ca-key.pem
diff --git a/website/pages/docs/commands/tls/cert.mdx b/website/pages/docs/commands/tls/cert.mdx
index 8b15eaf7f7..fd266e8835 100644
--- a/website/pages/docs/commands/tls/cert.mdx
+++ b/website/pages/docs/commands/tls/cert.mdx
@@ -15,7 +15,7 @@ setup.
Create a certificate for servers:
-```shell
+```shell-session
$ consul tls cert create -server
==> WARNING: Server Certificates grants authority to become a
server and access all state in the cluster including root keys
@@ -28,7 +28,7 @@ $ consul tls cert create -server
Create a certificate for clients:
-```shell
+```shell-session
$ consul tls cert create -client
==> Using consul-ca.pem and consul-ca-key.pem
==> Saved consul-client-0.pem
@@ -37,7 +37,7 @@ $ consul tls cert create -client
Create a certificate for cli:
-```shell
+```shell-session
$ consul tls cert create -cli
==> Using consul-ca.pem and consul-ca-key.pem
==> Saved consul-cli-0.pem
diff --git a/website/pages/docs/commands/tls/index.mdx b/website/pages/docs/commands/tls/index.mdx
index 8f9f566325..7db66107dc 100644
--- a/website/pages/docs/commands/tls/index.mdx
+++ b/website/pages/docs/commands/tls/index.mdx
@@ -14,7 +14,7 @@ The `tls` command is used to help with setting up a CA and certificates for Cons
Create a CA:
-```text
+```shell-session
$ consul tls ca create
==> Saved consul-agent-ca.pem
==> Saved consul-agent-ca-key.pem
@@ -22,7 +22,7 @@ $ consul tls ca create
Create a client certificate:
-```text
+```shell-session
$ consul tls cert create -client
==> Using consul-agent-ca.pem and consul-agent-ca-key.pem
==> Saved dc1-client-consul-0.pem
diff --git a/website/pages/docs/commands/validate.mdx b/website/pages/docs/commands/validate.mdx
index f3c95df2cc..6d72742c99 100644
--- a/website/pages/docs/commands/validate.mdx
+++ b/website/pages/docs/commands/validate.mdx
@@ -31,7 +31,7 @@ Usage: `consul validate [options] FILE_OR_DIRECTORY...`
Returns 0 if the configuration is valid, or 1 if there are problems.
-```text
+```shell-session
$ consul validate /etc/consul.d
Configuration is valid!
```
diff --git a/website/pages/docs/commands/version.mdx b/website/pages/docs/commands/version.mdx
index 8af45b8fa5..ef51a4015f 100644
--- a/website/pages/docs/commands/version.mdx
+++ b/website/pages/docs/commands/version.mdx
@@ -13,7 +13,7 @@ Command: `consul version`
The `version` command prints the version of Consul and the protocol versions it understands for speaking to other agents.
-```text
+```shell-session
$ consul version
Consul v0.7.4
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
diff --git a/website/pages/docs/common-errors.mdx b/website/pages/docs/common-errors.mdx
index 3cafa03377..cbba27674c 100644
--- a/website/pages/docs/common-errors.mdx
+++ b/website/pages/docs/common-errors.mdx
@@ -38,7 +38,7 @@ Error parsing server.json: invalid character '`' looking for beginning of value
There is a syntax error in your configuration file. If the error message doesn't identify the exact location in the file where the problem is, try using [jq] to find it, for example:
-```shell
+```shell-session
$ consul agent -server -config-file server.json
==> Error parsing server.json: invalid character '`' looking for beginning of value
$ cat server.json | jq .
diff --git a/website/pages/docs/connect/ca/consul.mdx b/website/pages/docs/connect/ca/consul.mdx
index 472b7242d3..ebc3e7f29b 100644
--- a/website/pages/docs/connect/ca/consul.mdx
+++ b/website/pages/docs/connect/ca/consul.mdx
@@ -69,7 +69,7 @@ currently integrate with Consul directly.
To view the current CA configuration, use the [Get CA Configuration endpoint](/api/connect/ca#get-ca-configuration):
-```bash
+```shell-session
$ curl localhost:8500/v1/connect/ca/configuration
{
"Provider": "consul",
@@ -98,7 +98,7 @@ example, we will set the URI SAN to `spiffe://36cb52cd-4058-f811-0432-6798a240c5
In order to use the Update CA Configuration HTTP endpoint, the private key and certificate
must be passed via JSON:
-```bash
+```shell-session
$ jq -n --arg key "$(cat root.key)" --arg cert "$(cat root.crt)" '
{
"Provider": "consul",
@@ -114,7 +114,7 @@ $ jq -n --arg key "$(cat root.key)" --arg cert "$(cat root.crt)" '
The resulting `ca_config.json` file can then be used to update the active root certificate:
-```bash
+```shell-session
$ cat ca_config.json
{
"Provider": "consul",
diff --git a/website/pages/docs/connect/ca/index.mdx b/website/pages/docs/connect/ca/index.mdx
index fd60353c14..5e91a0354e 100644
--- a/website/pages/docs/connect/ca/index.mdx
+++ b/website/pages/docs/connect/ca/index.mdx
@@ -52,7 +52,7 @@ When a cluster first initializes, this will only list one trusted root. Multiple
roots may appear as part of
[rotation](#).
-```bash
+```shell-session
$ curl http://localhost:8500/v1/connect/ca/roots
{
"ActiveRootID": "31:6c:06:fb:49:94:42:d5:e4:55:cc:2e:27:b3:b2:2e:96:67:3e:7e",
@@ -85,7 +85,7 @@ After initialization, the CA provider configuration can be viewed with the
Consul will filter sensitive values from this endpoint depending on the
provider in use, so the configuration may not be complete.
-```bash
+```shell-session
$ curl http://localhost:8500/v1/connect/ca/configuration
{
"Provider": "consul",
@@ -139,7 +139,7 @@ certificates are present, and the currently active root has an intermediate
certificate which has been generated and cross-signed automatically by the old
root during the rotation process:
-```bash
+```shell-session
$ curl localhost:8500/v1/connect/ca/roots
{
"ActiveRootID": "d2:2c:41:94:1e:50:04:ea:86:fc:08:d6:b0:45:a4:af:8a:eb:76:a0",
diff --git a/website/pages/docs/connect/dev.mdx b/website/pages/docs/connect/dev.mdx
index e684cd3352..622641d43d 100644
--- a/website/pages/docs/connect/dev.mdx
+++ b/website/pages/docs/connect/dev.mdx
@@ -30,7 +30,7 @@ we want to connect to via `psql`, but the only non-loopback listener is
via Connect. Let's also assume that we have an ACL token to identify as
`operator-mitchellh`. We can start a local proxy:
-```shell
+```shell-session
$ consul connect proxy \
-service operator-mitchellh \
-upstream postgresql:8181
@@ -44,7 +44,7 @@ the example above, the proxy is identifying as `operator-mitchellh`.
With the proxy running, we can now use `psql` like normal:
-```
+```shell-session
$ psql -h 127.0.0.1 -p 8181 -U mitchellh mydb
>
```
@@ -63,7 +63,7 @@ For example, if you have an ACL token that allows `service:write` for
`web` and you want to connect to the `postgresql` service as "web", you
can start a proxy like so:
-```shell
+```shell-session
$ consul connect proxy \
-service web \
-upstream postgresql:8181
diff --git a/website/pages/docs/connect/intentions.mdx b/website/pages/docs/connect/intentions.mdx
index e971a1f26b..c6e93ddf56 100644
--- a/website/pages/docs/connect/intentions.mdx
+++ b/website/pages/docs/connect/intentions.mdx
@@ -35,7 +35,7 @@ Below is an example of a basic intention to show the basic attributes
of an intention. The full data model of an intention can be found in the
[API documentation](#).
-```
+```shell-session
$ consul intention create -deny web db
Created: web => db (deny)
```
@@ -54,7 +54,7 @@ the near term roadmap for Consul.
An intention source or destination may also be the special wildcard
value `*`. This matches _any_ value and is used as a catch-all. Example:
-```
+```shell-session
$ consul intention create -deny web '*'
Created: web => * (deny)
```
@@ -67,7 +67,7 @@ Arbitrary string key/value data may be associated with intentions. This
is unused by Consul but can be used by external systems or for visibility
in the UI.
-```shell
+```shell-session
$ consul intention create \
-deny \
-meta description='Hello there' \
diff --git a/website/pages/docs/guides/acl-legacy.mdx b/website/pages/docs/guides/acl-legacy.mdx
index 5f0cf7871c..26c2b91f99 100644
--- a/website/pages/docs/guides/acl-legacy.mdx
+++ b/website/pages/docs/guides/acl-legacy.mdx
@@ -294,7 +294,7 @@ In Consul 0.9.1 and later, you can use the [/v1/acl/bootstrap API](/api/acl/acl#
to make the initial master token, so a token never needs to be placed into a configuration
file. To use this approach, omit `acl_master_token` from the above config and then call the API:
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -325,7 +325,7 @@ own internal operations like updating its node information in the catalog and pe
[anti-entropy](/docs/internals/anti-entropy) syncing. We can create a token using the
ACL API, and the ACL master token we set in the previous step:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -355,7 +355,7 @@ configuration and restart the servers once more to apply it:
In Consul 0.9.1 and later you can also introduce the agent token using an API,
so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -390,7 +390,7 @@ with a configuration file that enables ACLs:
Similar to the previous example, in Consul 0.9.1 and later you can also introduce the
agent token using an API, so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -419,7 +419,7 @@ At this point ACLs are bootstrapped with ACL agent tokens configured, but there
other policies set up. Even basic operations like `consul members` will be restricted
by the ACL default policy of "deny":
-```
+```shell-session
$ consul members
```
@@ -429,7 +429,7 @@ see any nodes by default.
If we supply the token we created above we will be able to see a listing of nodes because
it has write privileges to an empty `node` prefix, meaning it has access to all nodes:
-```
+```shell-session
$ CONSUL_HTTP_TOKEN=fe3b8d40-0ee0-8783-6cc2-ab1aa9bb16c1 consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -442,7 +442,7 @@ configure Consul's behavior when no token is supplied. The anonymous token is ma
like any other ACL token, except that `anonymous` is used for the ID. In this example
we will give the anonymous token read privileges for all nodes:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -459,7 +459,7 @@ $ curl \
The anonymous token is implicitly used if no token is supplied, so now we can run
`consul members` without supplying a token and we will be able to see the nodes:
-```
+```shell-session
$ consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -469,7 +469,7 @@ node-2 127.0.0.2:8301 alive client 0.9.0dev 2 dc1
The anonymous token is also used for DNS lookups since there's no way to pass a
token as part of a DNS request. Here's an example lookup for the "consul" service:
-```
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -495,7 +495,7 @@ consul. 0 IN SOA ns.consul. postmaster.consul. 14
Now we get an `NXDOMAIN` error because the anonymous token doesn't have access to the
"consul" service. Let's add that to the anonymous token's policy:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -511,7 +511,7 @@ $ curl \
With that new policy in place, the DNS lookup will succeed:
-```
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -561,7 +561,7 @@ not function fully using the anonymous ACL token. It is recommended
that a UI-specific ACL token is used, which can be set in the UI during the
web browser session to authenticate the interface.
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -651,7 +651,7 @@ of the rules section.
Here's a sample request using the HCL form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
@@ -664,7 +664,7 @@ $ curl \
Here's an equivalent request using the JSON form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
diff --git a/website/pages/docs/guides/acl-replication.mdx b/website/pages/docs/guides/acl-replication.mdx
index e8540e875a..c6bd25d6cc 100644
--- a/website/pages/docs/guides/acl-replication.mdx
+++ b/website/pages/docs/guides/acl-replication.mdx
@@ -73,7 +73,7 @@ requests to the servers.
Finally, start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -103,7 +103,7 @@ service_prefix "" {
Now that you have the ACL rules defined, create a policy with those rules.
-```shell
+```shell-session
$ consul acl policy create -name replication -rules @replication-policy.hcl
ID: 240f1d01-6517-78d3-ec32-1d237f92ab58
Name: replication
@@ -117,7 +117,7 @@ service_prefix "" { policy = "read" intentions = "read" }
Finally, use your newly created policy to create the replication token.
-```shell
+```shell-session
$ consul acl token create description "replication token" -policy-name replication
AccessorID: 67d55dc1-b667-1835-42ab-64658d64a2ff
SecretID: fc48e84d-3f4d-3646-4b6a-2bff7c4aaffb
@@ -157,7 +157,7 @@ primary datacenter and `enable_token_replication` to true on all the servers.
Now you can start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -167,7 +167,7 @@ Repeat this process on all the servers.
Finally, apply the replication token to all the servers using the CLI.
-```shell
+```shell-session
$ consul acl set-agent-token replication
ACL token "replication" set successfully
```
@@ -201,7 +201,7 @@ name of your primary datacenter and `enable_token_replication` to true.
Now you can start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -213,7 +213,7 @@ first time, you will also need to [set the agent token](/consul/security-network
Now that you have set up ACL replication, you can use the [HTTP API](/api/acl#check-acl-replication) to check
the configuration.
-```shell
+```shell-session
$ curl http://localhost:8500/v1/acl/replication?pretty
{
"Enabled":true,
diff --git a/website/pages/docs/guides/connect-gateways.mdx b/website/pages/docs/guides/connect-gateways.mdx
index 6258e4b1ba..207b483aea 100644
--- a/website/pages/docs/guides/connect-gateways.mdx
+++ b/website/pages/docs/guides/connect-gateways.mdx
@@ -114,7 +114,7 @@ upgrades](/docs/upgrading#standard-upgrades).
Stop the first server by running the following [leave
command](/docs/commands/leave).
-```text
+```shell-session
$ consul leave
```
@@ -184,7 +184,7 @@ Create a file named `mesh-gateway-policy.json` containing the following content.
Next, create and name a new ACL policy using the file you just made.
-```text
+```shell-session
$ consul acl policy create \
-name mesh-gateway \
-rules @mesh-gateway-policy.json
@@ -192,12 +192,12 @@ $ consul acl policy create \
Generate a token for each gateway from the new policy.
-```text
+```shell-session
$ consul acl token create -description "mesh-gateway primary datacenter token" \
-policy-name mesh-gateway
```
-```text
+```shell-session
$ consul acl token create \
-description "mesh-gateway secondary datacenter token" \
-policy-name mesh-gateway
@@ -210,7 +210,7 @@ You’ll apply those tokens when you deploy the gateways.
Register and start the gateway in your primary datacenter with the following
command.
-```text
+```shell-session
$ consul connect envoy -mesh-gateway -register \
-service-name "gateway-primary"
-address "" \
@@ -223,7 +223,7 @@ $ consul connect envoy -mesh-gateway -register \
Register and start the gateway in your secondary datacenter with the following
command.
-```text
+```shell-session
$ consul connect envoy -mesh-gateway -register \
-service-name "gateway-secondary"
-address "" \
@@ -250,7 +250,7 @@ following:
Write the centralized configuration you just created with the following command.
-```text
+```shell-session
$ consul config write proxy-defaults.json
```
@@ -299,27 +299,27 @@ if you are not using socat as an example.
Reload the client with the new or modified registration.
-```text
+```shell-session
$ consul reload
```
Then start Envoy specifying which service it will proxy.
-```text
+```shell-session
$ consul connect envoy -sidecar-for socat
```
If you are using socat as your example, start it now on the port you specified
in your registration by running the following command.
-```text
+```shell-session
$ socat -v tcp-l:8181,fork exec:"/bin/cat"
```
Check that the socat service is running by accessing it using netcat on the same
node. It will echo back anything you type.
-```text
+```shell-session
$ nc 127.0.0.1 8181
hello
hello
@@ -369,13 +369,13 @@ its name and the `8181` with its port.
Reload the client with the new or modified registration.
-```text
+```shell-session
$ consul reload
```
Then start Envoy and specify which service it will proxy.
-```text
+```shell-session
$ consul connect envoy -sidecar-for web
```
@@ -386,7 +386,7 @@ in order for them to communicate with each other. Add an intention to allow the
front end service to access the back end service. For web and socat the command
would look like this.
-```text
+```shell-session
$ consul intention create web socat
```
@@ -402,7 +402,7 @@ other. If you have been using the example web and socat services, from the node
and datacenter where you registered the web service, start netcat and type
something for it to echo.
-```text
+```shell-session
$ nc 127.0.0.1 8181
hello
hello
diff --git a/website/pages/docs/guides/connect-services.mdx b/website/pages/docs/guides/connect-services.mdx
index db3542db92..b0116e3e02 100644
--- a/website/pages/docs/guides/connect-services.mdx
+++ b/website/pages/docs/guides/connect-services.mdx
@@ -49,7 +49,7 @@ the executables to follow along.
To ensure that Consul is running and accessible from the command line, use the
`consul members` command to verify your agent status.
-```shell
+```shell-session
$ consul members
Node Address Status Type Build Protocol DC Segment
hostname.local 127.0.0.1:8301 alive server 1.6.1 2 dc1
@@ -165,12 +165,12 @@ Finally, you can submit the service definitions to your Consul agent. If you
are using the JSON definitions, ensure that the filenames end in ".json"
instead of ".hcl".
-```shell
+```shell-session
$ consul services register counting.hcl
Registered service: counting
```
-```shell
+```shell-session
$ consul services register dashboard.hcl
Registered service: dashboard
```
@@ -183,7 +183,7 @@ register the services.
Now that you have registered your services and sidecar proxies, run `consul catalog services` to verify that they are present.
-```shell
+```shell-session
$ consul catalog services
consul
counting
@@ -208,7 +208,7 @@ service against changes to the implied permissions. For example, a change in
`default_policy` or the introduction of a global deny-all intention would
impact services without explicit intentions defined.
-```shell
+```shell-session
$ consul intention create dashboard counting
Created: dashboard => counting (allow)
```
@@ -223,7 +223,7 @@ shell session.
Run these commands to start the applications:
-```shell
+```shell-session
$ PORT=9002 COUNTING_SERVICE_URL="http://localhost:5000" ./dashboard-service &
$ PORT=9003 ./counting-service &
```
@@ -234,7 +234,7 @@ the service applications.
We are using the Consul Connect's built-in proxy for this guide. In a
production deployment, we recommend using Envoy instead.
-```shell
+```shell-session
$ consul connect proxy -sidecar-for counting > counting-proxy.log &
$ consul connect proxy -sidecar-for dashboard > dashboard-proxy.log &
```
@@ -264,7 +264,7 @@ traffic with an intention.
First, deny the Dashboard service access to the Counting service.
-```shell
+```shell-session
$ consul intention create -deny -replace dashboard counting
Created: dashboard => counting (deny)
```
@@ -282,7 +282,7 @@ numbers.][img-screenshot2]][img-screenshot2]
You can restore communication between the services by replacing the `deny`
intention with an `allow`.
-```shell
+```shell-session
$ consul intention create -allow -replace dashboard counting
```
@@ -297,14 +297,14 @@ running. This should automatically stop these processes.
Delete the intention from Consul.
-```shell
+```shell-session
$ consul intention delete dashboard counting
Intention deleted.
```
Deregister the services.
-```shell
+```shell-session
$ consul services deregister counting.hcl
Deregistered service: counting
@@ -365,7 +365,7 @@ extract the binary from the official Envoy Docker containers.
To do this, create a container named "envoy-extract" based on the
"envoyproxy/envoy" container.
-```shell
+```shell-session
$ docker create --name "envoy-extract" "envoyproxy/envoy"
docker create --name "envoy-extract" "envoyproxy/envoy"
Unable to find image 'envoyproxy/envoy:latest' locally
@@ -387,13 +387,13 @@ Status: Downloaded newer image for envoyproxy/envoy:latest
Use the `docker cp` command to copy the envoy file out of the container into
the current directory.
-```shell
+```shell-session
$ docker cp "envoy-extract:/usr/local/bin/envoy" "envoy"
```
Now that you have the binary, you can remove the "envoy-extract" container.
-```shell
+```shell-session
$ docker rm "envoy-extract"
envoy-extract
```
@@ -402,7 +402,7 @@ Once you have the binary extracted and in your path, Consul will automatically
use it when you run the `consul connect envoy` command. The following examples
demonstrate how to start the service sidecar proxies with Envoy.
-```shell
+```shell-session
$ consul connect envoy -sidecar-for counting > counting-proxy.log &
$ consul connect envoy -sidecar-for dashboard > dashboard-proxy.log &
```
diff --git a/website/pages/docs/guides/consul-f5.mdx b/website/pages/docs/guides/consul-f5.mdx
index b191a262df..e8b579bbd0 100644
--- a/website/pages/docs/guides/consul-f5.mdx
+++ b/website/pages/docs/guides/consul-f5.mdx
@@ -52,7 +52,7 @@ Check your environment to ensure you have a healthy Consul datacenter by
checking your datacenter members. You can do this by running the `consul members` command on the machine where Consul is running, or by accessing the
Consul web UI at the IP address of your consul instances, on port 8500.
-```shell
+```shell-session
$ consul memberss
Node Address Status Type Build Protocol DC Segment
consul 10.0.0.100:8301 alive server 1.5.3 2 dc1
@@ -89,7 +89,7 @@ check for the web server so that Consul can monitor its health.
Reload the client to read the new service definition.
-```shell
+```shell-session
$ consul reload
```
@@ -110,7 +110,7 @@ First construct an authorization header to authenticate our API call with
BIG-IP. You will need to use a username and password for your instance. Below is
an example for username “admin”, and password “password”.
-```shell
+```shell-session
$ echo -n 'admin:password' | base64
YWRtaW46YWRtaW4=
```
@@ -119,7 +119,7 @@ Now use cURL to send the authorized declaration to the BIG-IP Instance. Use the
value you created above for your BIG-IP instance in the authorization header.
Remember t o replace `` with the real IP address.
-```shell
+```shell-session
$ curl -X POST \
https:///mgmt/shared/appsvcs/declare \
-H 'authorization: Basic ' \
@@ -249,7 +249,7 @@ You can read more about composing AS3 declarations in the [F5 documentation](htt
Use the `consul monitor` command on the consul agent specified in the AS3 URI to
verify that you are receiving catalog requests from the BIG-IP instance.
-```shell
+```shell-session
$ consul monitor -log-level=debug
2019/09/06 03:16:50 [DEBUG] http: Request GET /v1/catalog/service/nginx (103.796µs) from=10.0.0.200:29487
2019/09/06 03:16:55 [DEBUG] http: Request GET /v1/catalog/service/nginx (104.95µs) from=10.0.0.200:42079
@@ -279,7 +279,7 @@ documentation](https://support.f5.com/csp/article/K20448153#accessing%20map).
Now that you have a healthy virtual service, you can use it to access your web
server.
-```shell
+```shell-session
$ curl :8080
diff --git a/website/pages/docs/guides/consul-splitting.mdx b/website/pages/docs/guides/consul-splitting.mdx
index 9cfc55344e..3cc92fa30c 100644
--- a/website/pages/docs/guides/consul-splitting.mdx
+++ b/website/pages/docs/guides/consul-splitting.mdx
@@ -58,7 +58,7 @@ in a canary deployment.
First clone the repo containing the source and examples for this guide.
-```shell
+```shell-session
$ git clone git@github.com:hashicorp/consul-demo-traffic-splitting.git
```
@@ -66,7 +66,7 @@ Change directories into the cloned folder, and start the demo environment with
`docker-compose up`. This command will run in the foreground, so you’ll need to
open a new terminal window after you run it.
-```shell
+```shell-session
$ docker-compose up
Creating consul-demo-traffic-splitting_api_v1_1 ... done
@@ -135,7 +135,7 @@ version 1 of the API service, and a sidecar for the API service.
Curl the Web endpoint to make sure that the whole application is running. The
Web service will get a response from version 1 of the API service.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -178,7 +178,7 @@ contains the following.
To apply the configuration, you can either use the Consul CLI or the API. In
this example we’ll use the CLI to write the configuration, providing the file location.
-```shell
+```shell-session
$ consul config write l7_config/api_service_defaults.json
```
@@ -227,7 +227,7 @@ configuration.
Write the service resolver configuration entry using the CLI and providing the
location, just like in the previous example.
-```shell
+```shell-session
$ consul config write l7_config/api_service_resolver.json
```
@@ -278,7 +278,7 @@ configuration.
Write this configuration entry using the CLI as well.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_100_0.json
```
@@ -293,7 +293,7 @@ splitting. Start the service, register it, and start its connect sidecar with
the following command. This command will run in the foreground, so you’ll need
to open a new terminal window after you run it.
-```shell
+```shell-session
$ docker-compose -f docker-compose-v2.yml up
```
@@ -333,7 +333,7 @@ contains the following.
Write the new configuration using the CLI.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_50_50.json
```
@@ -341,7 +341,7 @@ Now that you’ve increased the percentage of traffic to v2, curl the web servic
again. Consul will equally distribute traffic across both of the service
subsets.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -381,14 +381,14 @@ configuration for a 100% split to version 2 contains the following.
Apply it with the CLI, providing the path to the configuration entry.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_0_100.json
```
Now when you curl the web service again. 100% of traffic goes to the version
2 subset.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -423,7 +423,7 @@ environments in the opposite order that you created them in.
First you’ll stop and remove the containers created for v2 of the API service.
-```shell
+```shell-session
$ docker-compose -f docker-compose-v2.yml down
Stopping consul-demo-traffic-splitting_api_proxy_v2_1 ... done
Stopping consul-demo-traffic-splitting_api_v2_1 ... done
@@ -436,7 +436,7 @@ Network consul-demo-traffic-splitting_vpcbr is external, skipping
Then, you’ll stop and remove the containers and the network that you created in
the first docker compose command.
-```shell
+```shell-session
$ docker-compose down
Stopping consul-demo-traffic-splitting_api_proxy_v1_1 ... done
Stopping consul-demo-traffic-splitting_web_envoy_1 ... done
diff --git a/website/pages/docs/guides/containers-guide.mdx b/website/pages/docs/guides/containers-guide.mdx
index 66d27df6ce..dcc5bd378d 100644
--- a/website/pages/docs/guides/containers-guide.mdx
+++ b/website/pages/docs/guides/containers-guide.mdx
@@ -40,13 +40,13 @@ If you would like to interact with your containerized Consul agents using a loca
First, pull the latest image. You will use Consul's official Docker image in this guide.
-```shell
+```shell-session
$ docker pull consul
```
Check the image was downloaded by listing Docker images that match `consul`.
-```shell
+```shell-session
$ docker images -f 'reference=consul'
REPOSITORY TAG IMAGE ID CREATED SIZE
consul latest c836e84db154 4 days ago 107MB
@@ -56,7 +56,7 @@ consul latest c836e84db154 4 days ago 107MB
Next, you will use Docker command-line flags to start the agent as a server, configure networking, and bootstrap the datacenter when one server is up.
-```shell
+```shell-session
$ docker run \
-d \
-p 8500:8500 \
@@ -77,7 +77,7 @@ To avoid mounting volumes or copying files to the container you can also save [c
You can find the IP address of the Consul server by executing the `consul members` command inside of the `badger` container.
-```shell
+```shell-session
$ docker exec badger consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.4.4 2 dc1
@@ -87,7 +87,7 @@ server-1 172.17.0.2:8301 alive server 1.4.4 2 dc1
Next, deploy a containerized Consul client and instruct it to join the server by giving it the server's IP address. Do not use detached mode, so you can reference the client logs during later steps.
-```shell
+```shell-session
$ docker run \
--name=fox \
consul agent -node=client-1 -join=172.17.0.2
@@ -108,7 +108,7 @@ $ docker run \
In a new terminal, check that the client has joined by executing the `consul members` command again in the Consul server container.
-```shell
+```shell-session
$ docker exec badger consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.4.3 2 dc1
@@ -125,7 +125,7 @@ Start a service in a third container and register it with the Consul client. The
Pull the container and run it with port forwarding so that you can access it from your web browser by visiting [http://localhost:9001](http://localhost:9001).
-```shell
+```shell-session
$ docker pull hashicorp/counting-service:0.0.2
$ docker run \
-p 9001:9001 \
@@ -136,14 +136,14 @@ $ docker run \
Next, you will register the counting service with the Consul client by adding a service definition file called `counting.json` in the directory `consul/config`.
-```shell
+```shell-session
$ docker exec fox /bin/sh -c "echo '{\"service\": {\"name\": \"counting\", \"tags\": [\"go\"], \"port\": 9001}}' >> /consul/config/counting.json"
```
Since the Consul client does not automatically detect changes in the
configuration directory, you will need to issue a reload command for the same container.
-```shell
+```shell-session
$ docker exec fox consul reload
Configuration reload triggered
```
@@ -160,7 +160,7 @@ If you go back to the terminal window where you started the client, you should s
Now you can query Consul for the location of your service using the following dig command against Consul's DNS.
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 counting.service.consul
; <<>> DiG 9.10.6 <<>> @127.0.0.1 -p 8600 counting.service.consul
@@ -202,7 +202,7 @@ You can access a containerized Consul datacenter in several different ways.
You can execute Consul commands directly inside of your Consul containers using `docker exec`.
-```shell
+```shell-session
$ docker exec consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.5.2 2 dc1
@@ -213,7 +213,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
You can also issue commands inside of your container by opening an interactive shell and using the Consul binary included in the container.
-```shell
+```shell-session
$ docker exec -it /bin/sh
/ # consul members
Node Address Status Type Build Protocol DC Segment
@@ -225,7 +225,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
If you have a local Consul binary in your PATH you can also export the `CONSUL_HTTP_ADDR` environment variable to point to the HTTP address of a remote Consul server. This will allow you to bypass `docker exec consul ` and use `consul ` directly.
-```shell
+```shell-session
$ export CONSUL_HTTP_ADDR=:8500
$ consul members
Node Address Status Type Build Protocol DC Segment
@@ -235,7 +235,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
In this guide, you are binding your containerized Consul server's client address to 0.0.0.0 which allows us to communicate with our Consul datacenter with a local Consul install. By default, the client address is bound to localhost.
-```shell
+```shell-session
$ which consul
/usr/local/bin/consul
$ consul members
@@ -248,19 +248,19 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
The official Consul container supports stopping, starting, and restarting. To stop a container, run `docker stop`.
-```shell
+```shell-session
$ docker stop
```
To start a container, run `docker start`.
-```shell
+```shell-session
$ docker start
```
To do an in-memory reload, send a SIGHUP to the container.
-```shell
+```shell-session
$ docker kill --signal=HUP
```
@@ -280,13 +280,13 @@ When a previously stopped server container is restarted using `docker start consul snapshot save backup.snap
```
This will leave the `backup.snap` snapshot file inside of your container. If you are not saving your snapshot to a [persistent volume](https://docs.docker.com/storage/volumes/) then you will need to use `docker cp` to move your snapshot to a location outside of your container.
-```shell
+```shell-session
$ docker cp :backup.snap ./
```
@@ -296,7 +296,7 @@ Users running the Consul Enterprise Docker containers can run the [consul snapsh
You can add configuration by passing the configuration JSON via the environment variable `CONSUL_LOCAL_CONFIG`.
-```shell
+```shell-session
$ docker run \
-d \
-e CONSUL_LOCAL_CONFIG='{
@@ -311,7 +311,7 @@ Setting `CONSUL_CLIENT_INTERFACE` or `CONSUL_BIND_INTERFACE` on `docker run` is
Setting the `CONSUL_ALLOW_PRIVILEGED_PORTS` runs setcap on the Consul binary, allowing it to bind to privileged ports. Note that not all Docker storage backends support this feature (notably AUFS).
-```shell
+```shell-session
$ docker run -d --net=host -e 'CONSUL_ALLOW_PRIVILEGED_PORTS=' consul -dns-port=53 -recursor=8.8.8.8
```
diff --git a/website/pages/docs/guides/discovery-namespaces.mdx b/website/pages/docs/guides/discovery-namespaces.mdx
index ae01022278..fc9f7ca64f 100644
--- a/website/pages/docs/guides/discovery-namespaces.mdx
+++ b/website/pages/docs/guides/discovery-namespaces.mdx
@@ -40,7 +40,7 @@ You should have at least one namespace configured. Review the [namespace
management]() documentation or execute the following command to create a
namespace.
-```shell
+```shell-session
$ consul namespace create app-team
```
@@ -76,7 +76,7 @@ service {
Next, register the service and its sidecar proxy using the Consul CLI by
specifying the registration file.
-```shell
+```shell-session
$ consul services register mysql.hcl
```
@@ -101,7 +101,7 @@ service {
Next register the service and its sidecar proxy.
-```shell
+```shell-session
$ consul services register wordpress.hcl -namespace app-team
```
@@ -116,7 +116,7 @@ To get a list of services in the default namespace use the `consul catalog` CLI
command. You do not need to add the flag any discover services in the `default`
namespace.
-```shell
+```shell-session
$ consul catalog services
consul
mysql
@@ -130,7 +130,7 @@ Add the `-namepsace` flag to discover services within a user-created namespace.
In the example below, you will use the `-namespace` flag with the CLI to
discover all services registered in the app-team namespace.
-```shell
+```shell-session
$ consul catalog services -namespace app-team
consul
wordpress
@@ -141,7 +141,7 @@ Notice that you do not see services that are registered in the default
namespace. To discover all services in the catalog, you will need to query all
Consul namespaces.
-```shell
+```shell-session
$ consul catalog services
consul
mysql
@@ -173,7 +173,7 @@ datacenter to the query, `service.namespace.datacenter.consul`.
To discover the location of service instances, you can use the DNS interface.
-```shell
+```shell-session
$ dig 127.0.0.1 -p 8500 wordpress.service.app-team.consul