From 482ed84399fad47dc7cfe2b83c80686f85d5639c Mon Sep 17 00:00:00 2001 From: Benjamin Peinhardt <61021968+bcpeinhardt@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:25:09 -0600 Subject: [PATCH 1/5] feat: ci to build new registry on push to main (#363) This PR adds a github actions workflow for deploying new revisions of the registry on pushes to main. This means updating the new registry will continue to be as simple as landing a PR in this repo, but it should only take as long as the docker container takes to build to see the updates live :) For now, updates go to dev for manual inspection, but once we're confident in the build process they'll go straight to main as well. --- .github/workflows/deploy-registry.yaml | 37 ++++++++++++++++++++++++++ .gitignore | 5 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-registry.yaml diff --git a/.github/workflows/deploy-registry.yaml b/.github/workflows/deploy-registry.yaml new file mode 100644 index 00000000..0a56b5c2 --- /dev/null +++ b/.github/workflows/deploy-registry.yaml @@ -0,0 +1,37 @@ +name: deploy-registry + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + # Set id-token permission for gcloud + # Adding a comment because retriggering the build manually hung? I am the lord of devops and you will bend? + permissions: + contents: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f + with: + workload_identity_provider: projects/309789351055/locations/global/workloadIdentityPools/github-actions/providers/github + service_account: registry-v2-github@coder-registry-1.iam.gserviceaccount.com + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a + + # For the time being, let's have the first couple merges to main in modules deploy a new version + # to *dev*. Once we review and make sure everything's working, we can deploy a new version to *main*. + # Maybe in the future we could automate this based on the result of E2E tests. + - name: Deploy to dev.registry.coder.com + run: | + gcloud builds triggers run 29818181-126d-4f8a-a937-f228b27d3d34 --branch dev + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6d6f5a22..a2e63be8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .terraform* node_modules *.tfstate -*.tfstate.lock.info \ No newline at end of file +*.tfstate.lock.info + +# Ignore generated credentials from google-github-actions/auth +gha-creds-*.json \ No newline at end of file From bc6490f0d37ba25dbd296a70f56f67ee811dfc94 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Mon, 23 Dec 2024 09:07:06 +0000 Subject: [PATCH 2/5] ci: disable vercel redeploys (#376) --- .github/scripts/check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check.sh b/.github/scripts/check.sh index 01bf3e41..49c817aa 100755 --- a/.github/scripts/check.sh +++ b/.github/scripts/check.sh @@ -196,7 +196,8 @@ else # If a module is down, force a reployment to try getting things back online # ASAP - force_redeploy_registry + # EDIT: registry.coder.com is no longer hosted on vercel + #force_redeploy_registry fi exit "${status}" From 765414033084b7c07f35c6232a50f2225f13b621 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 23 Dec 2024 14:22:55 +0500 Subject: [PATCH 3/5] docs: promote count usage to prevent module download on stop (#371) --- .sample/README.md | 3 +++ README.md | 1 + apache-airflow/README.md | 1 + aws-region/README.md | 3 +++ azure-region/README.md | 3 +++ code-server/README.md | 7 +++++++ coder-login/README.md | 1 + cursor/README.md | 2 ++ dotfiles/README.md | 6 ++++++ exoscale-instance-type/README.md | 3 +++ exoscale-zone/README.md | 2 ++ filebrowser/README.md | 5 +++++ fly-region/README.md | 3 +++ gcp-region/README.md | 4 ++++ git-clone/README.md | 20 +++++++++++++++----- git-commit-signing/README.md | 1 + git-config/README.md | 3 +++ github-upload-public-key/README.md | 2 ++ jetbrains-gateway/README.md | 6 ++++++ jfrog-oauth/README.md | 7 +++++-- jupyter-notebook/README.md | 1 + jupyterlab/README.md | 1 + kasmvnc/README.md | 1 + nodejs/README.md | 3 +++ personalize/README.md | 1 + slackme/README.md | 2 ++ vault-github/README.md | 4 ++++ vault-jwt/README.md | 4 ++++ vscode-desktop/README.md | 2 ++ vscode-web/README.md | 4 ++++ windows-rdp/README.md | 6 +++--- 31 files changed, 102 insertions(+), 10 deletions(-) diff --git a/.sample/README.md b/.sample/README.md index e8754f19..e2fb4151 100644 --- a/.sample/README.md +++ b/.sample/README.md @@ -13,6 +13,7 @@ tags: [helper] ```tf module "MODULE_NAME" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/MODULE_NAME/coder" version = "1.0.2" } @@ -28,6 +29,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```tf module "MODULE_NAME" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/MODULE_NAME/coder" version = "1.0.2" agent_id = coder_agent.example.id @@ -45,6 +47,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```tf module "MODULE_NAME" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/MODULE_NAME/coder" version = "1.0.2" agent_id = coder_agent.example.id diff --git a/README.md b/README.md index 8228deb3..acec4e5d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ e.g. ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.2" agent_id = coder_agent.main.id diff --git a/apache-airflow/README.md b/apache-airflow/README.md index 194cceb8..72361a0b 100644 --- a/apache-airflow/README.md +++ b/apache-airflow/README.md @@ -14,6 +14,7 @@ A module that adds Apache Airflow in your Coder template. ```tf module "airflow" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/apache-airflow/coder" version = "1.0.13" agent_id = coder_agent.main.id diff --git a/aws-region/README.md b/aws-region/README.md index 4d363c3e..c190ffd8 100644 --- a/aws-region/README.md +++ b/aws-region/README.md @@ -16,6 +16,7 @@ Customize the preselected parameter value: ```tf module "aws-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/aws-region/coder" version = "1.0.12" default = "us-east-1" @@ -36,6 +37,7 @@ Change the display name and icon for a region using the corresponding maps: ```tf module "aws-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/aws-region/coder" version = "1.0.12" default = "ap-south-1" @@ -62,6 +64,7 @@ Hide the Asia Pacific regions Seoul and Osaka: ```tf module "aws-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/aws-region/coder" version = "1.0.12" exclude = ["ap-northeast-2", "ap-northeast-3"] diff --git a/azure-region/README.md b/azure-region/README.md index cd0efd33..2ac9597e 100644 --- a/azure-region/README.md +++ b/azure-region/README.md @@ -13,6 +13,7 @@ This module adds a parameter with all Azure regions, allowing developers to sele ```tf module "azure_region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/azure-region/coder" version = "1.0.12" default = "eastus" @@ -33,6 +34,7 @@ Change the display name and icon for a region using the corresponding maps: ```tf module "azure-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/azure-region/coder" version = "1.0.12" custom_names = { @@ -56,6 +58,7 @@ Hide all regions in Australia except australiacentral: ```tf module "azure-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/azure-region/coder" version = "1.0.12" exclude = [ diff --git a/code-server/README.md b/code-server/README.md index 2238793f..7e2c9c60 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -13,6 +13,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -27,6 +28,7 @@ module "code-server" { ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -40,6 +42,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -57,6 +60,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -73,6 +77,7 @@ Just run code-server in the background, don't fetch it from GitHub: ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -88,6 +93,7 @@ Run an existing copy of code-server if found, otherwise download from GitHub: ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -100,6 +106,7 @@ Just run code-server in the background, don't fetch it from GitHub: ```tf module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.26" agent_id = coder_agent.example.id diff --git a/coder-login/README.md b/coder-login/README.md index c9bb333f..589266bf 100644 --- a/coder-login/README.md +++ b/coder-login/README.md @@ -13,6 +13,7 @@ Automatically logs the user into Coder when creating their workspace. ```tf module "coder-login" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/coder-login/coder" version = "1.0.15" agent_id = coder_agent.example.id diff --git a/cursor/README.md b/cursor/README.md index c2997bee..46d73b5c 100644 --- a/cursor/README.md +++ b/cursor/README.md @@ -15,6 +15,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/cursor-coder) ```tf module "cursor" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/cursor/coder" version = "1.0.19" agent_id = coder_agent.example.id @@ -27,6 +28,7 @@ module "cursor" { ```tf module "cursor" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/cursor/coder" version = "1.0.19" agent_id = coder_agent.example.id diff --git a/dotfiles/README.md b/dotfiles/README.md index 6d7673cc..fb54bab7 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -17,6 +17,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/ ```tf module "dotfiles" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -29,6 +30,7 @@ module "dotfiles" { ```tf module "dotfiles" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -39,6 +41,7 @@ module "dotfiles" { ```tf module "dotfiles" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -50,12 +53,14 @@ module "dotfiles" { ```tf module "dotfiles" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id } module "dotfiles-root" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -70,6 +75,7 @@ You can set a default dotfiles repository for all users by setting the `default_ ```tf module "dotfiles" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.18" agent_id = coder_agent.example.id diff --git a/exoscale-instance-type/README.md b/exoscale-instance-type/README.md index 4296121c..19083c3a 100644 --- a/exoscale-instance-type/README.md +++ b/exoscale-instance-type/README.md @@ -16,6 +16,7 @@ Customize the preselected parameter value: ```tf module "exoscale-instance-type" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/exoscale-instance-type/coder" version = "1.0.12" default = "standard.medium" @@ -44,6 +45,7 @@ Change the display name a type using the corresponding maps: ```tf module "exoscale-instance-type" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/exoscale-instance-type/coder" version = "1.0.12" default = "standard.medium" @@ -78,6 +80,7 @@ Show only gpu1 types ```tf module "exoscale-instance-type" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/exoscale-instance-type/coder" version = "1.0.12" default = "gpu.large" diff --git a/exoscale-zone/README.md b/exoscale-zone/README.md index 0f4353e5..611aee5b 100644 --- a/exoscale-zone/README.md +++ b/exoscale-zone/README.md @@ -16,6 +16,7 @@ Customize the preselected parameter value: ```tf module "exoscale-zone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/exoscale-zone/coder" version = "1.0.12" default = "ch-dk-2" @@ -43,6 +44,7 @@ Change the display name and icon for a zone using the corresponding maps: ```tf module "exoscale-zone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/exoscale-zone/coder" version = "1.0.12" default = "at-vie-1" diff --git a/filebrowser/README.md b/filebrowser/README.md index 0882d9e5..b111127e 100644 --- a/filebrowser/README.md +++ b/filebrowser/README.md @@ -13,6 +13,7 @@ A file browser for your workspace. ```tf module "filebrowser" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.23" agent_id = coder_agent.example.id @@ -27,6 +28,7 @@ module "filebrowser" { ```tf module "filebrowser" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.23" agent_id = coder_agent.example.id @@ -38,6 +40,7 @@ module "filebrowser" { ```tf module "filebrowser" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.23" agent_id = coder_agent.example.id @@ -49,7 +52,9 @@ module "filebrowser" { ```tf module "filebrowser" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.23" agent_id = coder_agent.example.id agent_name = "main" subdomain = false diff --git a/fly-region/README.md b/fly-region/README.md index e5f446ef..30bcb136 100644 --- a/fly-region/README.md +++ b/fly-region/README.md @@ -15,6 +15,7 @@ We can use the simplest format here, only adding a default selection as the `atl ```tf module "fly-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/fly-region/coder" version = "1.0.2" default = "atl" @@ -31,6 +32,7 @@ The regions argument can be used to display only the desired regions in the Code ```tf module "fly-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/fly-region/coder" version = "1.0.2" default = "ams" @@ -46,6 +48,7 @@ Set custom icons and names with their respective maps. ```tf module "fly-region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/fly-region/coder" version = "1.0.2" default = "ams" diff --git a/gcp-region/README.md b/gcp-region/README.md index 776d638c..a74807f3 100644 --- a/gcp-region/README.md +++ b/gcp-region/README.md @@ -13,6 +13,7 @@ This module adds Google Cloud Platform regions to your Coder template. ```tf module "gcp_region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.12" regions = ["us", "europe"] @@ -33,6 +34,7 @@ Note: setting `gpu_only = true` and using a default region without GPU support, ```tf module "gcp_region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.12" default = ["us-west1-a"] @@ -49,6 +51,7 @@ resource "google_compute_instance" "example" { ```tf module "gcp_region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.12" regions = ["europe-west"] @@ -64,6 +67,7 @@ resource "google_compute_instance" "example" { ```tf module "gcp_region" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.12" regions = ["us", "europe"] diff --git a/git-clone/README.md b/git-clone/README.md index 6b8871eb..0647f7f9 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -13,6 +13,7 @@ This module allows you to automatically clone a repository by URL and skip if it ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -26,6 +27,7 @@ module "git-clone" { ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -40,6 +42,7 @@ To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-prov ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -65,6 +68,7 @@ data "coder_parameter" "git_repo" { # Clone the repository for branch `feat/example` module "git_clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -73,23 +77,24 @@ module "git_clone" { # Create a code-server instance for the cloned repository module "code-server" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" version = "1.0.18" agent_id = coder_agent.example.id order = 1 - folder = "/home/${local.username}/${module.git_clone.folder_name}" + folder = "/home/${local.username}/${module.git_clone[count.index].folder_name}" } # Create a Coder app for the website resource "coder_app" "website" { + count = data.coder_workspace.me.start_count agent_id = coder_agent.example.id order = 2 slug = "website" external = true - display_name = module.git_clone.folder_name - url = module.git_clone.web_url - icon = module.git_clone.git_provider != "" ? "/icon/${module.git_clone.git_provider}.svg" : "/icon/git.svg" - count = module.git_clone.web_url != "" ? 1 : 0 + display_name = module.git_clone[count.index].folder_name + url = module.git_clone[count.index].web_url + icon = module.git_clone[count.index].git_provider != "" ? "/icon/${module.git_clone[count.index].git_provider}.svg" : "/icon/git.svg" } ``` @@ -97,6 +102,7 @@ Configuring `git-clone` for a self-hosted GitHub Enterprise Server running at `g ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -115,6 +121,7 @@ To GitLab clone with a specific branch like `feat/example` ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -126,6 +133,7 @@ Configuring `git-clone` for a self-hosted GitLab running at `gitlab.example.com` ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -146,6 +154,7 @@ For example, to clone the `feat/example` branch: ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id @@ -162,6 +171,7 @@ For example, this will clone into the `~/projects/coder/coder-dev` folder: ```tf module "git-clone" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" version = "1.0.18" agent_id = coder_agent.example.id diff --git a/git-commit-signing/README.md b/git-commit-signing/README.md index 942f2f35..5ed5e262 100644 --- a/git-commit-signing/README.md +++ b/git-commit-signing/README.md @@ -18,6 +18,7 @@ This module has a chance of conflicting with the user's dotfiles / the personali ```tf module "git-commit-signing" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-commit-signing/coder" version = "1.0.11" agent_id = coder_agent.example.id diff --git a/git-config/README.md b/git-config/README.md index 90e8442c..5ba0806b 100644 --- a/git-config/README.md +++ b/git-config/README.md @@ -13,6 +13,7 @@ Runs a script that updates git credentials in the workspace to match the user's ```tf module "git-config" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-config/coder" version = "1.0.15" agent_id = coder_agent.example.id @@ -27,6 +28,7 @@ TODO: Add screenshot ```tf module "git-config" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-config/coder" version = "1.0.15" agent_id = coder_agent.example.id @@ -40,6 +42,7 @@ TODO: Add screenshot ```tf module "git-config" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-config/coder" version = "1.0.15" agent_id = coder_agent.example.id diff --git a/github-upload-public-key/README.md b/github-upload-public-key/README.md index 17464f35..192db7eb 100644 --- a/github-upload-public-key/README.md +++ b/github-upload-public-key/README.md @@ -13,6 +13,7 @@ Templates that utilize Github External Auth can automatically ensure that the Co ```tf module "github-upload-public-key" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/github-upload-public-key/coder" version = "1.0.15" agent_id = coder_agent.example.id @@ -45,6 +46,7 @@ data "coder_external_auth" "github" { } module "github-upload-public-key" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/github-upload-public-key/coder" version = "1.0.15" agent_id = coder_agent.example.id diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 695238df..4371ab9e 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -13,6 +13,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id @@ -31,6 +32,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id @@ -45,6 +47,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id @@ -60,6 +63,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id @@ -85,6 +89,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id @@ -103,6 +108,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra ```tf module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.25" agent_id = coder_agent.example.id diff --git a/jfrog-oauth/README.md b/jfrog-oauth/README.md index 4423a740..894e1f32 100644 --- a/jfrog-oauth/README.md +++ b/jfrog-oauth/README.md @@ -16,6 +16,7 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut ```tf module "jfrog" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jfrog-oauth/coder" version = "1.0.19" agent_id = coder_agent.example.id @@ -44,6 +45,7 @@ Configure the Python pip package manager to fetch packages from Artifactory whil ```tf module "jfrog" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jfrog-oauth/coder" version = "1.0.19" agent_id = coder_agent.example.id @@ -72,6 +74,7 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio ```tf module "jfrog" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jfrog-oauth/coder" version = "1.0.19" agent_id = coder_agent.example.id @@ -95,8 +98,8 @@ provider "docker" { # ... registry_auth { address = "https://example.jfrog.io/artifactory/api/docker/REPO-KEY" - username = module.jfrog.username - password = module.jfrog.access_token + username = try(module.jfrog[0].username, "") + password = try(module.jfrog[0].access_token, "") } } ``` diff --git a/jupyter-notebook/README.md b/jupyter-notebook/README.md index 83d36cb9..56f7ff18 100644 --- a/jupyter-notebook/README.md +++ b/jupyter-notebook/README.md @@ -15,6 +15,7 @@ A module that adds Jupyter Notebook in your Coder template. ```tf module "jupyter-notebook" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jupyter-notebook/coder" version = "1.0.19" agent_id = coder_agent.example.id diff --git a/jupyterlab/README.md b/jupyterlab/README.md index ea5ea67b..c285c275 100644 --- a/jupyterlab/README.md +++ b/jupyterlab/README.md @@ -15,6 +15,7 @@ A module that adds JupyterLab in your Coder template. ```tf module "jupyterlab" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jupyterlab/coder" version = "1.0.23" agent_id = coder_agent.example.id diff --git a/kasmvnc/README.md b/kasmvnc/README.md index 0639bf00..9c3b28db 100644 --- a/kasmvnc/README.md +++ b/kasmvnc/README.md @@ -13,6 +13,7 @@ Automatically install [KasmVNC](https://kasmweb.com/kasmvnc) in a workspace, and ```tf module "kasmvnc" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/kasmvnc/coder" version = "1.0.23" agent_id = coder_agent.example.id diff --git a/nodejs/README.md b/nodejs/README.md index 25714aad..b4420c1d 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -13,6 +13,7 @@ Automatically installs [Node.js](https://github.com/nodejs/node) via [nvm](https ```tf module "nodejs" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/nodejs/coder" version = "1.0.10" agent_id = coder_agent.example.id @@ -25,6 +26,7 @@ This installs multiple versions of Node.js: ```tf module "nodejs" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/nodejs/coder" version = "1.0.10" agent_id = coder_agent.example.id @@ -43,6 +45,7 @@ A example with all available options: ```tf module "nodejs" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/nodejs/coder" version = "1.0.10" agent_id = coder_agent.example.id diff --git a/personalize/README.md b/personalize/README.md index 24d19a98..af307f1b 100644 --- a/personalize/README.md +++ b/personalize/README.md @@ -13,6 +13,7 @@ Run a script on workspace start that allows developers to run custom commands to ```tf module "personalize" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/personalize/coder" version = "1.0.2" agent_id = coder_agent.example.id diff --git a/slackme/README.md b/slackme/README.md index 0858c3dd..f686b866 100644 --- a/slackme/README.md +++ b/slackme/README.md @@ -56,6 +56,7 @@ slackme npm run long-build ```tf module "slackme" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/slackme/coder" version = "1.0.2" agent_id = coder_agent.example.id @@ -72,6 +73,7 @@ slackme npm run long-build ```tf module "slackme" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/slackme/coder" version = "1.0.2" agent_id = coder_agent.example.id diff --git a/vault-github/README.md b/vault-github/README.md index ac73972b..f801c193 100644 --- a/vault-github/README.md +++ b/vault-github/README.md @@ -14,6 +14,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec ```tf 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 @@ -45,6 +46,7 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t ```tf 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 @@ -57,6 +59,7 @@ module "vault" { ```tf 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 @@ -70,6 +73,7 @@ module "vault" { ```tf 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 diff --git a/vault-jwt/README.md b/vault-jwt/README.md index 939bed27..32dc5ccf 100644 --- a/vault-jwt/README.md +++ b/vault-jwt/README.md @@ -14,6 +14,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec ```tf module "vault" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vault-jwt/coder" version = "1.0.20" agent_id = coder_agent.example.id @@ -40,6 +41,7 @@ curl -H "X-Vault-Token: ${VAULT_TOKEN}" -X GET "${VAULT_ADDR}/v1/coder/secrets/d ```tf module "vault" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vault-jwt/coder" version = "1.0.20" agent_id = coder_agent.example.id @@ -55,6 +57,7 @@ module "vault" { data "coder_workspace_owner" "me" {} module "vault" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vault-jwt/coder" version = "1.0.20" agent_id = coder_agent.example.id @@ -67,6 +70,7 @@ module "vault" { ```tf module "vault" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vault-jwt/coder" version = "1.0.20" agent_id = coder_agent.example.id diff --git a/vscode-desktop/README.md b/vscode-desktop/README.md index bc8920d4..e32fd9bf 100644 --- a/vscode-desktop/README.md +++ b/vscode-desktop/README.md @@ -15,6 +15,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder) ```tf module "vscode" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-desktop/coder" version = "1.0.15" agent_id = coder_agent.example.id @@ -27,6 +28,7 @@ module "vscode" { ```tf module "vscode" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-desktop/coder" version = "1.0.15" agent_id = coder_agent.example.id diff --git a/vscode-web/README.md b/vscode-web/README.md index 48b8e119..a50fe2b7 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -13,6 +13,7 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/ ```tf module "vscode-web" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -28,6 +29,7 @@ module "vscode-web" { ```tf module "vscode-web" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -41,6 +43,7 @@ module "vscode-web" { ```tf module "vscode-web" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.26" agent_id = coder_agent.example.id @@ -55,6 +58,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```tf module "vscode-web" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.26" agent_id = coder_agent.example.id diff --git a/windows-rdp/README.md b/windows-rdp/README.md index c4d35fdf..b069f5e3 100644 --- a/windows-rdp/README.md +++ b/windows-rdp/README.md @@ -14,9 +14,9 @@ Enable Remote Desktop + a web based client on Windows workspaces, powered by [de ```tf # AWS example. See below for examples of using this module with other providers module "windows_rdp" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/windows-rdp/coder" version = "1.0.18" - count = data.coder_workspace.me.start_count agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -32,9 +32,9 @@ module "windows_rdp" { ```tf module "windows_rdp" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/windows-rdp/coder" version = "1.0.18" - count = data.coder_workspace.me.start_count agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -44,9 +44,9 @@ module "windows_rdp" { ```tf module "windows_rdp" { + count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/windows-rdp/coder" version = "1.0.18" - count = data.coder_workspace.me.start_count agent_id = resource.coder_agent.main.id resource_id = resource.google_compute_instance.dev[0].id } From e94f70a2867943f0275cc3e2f3de6eb496dc1bf1 Mon Sep 17 00:00:00 2001 From: Phorcys <57866459+phorcys420@users.noreply.github.com> Date: Fri, 27 Dec 2024 21:45:51 +0100 Subject: [PATCH 4/5] chore(git-commit-signing): add version warning in README (#377) --- git-commit-signing/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-commit-signing/README.md b/git-commit-signing/README.md index 5ed5e262..1f71cbb3 100644 --- a/git-commit-signing/README.md +++ b/git-commit-signing/README.md @@ -9,6 +9,9 @@ tags: [helper, git] # git-commit-signing +> [!IMPORTANT] +> This module will only work with Git versions >=2.34, prior versions [do not support signing commits via SSH keys](https://lore.kernel.org/git/xmqq8rxpgwki.fsf@gitster.g/). + This module downloads your SSH key from Coder and uses it to sign commits with Git. It requires `curl` and `jq` to be installed inside your workspace. From e9238f107ac8f89dfaf6fc56709eb96a43426201 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 7 Jan 2025 20:49:48 +0500 Subject: [PATCH 5/5] feat(jetbrains-gateway): add RustRover to JetBrains Gateway module (#382) --- jetbrains-gateway/README.md | 29 +++++++++++++++-------------- jetbrains-gateway/main.tf | 24 ++++++++++++++++++------ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 4371ab9e..0d967a99 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -15,7 +15,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -34,7 +34,7 @@ module "jetbrains_gateway" { module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -49,7 +49,7 @@ module "jetbrains_gateway" { module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -65,7 +65,7 @@ module "jetbrains_gateway" { module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -91,7 +91,7 @@ module "jetbrains_gateway" { module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -110,7 +110,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.25" + version = "1.0.27" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -125,11 +125,12 @@ module "jetbrains_gateway" { This module and JetBrains Gateway support the following JetBrains IDEs: -- GoLand (`GO`) -- WebStorm (`WS`) -- IntelliJ IDEA Ultimate (`IU`) -- PyCharm Professional (`PY`) -- PhpStorm (`PS`) -- CLion (`CL`) -- RubyMine (`RM`) -- Rider (`RD`) +- [GoLand (`GO`)](https://www.jetbrains.com/go/) +- [WebStorm (`WS`)](https://www.jetbrains.com/webstorm/) +- [IntelliJ IDEA Ultimate (`IU`)](https://www.jetbrains.com/idea/) +- [PyCharm Professional (`PY`)](https://www.jetbrains.com/pycharm/) +- [PhpStorm (`PS`)](https://www.jetbrains.com/phpstorm/) +- [CLion (`CL`)](https://www.jetbrains.com/clion/) +- [RubyMine (`RM`)](https://www.jetbrains.com/ruby/) +- [Rider (`RD`)](https://www.jetbrains.com/rider/) +- [RustRover (`RR`)](https://www.jetbrains.com/rust/) diff --git a/jetbrains-gateway/main.tf b/jetbrains-gateway/main.tf index 4911be6c..6daf48b9 100644 --- a/jetbrains-gateway/main.tf +++ b/jetbrains-gateway/main.tf @@ -111,28 +111,32 @@ variable "jetbrains_ide_versions" { build_number = "243.21565.191" version = "2024.3" } + "RR" = { + build_number = "243.22562.230" + version = "2024.3" + } } validation { condition = ( alltrue([ - for code in keys(var.jetbrains_ide_versions) : contains(["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD"], code) + for code in keys(var.jetbrains_ide_versions) : contains(["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD", "RR"], code) ]) ) - error_message = "The jetbrains_ide_versions must contain a map of valid product codes. Valid product codes are ${join(",", ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD"])}." + error_message = "The jetbrains_ide_versions must contain a map of valid product codes. Valid product codes are ${join(",", ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD", "RR"])}." } } variable "jetbrains_ides" { type = list(string) description = "The list of IDE product codes." - default = ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD"] + default = ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD", "RR"] validation { condition = ( alltrue([ - for code in var.jetbrains_ides : contains(["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD"], code) + for code in var.jetbrains_ides : contains(["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD", "RR"], code) ]) ) - error_message = "The jetbrains_ides must be a list of valid product codes. Valid product codes are ${join(",", ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD"])}." + error_message = "The jetbrains_ides must be a list of valid product codes. Valid product codes are ${join(",", ["IU", "PS", "WS", "PY", "CL", "GO", "RM", "RD", "RR"])}." } # check if the list is empty validation { @@ -228,7 +232,7 @@ locals { build_number = var.jetbrains_ide_versions["RM"].build_number, download_link = "${var.download_base_link}/ruby/RubyMine-${var.jetbrains_ide_versions["RM"].version}.tar.gz" version = var.jetbrains_ide_versions["RM"].version - } + }, "RD" = { icon = "/icon/rider.svg", name = "Rider", @@ -236,6 +240,14 @@ locals { build_number = var.jetbrains_ide_versions["RD"].build_number, download_link = "${var.download_base_link}/rider/JetBrains.Rider-${var.jetbrains_ide_versions["RD"].version}.tar.gz" version = var.jetbrains_ide_versions["RD"].version + }, + "RR" = { + icon = "/icon/rustrover.svg", + name = "RustRover", + identifier = "RR", + build_number = var.jetbrains_ide_versions["RR"].build_number, + download_link = "${var.download_base_link}/rustrover/RustRover-${var.jetbrains_ide_versions["RR"].version}.tar.gz" + version = var.jetbrains_ide_versions["RR"].version } }