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

Commit c340425

Browse files
committed
make the vault token optional
1 parent 43ed02f commit c340425

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vault-token/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ variable "vault_token" {
2424
type = string
2525
description = "The Vault token to use for authentication."
2626
sensitive = true
27+
default = null
2728
}
2829

2930
variable "vault_cli_version" {
@@ -56,6 +57,7 @@ resource "coder_env" "vault_addr" {
5657
}
5758

5859
resource "coder_env" "vault_token" {
60+
count = var.vault_token != null ? 1 : 0
5961
agent_id = var.agent_id
6062
name = "VAULT_TOKEN"
6163
value = var.vault_token

0 commit comments

Comments
 (0)