From bb5373123f8e51016ab1ec7e71d36f461d39814f Mon Sep 17 00:00:00 2001 From: Phorcys <57866459+phorcys420@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:46:15 +0000 Subject: [PATCH] feat: promote modules --- examples/templates/kubernetes-envbox/main.tf | 55 ++++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/examples/templates/kubernetes-envbox/main.tf b/examples/templates/kubernetes-envbox/main.tf index 73e6d4fd45ab6..7a22d7607def3 100644 --- a/examples/templates/kubernetes-envbox/main.tf +++ b/examples/templates/kubernetes-envbox/main.tf @@ -34,8 +34,7 @@ variable "use_kubeconfig" { EOF } -provider "coder" { -} +provider "coder" {} variable "namespace" { type = string @@ -95,30 +94,40 @@ resource "coder_agent" "main" { cp /etc/skel/.bashrc $HOME fi - # Install the latest code-server. - # Append "--version x.x.x" to install a specific version of code-server. - curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server - - # Start code-server in the background. - /tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 & + # Add any commands that should be executed at workspace startup (e.g install requirements, start a program, etc) here EOT } -# code-server -resource "coder_app" "code-server" { - agent_id = coder_agent.main.id - slug = "code-server" - display_name = "code-server" - icon = "/icon/code.svg" - url = "http://localhost:13337?folder=/home/coder" - subdomain = false - share = "owner" - - healthcheck { - url = "http://localhost:13337/healthz" - interval = 3 - threshold = 10 - } +# See https://registry.coder.com/modules/code-server +module "code-server" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/modules/code-server/coder" + + # This ensures that the latest version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production. + version = ">= 1.0.0" + + agent_id = coder_agent.main.id + order = 1 +} + +# See https://registry.coder.com/modules/jetbrains-gateway +module "jetbrains_gateway" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/modules/jetbrains-gateway/coder" + + # JetBrains IDEs to make available for the user to select + jetbrains_ides = ["IU", "PY", "WS", "PS", "RD", "CL", "GO", "RM"] + default = "IU" + + # Default folder to open when starting a JetBrains IDE + folder = "/home/coder" + + # This ensures that the latest version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production. + version = ">= 1.0.0" + + agent_id = coder_agent.main.id + agent_name = "main" + order = 2 } resource "kubernetes_persistent_volume_claim" "home" { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy