github.com/outbrain/consul@v1.4.5/website/source/docs/commands/intention.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Intention"
     4  sidebar_current: "docs-commands-intention"
     5  ---
     6  
     7  # Consul Intention
     8  
     9  Command: `consul intention`
    10  
    11  The `intention` command is used to interact with Connect
    12  [intentions](/docs/connect/intentions.html). It exposes commands for
    13  creating, updating, reading, deleting, checking, and managing intentions.
    14  This command is available in Consul 1.2 and later.
    15  
    16  Intentions may also be managed via the [HTTP API](/api/connect/intentions.html).
    17  
    18  ## Usage
    19  
    20  Usage: `consul intention <subcommand>`
    21  
    22  For the exact documentation for your Consul version, run `consul intention -h` to view
    23  the complete list of subcommands.
    24  
    25  ```text
    26  Usage: consul intention <subcommand> [options] [args]
    27  
    28    ...
    29  
    30  Subcommands:
    31      check     Check whether a connection between two services is allowed.
    32      create    Create intentions for service connections.
    33      delete    Delete an intention.
    34      get       Show information about an intention.
    35      match     Show intentions that match a source or destination.
    36  ```
    37  
    38  For more information, examples, and usage about a subcommand, click on the name
    39  of the subcommand in the sidebar.
    40  
    41  ## Basic Examples
    42  
    43  Create an intention to allow "web" to talk to "db":
    44  
    45      $ consul intention create web db
    46  
    47  Test whether a "web" is allowed to connect to "db":
    48  
    49      $ consul intention check web db
    50  
    51  Find all intentions for communicating to the "db" service:
    52  
    53      $ consul intention match db
    54