Vault
policy
[!IMPORTANT]
Documentation Update: Product documentation, which were located in this repository under/website
, are now located inhashicorp/web-unified-docs
, colocated with all other product documentation. Contributions to this content should be done in theweb-unified-docs
repo, and not this one. Changes made to/website
content in this repo will not be reflected on the developer.hashicorp.com website.
The policy
command groups subcommands for interacting with policies. Users can
write, read, and list policies in Vault.
For more information, please see the policy documentation.
Examples
List all enabled policies:
$ vault policy list
Create a policy named "my-policy" from contents on local disk:
$ vault policy write my-policy ./my-policy.hcl
Delete the policy named my-policy:
$ vault policy delete my-policy
Usage
Usage: vault policy <subcommand> [options] [args]
# ...
Subcommands:
delete Deletes a policy by name
list Lists the installed policies
read Prints the contents of a policy
write Uploads a named policy from a file
For more information, examples, and usage about a subcommand, click on the name of the subcommand in the sidebar.