--- layout: "vault" page_title: "Vault: vault_generic_secret resource" sidebar_current: "docs-vault-resource-generic-secret" description: |- Writes arbitrary data to a given path in Vault --- # vault\_generic\_secret Writes and manages arbitrary data at a given path in Vault. This resource is primarily intended to be used with [Vault's "generic" secret backend](https://www.vaultproject.io/docs/secrets/generic/index.html), but it is also compatible with any other Vault endpoint that supports the `vault write` command to create and the `vault delete` command to delete. ~> **Important** All data provided in the resource configuration will be written in cleartext to state and plan files generated by Terraform, and will appear in the console output when Terraform runs. Protect these artifacts accordingly. See [the main provider documentation](../index.html) for more details. ## Example Usage ``` resource "vault_generic_secret" "example" { path = "secret/foo" data_json = <