2017-09-08 02:10:55 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: policy fmt - Command
|
|
|
|
sidebar_title: <code>fmt</code>
|
2017-09-08 02:10:55 +00:00
|
|
|
description: |-
|
|
|
|
The "policy fmt" formats a local policy file to the policy specification. This
|
|
|
|
command will overwrite the file at the given PATH with the properly-formatted
|
|
|
|
policy file contents.
|
|
|
|
---
|
|
|
|
|
|
|
|
# policy fmt
|
|
|
|
|
|
|
|
The `policy fmt` formats a local policy file to the policy specification. This
|
|
|
|
command will overwrite the file at the given PATH with the properly-formatted
|
|
|
|
policy file contents.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Format the local file "my-policy.hcl":
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:10:55 +00:00
|
|
|
$ vault policy fmt my-policy.hcl
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2020-01-22 20:05:41 +00:00
|
|
|
There are no flags beyond the [standard set of flags](/docs/commands)
|
2017-09-08 02:10:55 +00:00
|
|
|
included on all commands.
|