2021-06-22 21:07:07 -07:00
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title : "boundary_credential_library_vault Resource - terraform-provider-boundary"
subcategory : ""
description : |-
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
---
# boundary_credential_library_vault (Resource)
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope . org . id
auto_create_admin_role = true
}
resource "boundary_credential_store_vault" "foo" {
name = "foo"
description = "My first Vault credential store!"
2021-06-25 13:30:23 -07:00
address = "http://127.0.0.1:8200" # change to Vault address
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token
2021-06-22 21:07:07 -07:00
scope_id = boundary_scope . project . id
}
resource "boundary_credential_library_vault" "foo" {
name = "foo"
description = "My first Vault credential library!"
credential_store_id = boundary_credential_store_vault . foo . id
2021-06-25 13:30:23 -07:00
path = "my/secret/foo" # change to Vault backend path
2021-06-22 21:07:07 -07:00
http_method = "GET"
}
resource "boundary_credential_library_vault" "bar" {
name = "bar"
description = "My second Vault credential library!"
credential_store_id = boundary_credential_store_vault . foo . id
2021-06-30 19:40:27 -04:00
path = "my/secret/bar" # change to Vault backend path
2021-06-22 21:07:07 -07:00
http_method = "POST"
request_body = <<EOT
{
"key": "Value",
}
EOT
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- **credential_store_id** (String) The ID of the credential store that this library belongs to.
2021-06-25 13:30:23 -07:00
- **path** (String) The path in Vault to request credentials from.
2021-06-22 21:07:07 -07:00
### Optional
- **description** (String) The Vault credential library description.
2021-06-25 13:30:23 -07:00
- **http_method** (String) The HTTP method the library uses when requesting credentials from Vault. Defaults to 'GET'
- **http_request_body** (String) The body of the HTTP request the library sends to Vault when requesting credentials. Only valid if `http_method` is set to `POST` .
2021-06-22 21:07:07 -07:00
- **name** (String) The Vault credential library name. Defaults to the resource name.
### Read-Only
- **id** (String) The ID of the Vault credential library.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_credential_library_vault.foo <my-id>
```