-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new configuration document for connection vault (#122)
- Loading branch information
1 parent
8bc5666
commit bf92f13
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: vault | ||
sidebar_label: vault | ||
--- | ||
|
||
# vault | ||
|
||
The `vault` connection can be used to access Vault resources. | ||
|
||
```hcl | ||
connection "vault" "my_vault" { | ||
address = "http://127.0.0.1:8200" | ||
token = "hvs.FaKe" | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required? | Description | | ||
| --------- | ------ | --------- | -------------------- | | ||
| `address` | String | Optional | Vault server address | | ||
| `token` | String | Optional | API token | | ||
|
||
All arguments are optional, and a `vault` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
## Attributes (Read-Only) | ||
|
||
| Attribute | Type | Description | | ||
| --------- | ---- | -------------------------------------------------------------------------------------------- | | ||
| `env` | Map | A map of the resolved connection-related environment variables (`VAULT_ADDR`, `VAULT_TOKEN`) | | ||
|
||
## Default Connection | ||
|
||
The `vault` connection type includes an implicit, default connection (`connection.vault.default`) that will be configured to set the `token` to the `VAULT_TOKEN` environment variable and the `domain` to `VAULT_ADDR`. | ||
|
||
```hcl | ||
connection "vault" "default" { | ||
domain = env("VAULT_ADDR") | ||
token = env("VAULT_TOKEN") | ||
} | ||
``` |