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

Commit a6c156e

Browse files
committed
allow specifying the vault jwt token directly
1 parent 0b8e44a commit a6c156e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

vault-jwt/main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ variable "vault_addr" {
2020
description = "The address of the Vault server."
2121
}
2222

23+
variable "vault_jwt_token" {
24+
type = string
25+
description = "The JWT token used for authentication with Vault."
26+
default = data.coder_workspace_owner.me.oidc_access_token
27+
sensitive = true
28+
}
29+
2330
variable "vault_jwt_auth_path" {
2431
type = string
2532
description = "The path to the Vault JWT auth method."
@@ -46,7 +53,7 @@ resource "coder_script" "vault" {
4653
display_name = "Vault (GitHub)"
4754
icon = "/icon/vault.svg"
4855
script = templatefile("${path.module}/run.sh", {
49-
CODER_OIDC_ACCESS_TOKEN : data.coder_workspace_owner.me.oidc_access_token,
56+
CODER_OIDC_ACCESS_TOKEN : var.vault_jwt_token,
5057
VAULT_JWT_AUTH_PATH : var.vault_jwt_auth_path,
5158
VAULT_JWT_ROLE : var.vault_jwt_role,
5259
VAULT_CLI_VERSION : var.vault_cli_version,

0 commit comments

Comments
 (0)