open-consul/website/source/docs/commands/intention/create.html.md.erb
Mitchell Hashimoto 8dbe0017bb Starting Docs (#46)
* website: first stab at Connect docs

* website: lots more various stuff (bad commit messages)

* website: getting started page for Connect

* website: intentions

* website: intention APIs

* website: agent API docs

* website: document agent/catalog proxy kind service values

* website: /v1/catalog/connect/:service

* website: intention CLI docs

* website: custom proxy docs

* website: remove dedicated getting started guide

* website: add docs for CA API endpoints

* website: add docs for connect ca commands

* website: add proxy CLI docs

* website: clean up proxy command, add dev docs

* website: todo pages

* website: connect security
2018-06-25 12:24:05 -07:00

52 lines
1.2 KiB
Plaintext

---
layout: "docs"
page_title: "Commands: Intention Create"
sidebar_current: "docs-commands-intention-create"
---
# Consul Intention Create
Command: `consul intention create`
The `intention create` command creates or updates an intention.
## Usage
Usage: `consul intention create [options] SRC DST`
Usage: `consul intention create [options] -f FILE...`
#### API Options
<%= partial "docs/commands/http_api_options_client" %>
#### Intention Create Options
* `-allow` - Set the action to "allow" for intentions. This is the default.
* `-deny` - Set the action to "deny" for intentions. This cannot be specified
with `-allow`.
* `-file` - Read intention data one or more files specified by the command
line arguments, instead of source/destination pairs.
* `-meta key=value` - Specify arbitrary KV metadata to associate with the
intention.
* `-replace` - Replace any matching intention. The replacement is done
atomically per intention.
## Examples
Create an intention `web => db`:
$ consul intention create web db
Create intentions from a set of files:
$ consul intention create -file one.json two.json
Create intentions from a directory using shell expansion:
$ consul intention create -file intentions/*.json