2017-09-15 04:31:15 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: acl policy apply'
|
|
|
|
description: |
|
2017-09-15 04:31:15 +00:00
|
|
|
The policy apply command is used to create or update ACL policies.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: acl policy apply
|
|
|
|
|
|
|
|
The `acl policy apply` command is used to create or update ACL policies.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2017-09-15 04:31:15 +00:00
|
|
|
nomad acl policy apply [options] <name> <path>
|
|
|
|
```
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `acl policy apply` command requires two arguments, the policy name and path
|
|
|
|
to file. The policy can be read from stdin by setting the path to "-".
|
2017-09-15 04:31:15 +00:00
|
|
|
|
2020-11-19 21:38:08 +00:00
|
|
|
This command requires a management ACL token.
|
|
|
|
|
2017-09-15 04:31:15 +00:00
|
|
|
## General Options
|
|
|
|
|
2020-11-19 18:02:48 +00:00
|
|
|
@include 'general_options_no_namespace.mdx'
|
2017-09-15 04:31:15 +00:00
|
|
|
|
|
|
|
## Apply Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-description`: Sets the human readable description for the ACL policy.
|
2017-09-15 04:31:15 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2017-09-15 05:05:17 +00:00
|
|
|
Create a new ACL Policy:
|
2017-09-15 04:31:15 +00:00
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad acl policy apply my-policy my-policy.json
|
2017-09-15 04:31:15 +00:00
|
|
|
Successfully wrote 'my-policy' ACL policy!
|
|
|
|
```
|