Files
terraform-provider-threshold/docs/resources/credential_library_vault.md
T
dependabot[bot]andJohan Brandhorst-Satzkorn 85f9a3d081 build(deps): bump the go group across 1 directory with 2 updates (#714)
* build(deps): bump the go group across 1 directory with 2 updates

Bumps the go group with 2 updates in the / directory: [github.com/hashicorp/boundary/sdk](https://github.com/hashicorp/boundary) and [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs).

Updates `github.com/hashicorp/boundary/sdk` from 0.0.52 to 0.0.53
- [Release notes](https://github.com/hashicorp/boundary/releases)
- [Changelog](https://github.com/hashicorp/boundary/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/boundary/compare/api/v0.0.52...api/v0.0.53)

Updates `github.com/hashicorp/terraform-plugin-docs` from 0.21.0 to 0.22.0
- [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/boundary/sdk
  dependency-version: 0.0.53
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/hashicorp/terraform-plugin-docs
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>

* Regenerate docs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2025-07-08 13:23:01 -04:00

4.2 KiB

page_title, subcategory, description
page_title subcategory description
boundary_credential_library_vault Resource - terraform-provider-boundary 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

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!"
  address     = "http://127.0.0.1:8200"      # change to Vault address
  token       = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token
  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
  path                = "my/secret/foo" # change to Vault backend path
  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
  path                = "my/secret/bar" # change to Vault backend path
  http_method         = "POST"
  http_request_body   = <<EOT
{
  "key": "Value",
}
EOT
}

resource "boundary_credential_library_vault" "baz" {
  name                = "baz"
  description         = "vault username password credential with mapping overrides"
  credential_store_id = boundary_credential_store_vault.foo.id
  path                = "my/secret/baz" # change to Vault backend path
  http_method         = "GET"
  credential_type     = "username_password"
  credential_mapping_overrides = {
    password_attribute = "alternative_password_label"
    username_attribute = "alternative_username_label"
  }
}

resource "boundary_credential_library_vault" "quz" {
  name                = "quz"
  description         = "vault ssh private key credential with mapping overrides"
  credential_store_id = boundary_credential_store_vault.foo.id
  path                = "my/secret/quz" # change to Vault backend path
  http_method         = "GET"
  credential_type     = "ssh_private_key"
  credential_mapping_overrides = {
    private_key_attribute            = "alternative_key_label"
    private_key_passphrase_attribute = "alternative_passphrase_label"
    username_attribute               = "alternative_username_label"
  }
}

Schema

Required

  • credential_store_id (String) The ID of the credential store that this library belongs to.
  • path (String) The path in Vault to request credentials from.

Optional

  • credential_mapping_overrides (Map of String) The credential mapping override.
  • credential_type (String) The type of credential the library generates. Cannot be updated on an existing resource.
  • description (String) The Vault credential library description.
  • 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.
  • 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:

The terraform import command can be used, for example:

terraform import boundary_credential_library_vault.foo <my-id>