Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

feat(vault-jwt): allow specifying the vault jwt token directly #436

Merged
merged 21 commits into from
May 8, 2025
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
9 changes: 8 additions & 1 deletion vault-jwt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ variable "vault_addr" {
description = "The address of the Vault server."
}

variable "vault_jwt_token" {
type = string
description = "The JWT token used for authentication with Vault."
default = null
sensitive = true
}

variable "vault_jwt_auth_path" {
type = string
description = "The path to the Vault JWT auth method."
Expand All @@ -46,7 +53,7 @@ resource "coder_script" "vault" {
display_name = "Vault (GitHub)"
icon = "/icon/vault.svg"
script = templatefile("${path.module}/run.sh", {
CODER_OIDC_ACCESS_TOKEN : data.coder_workspace_owner.me.oidc_access_token,
CODER_OIDC_ACCESS_TOKEN : var.vault_jwt_token != null ? var.vault_jwt_token : data.coder_workspace_owner.me.oidc_access_token,
VAULT_JWT_AUTH_PATH : var.vault_jwt_auth_path,
VAULT_JWT_ROLE : var.vault_jwt_role,
VAULT_CLI_VERSION : var.vault_cli_version,
Expand Down