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

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Intention Create"
     4  sidebar_current: "docs-commands-intention-create"
     5  ---
     6  
     7  # Consul Intention Create
     8  
     9  Command: `consul intention create`
    10  
    11  The `intention create` command creates or updates an intention.
    12  
    13  ## Usage
    14  
    15  Usage: `consul intention create [options] SRC DST`
    16  Usage: `consul intention create [options] -f FILE...`
    17  
    18  #### API Options
    19  
    20  <%= partial "docs/commands/http_api_options_client" %>
    21  
    22  #### Intention Create Options
    23  
    24  * `-allow` - Set the action to "allow" for intentions. This is the default.
    25  
    26  * `-deny` - Set the action to "deny" for intentions. This cannot be specified
    27    with `-allow`.
    28  
    29  * `-file` - Read intention data one or more files specified by the command
    30    line arguments, instead of source/destination pairs.
    31  
    32  * `-meta key=value` - Specify arbitrary KV metadata to associate with the
    33    intention.
    34  
    35  * `-replace` - Replace any matching intention. The replacement is done
    36    atomically per intention.
    37  
    38  ## Examples
    39  
    40  Create an intention `web => db`:
    41  
    42      $ consul intention create web db
    43  
    44  Create intentions from a set of files:
    45  
    46      $ consul intention create -file one.json two.json
    47  
    48  Create intentions from a directory using shell expansion:
    49  
    50      $ consul intention create -file intentions/*.json
    51