Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions registry/coder/modules/vault-token/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ variable "vault_token" {

module "vault" {
source = "registry.coder.com/coder/vault-token/coder"
version = "1.0.7"
version = "1.1.0"
agent_id = coder_agent.example.id
vault_token = var.token
vault_token = var.token # optional
vault_addr = "https://vault.example.com"
}
```
Expand Down Expand Up @@ -74,10 +74,10 @@ variable "vault_token" {

module "vault" {
source = "registry.coder.com/coder/vault-token/coder"
version = "1.0.7"
version = "1.1.0"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
vault_token = var.token
vault_cli_version = "1.15.0"
vault_cli_version = "1.19.0"
}
```
1 change: 0 additions & 1 deletion registry/coder/modules/vault-token/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ describe("vault-token", async () => {
testRequiredVariables(import.meta.dir, {
agent_id: "foo",
vault_addr: "foo",
vault_token: "foo",
});
});
2 changes: 2 additions & 0 deletions registry/coder/modules/vault-token/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ variable "vault_token" {
type = string
description = "The Vault token to use for authentication."
sensitive = true
default = null
}

variable "vault_cli_version" {
Expand Down Expand Up @@ -56,6 +57,7 @@ resource "coder_env" "vault_addr" {
}

resource "coder_env" "vault_token" {
count = var.vault_token != null ? 1 : 0
agent_id = var.agent_id
name = "VAULT_TOKEN"
value = var.vault_token
Expand Down