Skip to content

Instantly share code, notes, and snippets.

@ryanvgates
Created June 30, 2023 20:37
Show Gist options
  • Save ryanvgates/35d89fdcab39151edc50908ae9aa72e2 to your computer and use it in GitHub Desktop.
Save ryanvgates/35d89fdcab39151edc50908ae9aa72e2 to your computer and use it in GitHub Desktop.
Vault CLI Create Policy
┌─[ryan@host] - [~] - [Thu Jun 22, 14:13]
└─[$] <> cat new-policy.hcl
path "secrets/data/env1/app1/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
path "secrets/data/env2/app2/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
┌─[ryan@host] - [~] - [Thu Jun 22, 14:13]
└─[$] <> cat new-policy.hcl | vault policy write new-policy -
Success! Uploaded policy: new-policy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment