Skip to content

Commit bf92f13

Browse files
authored
Add new configuration document for connection vault (#122)
1 parent 8bc5666 commit bf92f13

File tree

1 file changed

+41
-0
lines changed
  • docs/reference/config-files/connection

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: vault
3+
sidebar_label: vault
4+
---
5+
6+
# vault
7+
8+
The `vault` connection can be used to access Vault resources.
9+
10+
```hcl
11+
connection "vault" "my_vault" {
12+
address = "http://127.0.0.1:8200"
13+
token = "hvs.FaKe"
14+
}
15+
```
16+
17+
## Arguments
18+
19+
| Name | Type | Required? | Description |
20+
| --------- | ------ | --------- | -------------------- |
21+
| `address` | String | Optional | Vault server address |
22+
| `token` | String | Optional | API token |
23+
24+
All arguments are optional, and a `vault` connection with no arguments will behave the same as the [default connection](#default-connection).
25+
26+
## Attributes (Read-Only)
27+
28+
| Attribute | Type | Description |
29+
| --------- | ---- | -------------------------------------------------------------------------------------------- |
30+
| `env` | Map | A map of the resolved connection-related environment variables (`VAULT_ADDR`, `VAULT_TOKEN`) |
31+
32+
## Default Connection
33+
34+
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`.
35+
36+
```hcl
37+
connection "vault" "default" {
38+
domain = env("VAULT_ADDR")
39+
token = env("VAULT_TOKEN")
40+
}
41+
```

0 commit comments

Comments
 (0)