You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
modules/vault-github
Muhammad Atif Ali a2a1546ce7 fmt 4 months ago
..
README.md fmt 4 months ago
main.test.ts fix(vault): fix version fetching logic (#172) 1 year ago
main.tf chore(vault-github): Add partner github and tests (#142) 1 year ago
run.sh fix(vault): fix version fetching logic (#172) 1 year ago

README.md

display_name description icon maintainer_github partner_github verified tags
Hashicorp Vault Integration (GitHub) Authenticates with Vault using GitHub ../.icons/vault.svg coder hashicorp true
helper
integration
vault
github

Hashicorp Vault Integration (GitHub)

This module lets you authenticate with Hashicorp Vault in your Coder workspaces using external auth for GitHub.

module "vault" {
  count      = data.coder_workspace.me.start_count
  source     = "registry.coder.com/modules/vault-github/coder"
  version    = "1.0.7"
  agent_id   = coder_agent.example.id
  vault_addr = "https://vault.example.com"
}

Then you can use the Vault CLI in your workspaces to fetch secrets from Vault:

vault kv get -namespace=coder -mount=secrets coder

or using the Vault API:

curl -H "X-Vault-Token: ${VAULT_TOKEN}" -X GET "${VAULT_ADDR}/v1/coder/secrets/data/coder"

Vault login

Configuration

To configure the Vault module, you must set up a Vault GitHub auth method. See the Vault documentation for more information.

Examples

Configure Vault integration with a different Coder GitHub external auth ID (i.e., not the default github)

module "vault" {
  count                = data.coder_workspace.me.start_count
  source               = "registry.coder.com/modules/vault-github/coder"
  version              = "1.0.7"
  agent_id             = coder_agent.example.id
  vault_addr           = "https://vault.example.com"
  coder_github_auth_id = "my-github-auth-id"
}

Configure Vault integration with a different Coder GitHub external auth ID and a different Vault GitHub auth path

module "vault" {
  count                  = data.coder_workspace.me.start_count
  source                 = "registry.coder.com/modules/vault-github/coder"
  version                = "1.0.7"
  agent_id               = coder_agent.example.id
  vault_addr             = "https://vault.example.com"
  coder_github_auth_id   = "my-github-auth-id"
  vault_github_auth_path = "my-github-auth-path"
}

Configure Vault integration and install a specific version of the Vault CLI

module "vault" {
  count             = data.coder_workspace.me.start_count
  source            = "registry.coder.com/modules/vault-github/coder"
  version           = "1.0.7"
  agent_id          = coder_agent.example.id
  vault_addr        = "https://vault.example.com"
  vault_cli_version = "1.15.0"
}