2017-02-13 19:53:45 +01:00
|
|
|
---
|
|
|
|
layout: "vault"
|
|
|
|
page_title: "Vault: vault_policy resource"
|
|
|
|
sidebar_current: "docs-vault-resource-policy"
|
|
|
|
description: |-
|
|
|
|
Writes arbitrary policies for Vault
|
|
|
|
---
|
|
|
|
|
|
|
|
# vault\_policy
|
|
|
|
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-08 01:43:24 +02:00
|
|
|
```hcl
|
2017-02-13 19:53:45 +01:00
|
|
|
resource "vault_policy" "example" {
|
|
|
|
name = "dev-team"
|
|
|
|
|
|
|
|
policy = <<EOT
|
|
|
|
path "secret/my_app" {
|
|
|
|
policy = "write"
|
|
|
|
}
|
|
|
|
EOT
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the policy
|
|
|
|
|
|
|
|
* `policy` - (Required) String containing a Vault policy
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
No additional attributes are exported by this resource.
|