Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e254a3bb9 | ||
|
|
1ab53139b3 | ||
|
|
147bea9782 | ||
|
|
8d8910c52a | ||
|
|
c00b7536cb | ||
|
|
d66d7e994e | ||
|
|
d10ce91a64 | ||
|
|
534491613f |
3
.github/workflows/update-readme.yaml
vendored
3
.github/workflows/update-readme.yaml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update-readme:
|
update-readme:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -33,6 +33,7 @@ jobs:
|
|||||||
title: 'chore: bump version to ${{ env.TAG }} in README.md files'
|
title: 'chore: bump version to ${{ env.TAG }} in README.md files'
|
||||||
body: 'This is an auto-generated PR to update README.md files of all modules with the new tag ${{ env.TAG }}'
|
body: 'This is an auto-generated PR to update README.md files of all modules with the new tag ${{ env.TAG }}'
|
||||||
branch: 'update-readme-branch'
|
branch: 'update-readme-branch'
|
||||||
|
base: 'main'
|
||||||
env:
|
env:
|
||||||
TAG: ${{ steps.get-latest-tag.outputs.TAG }}
|
TAG: ${{ steps.get-latest-tag.outputs.TAG }}
|
||||||
|
|
||||||
|
|||||||
BIN
.images/hcp-vault-secrets-credentials.png
Normal file
BIN
.images/hcp-vault-secrets-credentials.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
@@ -32,6 +32,12 @@ variable "display_name" {
|
|||||||
default = "code-server"
|
default = "code-server"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "slug" {
|
||||||
|
type = string
|
||||||
|
description = "The slug for the code-server application."
|
||||||
|
default = "code-server"
|
||||||
|
}
|
||||||
|
|
||||||
variable "settings" {
|
variable "settings" {
|
||||||
type = map(string)
|
type = map(string)
|
||||||
description = "A map of settings to apply to code-server."
|
description = "A map of settings to apply to code-server."
|
||||||
@@ -89,7 +95,7 @@ resource "coder_script" "code-server" {
|
|||||||
|
|
||||||
resource "coder_app" "code-server" {
|
resource "coder_app" "code-server" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
slug = "code-server"
|
slug = var.slug
|
||||||
display_name = var.display_name
|
display_name = var.display_name
|
||||||
url = "http://localhost:${var.port}/${var.folder != "" ? "?folder=${urlencode(var.folder)}" : ""}"
|
url = "http://localhost:${var.port}/${var.folder != "" ? "?folder=${urlencode(var.folder)}" : ""}"
|
||||||
icon = "/icon/code.svg"
|
icon = "/icon/code.svg"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ A file browser for your workspace.
|
|||||||
```tf
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -28,7 +28,7 @@ module "filebrowser" {
|
|||||||
```tf
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ module "filebrowser" {
|
|||||||
```tf
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
database_path = ".config/filebrowser.db"
|
database_path = ".config/filebrowser.db"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ This module has a chance of conflicting with the user's dotfiles / the personali
|
|||||||
```tf
|
```tf
|
||||||
module "git-commit-signing" {
|
module "git-commit-signing" {
|
||||||
source = "registry.coder.com/modules/git-commit-signing/coder"
|
source = "registry.coder.com/modules/git-commit-signing/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,7 +23,14 @@ module "vault" {
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
To configure the HCP Vault Secrets module, you must create an HCP Service Principal from the HCP Vault Secrets app in the HCP console. This will give you the `HCP_CLIENT_ID` and `HCP_CLIENT_SECRET` that you need to authenticate with HCP Vault Secrets. See the [HCP Vault Secrets documentation](https://developer.hashicorp.com/hcp/docs/vault-secrets) for more information.
|
To configure the HCP Vault Secrets module, follow these steps,
|
||||||
|
|
||||||
|
1. [Create secrets in HCP Vault Secrets](https://developer.hashicorp.com/vault/tutorials/hcp-vault-secrets-get-started/hcp-vault-secrets-create-secret)
|
||||||
|
2. Create an HCP Service Principal from the HCP Vault Secrets app in the HCP console. This will give you the `HCP_CLIENT_ID` and `HCP_CLIENT_SECRET` that you need to authenticate with HCP Vault Secrets.
|
||||||
|

|
||||||
|
3. Set `HCP_CLIENT_ID` and `HCP_CLIENT_SECRET` variables on the coder provisioner (recommended) or supply them as input to the module.
|
||||||
|
|
||||||
|
> See the [HCP Vault Secrets documentation](https://developer.hashicorp.com/hcp/docs/vault-secrets) for more information.
|
||||||
|
|
||||||
## Fetch All Secrets
|
## Fetch All Secrets
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single
|
|||||||
```tf
|
```tf
|
||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
agent_name = "example"
|
agent_name = "example"
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
@@ -32,7 +32,7 @@ module "jetbrains_gateway" {
|
|||||||
```tf
|
```tf
|
||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
agent_name = "example"
|
agent_name = "example"
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ variable "jfrog_url" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "jfrog_server_id" {
|
||||||
|
type = string
|
||||||
|
description = "The server ID of the JFrog instance for JFrog CLI configuration"
|
||||||
|
default = "0"
|
||||||
|
}
|
||||||
|
|
||||||
variable "username_field" {
|
variable "username_field" {
|
||||||
type = string
|
type = string
|
||||||
description = "The field to use for the artifactory username. i.e. Coder username or email."
|
description = "The field to use for the artifactory username. i.e. Coder username or email."
|
||||||
@@ -79,6 +85,7 @@ resource "coder_script" "jfrog" {
|
|||||||
script = templatefile("${path.module}/run.sh", {
|
script = templatefile("${path.module}/run.sh", {
|
||||||
JFROG_URL : var.jfrog_url,
|
JFROG_URL : var.jfrog_url,
|
||||||
JFROG_HOST : local.jfrog_host,
|
JFROG_HOST : local.jfrog_host,
|
||||||
|
JFROG_SERVER_ID : var.jfrog_server_id,
|
||||||
ARTIFACTORY_USERNAME : local.username,
|
ARTIFACTORY_USERNAME : local.username,
|
||||||
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
|
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
|
||||||
ARTIFACTORY_ACCESS_TOKEN : data.coder_external_auth.jfrog.access_token,
|
ARTIFACTORY_ACCESS_TOKEN : data.coder_external_auth.jfrog.access_token,
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ fi
|
|||||||
# flows.
|
# flows.
|
||||||
export CI=true
|
export CI=true
|
||||||
# Authenticate JFrog CLI with Artifactory.
|
# Authenticate JFrog CLI with Artifactory.
|
||||||
echo "${ARTIFACTORY_ACCESS_TOKEN}" | jf c add --access-token-stdin --url "${JFROG_URL}" --overwrite 0
|
echo "${ARTIFACTORY_ACCESS_TOKEN}" | jf c add --access-token-stdin --url "${JFROG_URL}" --overwrite "${JFROG_SERVER_ID}"
|
||||||
# Set the configured server as the default.
|
# Set the configured server as the default.
|
||||||
jf c use 0
|
jf c use "${JFROG_SERVER_ID}"
|
||||||
|
|
||||||
# Configure npm to use the Artifactory "npm" repository.
|
# Configure npm to use the Artifactory "npm" repository.
|
||||||
if [ -z "${REPOSITORY_NPM}" ]; then
|
if [ -z "${REPOSITORY_NPM}" ]; then
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ variable "jfrog_url" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "jfrog_server_id" {
|
||||||
|
type = string
|
||||||
|
description = "The server ID of the JFrog instance for JFrog CLI configuration"
|
||||||
|
default = "0"
|
||||||
|
}
|
||||||
|
|
||||||
variable "artifactory_access_token" {
|
variable "artifactory_access_token" {
|
||||||
type = string
|
type = string
|
||||||
description = "The admin-level access token to use for JFrog."
|
description = "The admin-level access token to use for JFrog."
|
||||||
@@ -112,6 +118,7 @@ resource "coder_script" "jfrog" {
|
|||||||
script = templatefile("${path.module}/run.sh", {
|
script = templatefile("${path.module}/run.sh", {
|
||||||
JFROG_URL : var.jfrog_url,
|
JFROG_URL : var.jfrog_url,
|
||||||
JFROG_HOST : local.jfrog_host,
|
JFROG_HOST : local.jfrog_host,
|
||||||
|
JFROG_SERVER_ID : var.jfrog_server_id,
|
||||||
ARTIFACTORY_USERNAME : local.username,
|
ARTIFACTORY_USERNAME : local.username,
|
||||||
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
|
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
|
||||||
ARTIFACTORY_ACCESS_TOKEN : artifactory_scoped_token.me.access_token,
|
ARTIFACTORY_ACCESS_TOKEN : artifactory_scoped_token.me.access_token,
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ fi
|
|||||||
# flows.
|
# flows.
|
||||||
export CI=true
|
export CI=true
|
||||||
# Authenticate JFrog CLI with Artifactory.
|
# Authenticate JFrog CLI with Artifactory.
|
||||||
echo "${ARTIFACTORY_ACCESS_TOKEN}" | jf c add --access-token-stdin --url "${JFROG_URL}" --overwrite 0
|
echo "${ARTIFACTORY_ACCESS_TOKEN}" | jf c add --access-token-stdin --url "${JFROG_URL}" --overwrite "${JFROG_SERVER_ID}"
|
||||||
# Set the configured server as the default.
|
# Set the configured server as the default.
|
||||||
jf c use 0
|
jf c use "${JFROG_SERVER_ID}"
|
||||||
|
|
||||||
# Configure npm to use the Artifactory "npm" repository.
|
# Configure npm to use the Artifactory "npm" repository.
|
||||||
if [ -z "${REPOSITORY_NPM}" ]; then
|
if [ -z "${REPOSITORY_NPM}" ]; then
|
||||||
|
|||||||
@@ -8,14 +8,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
current_tag=$(git describe --tags --abbrev=0)
|
current_tag=$(git describe --tags --abbrev=0)
|
||||||
previous_tag=$(git describe --tags --abbrev=0 $current_tag^)
|
previous_tag=$(git describe --tags --abbrev=0 $current_tag^)
|
||||||
mapfile -t changed_files < <(git diff --name-only "$previous_tag" "$current_tag" | xargs dirname | sort -u | grep -v '^\.')
|
mapfile -t changed_dirs < <(git diff --name-only "$previous_tag"..."$current_tag" -- ':!**/README.md' ':!**/*.test.ts' | xargs dirname | grep -v '^\.' | sort -u)
|
||||||
|
|
||||||
changed_dirs=()
|
|
||||||
for file in $changed_files; do
|
|
||||||
dir=$(dirname "$file")
|
|
||||||
changed_dirs+=("$dir")
|
|
||||||
done
|
|
||||||
changed_dirs=($(printf "%s\n" "${changed_dirs[@]}" | sort -u))
|
|
||||||
|
|
||||||
LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') || exit $?
|
LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') || exit $?
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec
|
|||||||
```tf
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t
|
|||||||
```tf
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
coder_github_auth_id = "my-github-auth-id"
|
coder_github_auth_id = "my-github-auth-id"
|
||||||
@@ -58,7 +58,7 @@ module "vault" {
|
|||||||
```tf
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
coder_github_auth_id = "my-github-auth-id"
|
coder_github_auth_id = "my-github-auth-id"
|
||||||
@@ -71,7 +71,7 @@ module "vault" {
|
|||||||
```tf
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
vault_cli_version = "1.15.0"
|
vault_cli_version = "1.15.0"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ unzip_safe() {
|
|||||||
install() {
|
install() {
|
||||||
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
||||||
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
||||||
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -v '-rc' | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||||
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
||||||
if [ -z "$${LATEST_VERSION}" ]; then
|
if [ -z "$${LATEST_VERSION}" ]; then
|
||||||
printf "Failed to determine the latest Vault version.\n"
|
printf "Failed to determine the latest Vault version.\n"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ variable "vault_token" {
|
|||||||
|
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-token/coder"
|
source = "registry.coder.com/modules/vault-token/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_token = var.token
|
vault_token = var.token
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
@@ -74,7 +74,7 @@ variable "vault_token" {
|
|||||||
|
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-token/coder"
|
source = "registry.coder.com/modules/vault-token/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
vault_addr = "https://vault.example.com"
|
vault_addr = "https://vault.example.com"
|
||||||
vault_token = var.token
|
vault_token = var.token
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ unzip_safe() {
|
|||||||
install() {
|
install() {
|
||||||
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
||||||
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
||||||
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -v '-rc' | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||||
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
||||||
if [ -z "$${LATEST_VERSION}" ]; then
|
if [ -z "$${LATEST_VERSION}" ]; then
|
||||||
printf "Failed to determine the latest Vault version.\n"
|
printf "Failed to determine the latest Vault version.\n"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/
|
|||||||
```tf
|
```tf
|
||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
source = "registry.coder.com/modules/vscode-web/coder"
|
source = "registry.coder.com/modules/vscode-web/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
accept_license = true
|
accept_license = true
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ module "vscode-web" {
|
|||||||
```tf
|
```tf
|
||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
source = "registry.coder.com/modules/vscode-web/coder"
|
source = "registry.coder.com/modules/vscode-web/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
install_dir = "/home/coder/.vscode-web"
|
install_dir = "/home/coder/.vscode-web"
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
|
|||||||
Reference in New Issue
Block a user