Skip to content
Open
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
14 changes: 7 additions & 7 deletions registry/coder/modules/vault-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Installs the [Vault](https://www.vaultproject.io/) CLI and optionally configures
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
}
Expand All @@ -34,7 +34,7 @@ If you have a Vault token, you can provide it to automatically configure authent
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
vault_token = var.vault_token # Optional
Expand All @@ -50,7 +50,7 @@ Install the Vault CLI without any authentication:
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
}
Expand All @@ -61,7 +61,7 @@ module "vault_cli" {
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
vault_cli_version = "1.15.0"
Expand All @@ -73,7 +73,7 @@ module "vault_cli" {
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
install_dir = "/home/coder/bin"
Expand All @@ -87,7 +87,7 @@ For Vault Enterprise users who need to specify a namespace:
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
vault_token = var.vault_token
Expand All @@ -102,7 +102,7 @@ Install the Vault Enterprise binary. This is required if using SAML authenticati
```tf
module "vault_cli" {
source = "registry.coder.com/coder/vault-cli/coder"
version = "1.1.1"
version = "1.1.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
enterprise = true
Expand Down
6 changes: 3 additions & 3 deletions registry/coder/modules/vault-cli/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variable "vault_addr" {
variable "vault_token" {
type = string
description = "The Vault token to use for authentication. If not provided, only the CLI will be installed."
default = ""
default = null
sensitive = true
}

Expand Down Expand Up @@ -62,7 +62,7 @@ resource "coder_script" "vault_cli" {
icon = "/icon/vault.svg"
script = templatefile("${path.module}/run.sh", {
VAULT_ADDR = var.vault_addr
VAULT_TOKEN = var.vault_token
VAULT_TOKEN = var.vault_token != null ? var.vault_token : ""
INSTALL_DIR = var.install_dir
VAULT_CLI_VERSION = var.vault_cli_version
ENTERPRISE = var.enterprise
Expand All @@ -78,7 +78,7 @@ resource "coder_env" "vault_addr" {
}

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