From c29960f5c873bd1186289be93edf82fc22b290aa Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 4 Apr 2023 14:10:42 +0300 Subject: [PATCH 01/14] add `display_name` --- examples/templates/aws-ecs-container/main.tf | 24 ++++--- examples/templates/aws-linux/main.tf | 20 +++--- examples/templates/aws-windows/main.tf | 20 +++--- examples/templates/azure-linux/main.tf | 19 +++--- examples/templates/do-linux/main.tf | 48 +++++++------ examples/templates/docker-code-server/main.tf | 2 +- .../templates/docker-image-builds/main.tf | 2 +- .../templates/docker-with-dotfiles/main.tf | 26 +++---- examples/templates/docker/main.tf | 2 +- examples/templates/fly-docker-image/main.tf | 68 ++++++++++--------- examples/templates/gcp-linux/main.tf | 13 ++-- examples/templates/gcp-vm-container/main.tf | 13 ++-- examples/templates/gcp-windows/main.tf | 13 ++-- .../templates/kubernetes-with-podman/main.tf | 17 +++-- examples/templates/kubernetes/main.tf | 31 +++++---- 15 files changed, 175 insertions(+), 143 deletions(-) diff --git a/examples/templates/aws-ecs-container/main.tf b/examples/templates/aws-ecs-container/main.tf index e7869b1c270a5..bde58eca57278 100644 --- a/examples/templates/aws-ecs-container/main.tf +++ b/examples/templates/aws-ecs-container/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } aws = { source = "hashicorp/aws" @@ -20,19 +20,21 @@ variable "ecs-cluster" { } data "coder_parameter" "cpu" { - name = "cpu" - description = "The number of CPU units to reserve for the container" - type = "number" - default = "1024" - mutable = true + name = "cpu" + display_name = "CPU" + description = "The number of CPU units to reserve for the container" + type = "number" + default = "1024" + mutable = true } data "coder_parameter" "memory" { - name = "memory" - description = "The amount of memory (in MiB) to allow the container to use" - type = "number" - default = "2048" - mutable = true + name = "memory" + display_name = "Memory" + description = "The amount of memory (in MiB) to allow the container to use" + type = "number" + default = "2048" + mutable = true } # configure AWS provider with creds present on Coder server host diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index 986a1088a17cb..5fe0faa0d7072 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } aws = { source = "hashicorp/aws" @@ -14,10 +14,11 @@ terraform { # Last updated 2023-03-14 # aws ec2 describe-regions | jq -r '[.Regions[].RegionName] | sort' data "coder_parameter" "region" { - name = "Region" - description = "The region to deploy the workspace in." - default = "us-east-1" - mutable = false + name = "region" + display_name = "Region" + description = "The region to deploy the workspace in." + default = "us-east-1" + mutable = false option { name = "Asia Pacific (Tokyo)" value = "ap-northeast-1" @@ -106,10 +107,11 @@ data "coder_parameter" "region" { } data "coder_parameter" "instance_type" { - name = "Instance Type" - description = "What instance type should your workspace use?" - default = "t3.micro" - mutable = false + name = "instance_type" + display_name = "Instance Type" + description = "What instance type should your workspace use?" + default = "t3.micro" + mutable = false option { name = "2 vCPU, 1 GiB RAM" value = "t3.micro" diff --git a/examples/templates/aws-windows/main.tf b/examples/templates/aws-windows/main.tf index 87c5b710a2c97..daf694d93b942 100644 --- a/examples/templates/aws-windows/main.tf +++ b/examples/templates/aws-windows/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } aws = { source = "hashicorp/aws" @@ -14,10 +14,11 @@ terraform { # Last updated 2023-03-14 # aws ec2 describe-regions | jq -r '[.Regions[].RegionName] | sort' data "coder_parameter" "region" { - name = "Region" - description = "The region to deploy the workspace in." - default = "us-east-1" - mutable = false + name = "region" + display_name = "Region" + description = "The region to deploy the workspace in." + default = "us-east-1" + mutable = false option { name = "Asia Pacific (Tokyo)" value = "ap-northeast-1" @@ -106,10 +107,11 @@ data "coder_parameter" "region" { } data "coder_parameter" "instance_type" { - name = "Instance Type" - description = "What instance type should your workspace use?" - default = "t3.micro" - mutable = false + name = "instance_type" + dsiplay_name = "Instance Type" + description = "What instance type should your workspace use?" + default = "t3.micro" + mutable = false option { name = "2 vCPU, 1 GiB RAM" value = "t3.micro" diff --git a/examples/templates/azure-linux/main.tf b/examples/templates/azure-linux/main.tf index 7360ac9381f70..5995b7f11604d 100644 --- a/examples/templates/azure-linux/main.tf +++ b/examples/templates/azure-linux/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } azurerm = { source = "hashicorp/azurerm" @@ -12,11 +12,12 @@ terraform { } data "coder_parameter" "location" { - name = "Location" - description = "What location should your workspace live in?" - default = "eastus" - icon = "/emojis/1f310.png" - mutable = false + name = "location" + display_name = "Location" + description = "What location should your workspace live in?" + default = "eastus" + icon = "/emojis/1f310.png" + mutable = false option { name = "US (Virginia)" value = "eastus" @@ -150,7 +151,8 @@ data "coder_parameter" "location" { } data "coder_parameter" "instance_type" { - name = "Instance Type" + name = "instance_type" + display = "Instance Type" description = "What instance type should your workspace use?" default = "Standard_B4ms" icon = "/icon/azure.png" @@ -202,7 +204,8 @@ data "coder_parameter" "instance_type" { } data "coder_parameter" "home_size" { - name = "Home Volume Size" + name = "home_size" + display = "Home Volume Size" description = "How large would you like your home volume to be (in GB)?" default = 20 type = "number" diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index b87d91d0d4172..14e82904b86fa 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } digitalocean = { source = "digitalocean/digitalocean" @@ -52,10 +52,12 @@ variable "step2_do_admin_ssh_key" { } data "coder_parameter" "droplet_image" { - name = "Which Droplet image would you like to use for your workspace?" - default = "ubuntu-22-04-x64" - type = "string" - mutable = false + name = "droplet_image" + display_name = "Droplet Image" + description = "Which Droplet image would you like to use?" + default = "ubuntu-22-04-x64" + type = "string" + mutable = false option { name = "Ubuntu 22.04" value = "ubuntu-22-04-x64" @@ -109,11 +111,13 @@ data "coder_parameter" "droplet_image" { } data "coder_parameter" "droplet_size" { - name = "Which Droplet configuration would you like to use?" - default = "s-1vcpu-1gb" - type = "string" - icon = "/icon/memory.svg" - mutable = false + name = "droplet_size" + display_name = "Droplet Size" + description = "Which Droplet configuration would you like to use?" + default = "s-1vcpu-1gb" + type = "string" + icon = "/icon/memory.svg" + mutable = false option { name = "1 vCPU, 1 GB RAM" value = "s-1vcpu-1gb" @@ -142,11 +146,12 @@ data "coder_parameter" "droplet_size" { data "coder_parameter" "home_volume_size" { - name = "How large would you like your home volume to be (in GB)?" - description = "This volume will be mounted to /home/coder." - type = "number" - default = "20" - mutable = false + name = "home_volume_size" + display_name = "How large would you like your home volume to be (in GB)?" + description = "This volume will be mounted to /home/coder." + type = "number" + default = "20" + mutable = false validation { min = 1 max = 999999 @@ -154,12 +159,13 @@ data "coder_parameter" "home_volume_size" { } data "coder_parameter" "region" { - name = "Which region would you like to use?" - description = "This is the region where your workspace will be created." - icon = "/emojis/1f30e.png" - type = "string" - default = "ams3" - mutable = false + name = "region" + display_name = "Which region would you like to use?" + description = "This is the region where your workspace will be created." + icon = "/emojis/1f30e.png" + type = "string" + default = "ams3" + mutable = false option { name = "New York 1" value = "nyc1" diff --git a/examples/templates/docker-code-server/main.tf b/examples/templates/docker-code-server/main.tf index b8284fe99011c..7c4c754393bac 100644 --- a/examples/templates/docker-code-server/main.tf +++ b/examples/templates/docker-code-server/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } docker = { source = "kreuzwerker/docker" diff --git a/examples/templates/docker-image-builds/main.tf b/examples/templates/docker-image-builds/main.tf index a660cd2c5bc7e..a3b7c73f2e5d4 100644 --- a/examples/templates/docker-image-builds/main.tf +++ b/examples/templates/docker-image-builds/main.tf @@ -3,7 +3,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } docker = { source = "kreuzwerker/docker" diff --git a/examples/templates/docker-with-dotfiles/main.tf b/examples/templates/docker-with-dotfiles/main.tf index 5c655d704d779..95a6223bc95fe 100644 --- a/examples/templates/docker-with-dotfiles/main.tf +++ b/examples/templates/docker-with-dotfiles/main.tf @@ -9,7 +9,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } docker = { source = "kreuzwerker/docker" @@ -28,24 +28,26 @@ data "coder_workspace" "me" { } data "coder_parameter" "docker_image" { - name = "What Docker image would you like to use for your workspace?" - description = "The Docker image will be used to build your workspace." - default = "codercom/enterprise-base:ubuntu" - icon = "/icon/docker.png" - type = "string" - mutable = false + name = "docker_image" + display_name = "What Docker image would you like to use for your workspace?" + description = "The Docker image will be used to build your workspace." + default = "codercom/enterprise-base:ubuntu" + icon = "/icon/docker.png" + type = "string" + mutable = false } data "coder_parameter" "dotfiles_uri" { - name = "What dotfiles repo would you like to use for your workspace?" - description = <<-EOF + name = "dotfiles_uri" + display_name = "What dotfiles repo would you like to use for your workspace?" + description = <<-EOF Dotfiles repo URI (optional) see https://dotfiles.github.io EOF - default = "" - type = "string" - mutable = true + default = "" + type = "string" + mutable = true } resource "coder_agent" "main" { diff --git a/examples/templates/docker/main.tf b/examples/templates/docker/main.tf index 6df6868f5a978..c595b0052ecbe 100644 --- a/examples/templates/docker/main.tf +++ b/examples/templates/docker/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } docker = { source = "kreuzwerker/docker" diff --git a/examples/templates/fly-docker-image/main.tf b/examples/templates/fly-docker-image/main.tf index 11629217c9c47..28f48411416ef 100644 --- a/examples/templates/fly-docker-image/main.tf +++ b/examples/templates/fly-docker-image/main.tf @@ -6,7 +6,7 @@ terraform { } coder = { source = "coder/coder" - version = "~>0.6.17" + version = "~>0.7.0" } } } @@ -108,19 +108,21 @@ EOF } data "coder_parameter" "docker-image" { - name = "Docker Image" - description = "The docker image to use for the workspace" - default = "codercom/code-server:latest" - icon = "https://raw.githubusercontent.com/matifali/logos/main/docker.svg" + name = "docker-image" + display_name = "Docker Image" + description = "The docker image to use for the workspace" + default = "codercom/code-server:latest" + icon = "https://raw.githubusercontent.com/matifali/logos/main/docker.svg" } data "coder_parameter" "cpu" { - name = "CPU" - description = "The number of CPUs to allocate to the workspace (1-8)" - type = "number" - default = "1" - icon = "https://raw.githubusercontent.com/matifali/logos/main/cpu-3.svg" - mutable = true + name = "cpu" + display_name = "CPU" + description = "The number of CPUs to allocate to the workspace (1-8)" + type = "number" + default = "1" + icon = "https://raw.githubusercontent.com/matifali/logos/main/cpu-3.svg" + mutable = true validation { min = 1 max = 8 @@ -128,11 +130,12 @@ data "coder_parameter" "cpu" { } data "coder_parameter" "cputype" { - name = "CPU Type" - description = "Which CPU type do you want?" - default = "shared" - icon = "https://raw.githubusercontent.com/matifali/logos/main/cpu-1.svg" - mutable = true + name = "cputype" + display_name = "CPU Type" + description = "Which CPU type do you want?" + default = "shared" + icon = "https://raw.githubusercontent.com/matifali/logos/main/cpu-1.svg" + mutable = true option { name = "Shared" value = "shared" @@ -144,12 +147,13 @@ data "coder_parameter" "cputype" { } data "coder_parameter" "memory" { - name = "Memory (GB)" - description = "The amount of memory to allocate to the workspace in GB (up to 16GB)" - type = "number" - default = "2" - icon = "/icon/memory.svg" - mutable = true + name = "memory" + display_name = "Memory (GB)" + description = "The amount of memory to allocate to the workspace in GB (up to 16GB)" + type = "number" + default = "2" + icon = "/icon/memory.svg" + mutable = true validation { min = data.coder_parameter.cputype.value == "performance" ? 2 : 1 # if the CPU type is performance, the minimum memory is 2GB max = 16 @@ -157,11 +161,12 @@ data "coder_parameter" "memory" { } data "coder_parameter" "volume-size" { - name = "Volume Size" - description = "The size of the volume to create for the workspace in GB (1-20)" - type = "number" - default = "1" - icon = "https://raw.githubusercontent.com/matifali/logos/main/database.svg" + name = "volume-size" + display_name = "Volume Size" + description = "The size of the volume to create for the workspace in GB (1-20)" + type = "number" + default = "1" + icon = "https://raw.githubusercontent.com/matifali/logos/main/database.svg" validation { min = 1 max = 20 @@ -170,10 +175,11 @@ data "coder_parameter" "volume-size" { # You can see all available regions here: https://fly.io/docs/reference/regions/ data "coder_parameter" "region" { - name = "Region" - description = "The region to deploy the workspace in" - default = "ams" - icon = "/emojis/1f30e.png" + name = "region" + display_name = "Region" + description = "The region to deploy the workspace in" + default = "ams" + icon = "/emojis/1f30e.png" option { name = "Amsterdam, Netherlands" value = "ams" diff --git a/examples/templates/gcp-linux/main.tf b/examples/templates/gcp-linux/main.tf index 41c8387a494fe..26fd9fe540420 100644 --- a/examples/templates/gcp-linux/main.tf +++ b/examples/templates/gcp-linux/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } google = { source = "hashicorp/google" @@ -20,11 +20,12 @@ variable "project_id" { } data "coder_parameter" "zone" { - name = "What region should your workspace live in?" - type = "string" - icon = "/emojis/1f30e.png" - default = "us-central1-a" - mutable = false + name = "zone" + display_name = "What region should your workspace live in?" + type = "string" + icon = "/emojis/1f30e.png" + default = "us-central1-a" + mutable = false option { name = "North America (Northeast)" value = "northamerica-northeast1-a" diff --git a/examples/templates/gcp-vm-container/main.tf b/examples/templates/gcp-vm-container/main.tf index 447de56a1822d..6bde64b4a14cd 100644 --- a/examples/templates/gcp-vm-container/main.tf +++ b/examples/templates/gcp-vm-container/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } google = { source = "hashicorp/google" @@ -20,11 +20,12 @@ variable "project_id" { } data "coder_parameter" "zone" { - name = "What region should your workspace live in?" - type = "string" - default = "us-central1-a" - icon = "/emojis/1f30e.png" - mutable = false + name = "zone" + display_name = "What region should your workspace live in?" + type = "string" + default = "us-central1-a" + icon = "/emojis/1f30e.png" + mutable = false option { name = "North America (Northeast)" value = "northamerica-northeast1-a" diff --git a/examples/templates/gcp-windows/main.tf b/examples/templates/gcp-windows/main.tf index e57a7adb5732e..5e2b22be56f7c 100644 --- a/examples/templates/gcp-windows/main.tf +++ b/examples/templates/gcp-windows/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } google = { source = "hashicorp/google" @@ -20,11 +20,12 @@ variable "project_id" { } data "coder_parameter" "zone" { - name = "What region should your workspace live in?" - type = "string" - default = "us-central1-a" - icon = "/emojis/1f30e.png" - mutable = false + name = "zone" + display_name = "What region should your workspace live in?" + type = "string" + default = "us-central1-a" + icon = "/emojis/1f30e.png" + mutable = false option { name = "North America (Northeast)" value = "northamerica-northeast1-a" diff --git a/examples/templates/kubernetes-with-podman/main.tf b/examples/templates/kubernetes-with-podman/main.tf index 01ea4f52adea6..8a46fd61c0ad1 100644 --- a/examples/templates/kubernetes-with-podman/main.tf +++ b/examples/templates/kubernetes-with-podman/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } kubernetes = { source = "hashicorp/kubernetes" @@ -18,8 +18,9 @@ provider "kubernetes" { data "coder_workspace" "me" {} data "coder_parameter" "os" { - name = "Operating system" - default = "ubuntu" + name = "os" + display_name = "Operating system" + default = "ubuntu" option { name = "Ubuntu" value = "ubuntu" @@ -33,8 +34,9 @@ data "coder_parameter" "os" { } data "coder_parameter" "cpu" { - name = "CPU (cores)" - default = "2" + name = "cpu" + display_name = "CPU (cores)" + default = "2" option { name = "2 Cores" value = "2" @@ -54,8 +56,9 @@ data "coder_parameter" "cpu" { } data "coder_parameter" "memory" { - name = "Memory (GB)" - default = "2" + name = "memory" + display_name = "Memory (GB)" + default = "2" option { name = "2 GB" value = "2" diff --git a/examples/templates/kubernetes/main.tf b/examples/templates/kubernetes/main.tf index b373dc5744205..bbf54ecf1a9f6 100644 --- a/examples/templates/kubernetes/main.tf +++ b/examples/templates/kubernetes/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.6.17" + version = "~> 0.7.0" } kubernetes = { source = "hashicorp/kubernetes" @@ -35,10 +35,11 @@ variable "namespace" { } data "coder_parameter" "cpu" { - name = "CPU (cores)" - default = "2" - icon = "/icon/memory.svg" - mutable = true + name = "cpu" + display_name = "CPU (cores)" + default = "2" + icon = "/icon/memory.svg" + mutable = true option { name = "2 Cores" value = "2" @@ -58,10 +59,11 @@ data "coder_parameter" "cpu" { } data "coder_parameter" "memory" { - name = "Memory (GB)" - default = "2" - icon = "/icon/memory.svg" - mutable = true + name = "memory" + display_name = "Memory (GB)" + default = "2" + icon = "/icon/memory.svg" + mutable = true option { name = "2 GB" value = "2" @@ -81,11 +83,12 @@ data "coder_parameter" "memory" { } data "coder_parameter" "home_disk_size" { - name = "Home Disk Size (GB)" - default = "10" - type = "number" - icon = "/emojis/1f4be.png" - mutable = false + name = "home_disk_size" + display_name = "Home Disk Size (GB)" + default = "10" + type = "number" + icon = "/emojis/1f4be.png" + mutable = false validation { min = 1 max = 99999 From 1fec6442711baf88a5f0d64e391d589734b6f13d Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 4 Apr 2023 14:20:08 +0300 Subject: [PATCH 02/14] fix typos and `terraform validate` --- examples/templates/aws-windows/main.tf | 2 +- examples/templates/azure-linux/main.tf | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/templates/aws-windows/main.tf b/examples/templates/aws-windows/main.tf index daf694d93b942..ee27898cd2c27 100644 --- a/examples/templates/aws-windows/main.tf +++ b/examples/templates/aws-windows/main.tf @@ -108,7 +108,7 @@ data "coder_parameter" "region" { data "coder_parameter" "instance_type" { name = "instance_type" - dsiplay_name = "Instance Type" + display_name = "Instance Type" description = "What instance type should your workspace use?" default = "t3.micro" mutable = false diff --git a/examples/templates/azure-linux/main.tf b/examples/templates/azure-linux/main.tf index 5995b7f11604d..db2742946588b 100644 --- a/examples/templates/azure-linux/main.tf +++ b/examples/templates/azure-linux/main.tf @@ -151,12 +151,12 @@ data "coder_parameter" "location" { } data "coder_parameter" "instance_type" { - name = "instance_type" - display = "Instance Type" - description = "What instance type should your workspace use?" - default = "Standard_B4ms" - icon = "/icon/azure.png" - mutable = false + name = "instance_type" + display_name = "Instance Type" + description = "What instance type should your workspace use?" + default = "Standard_B4ms" + icon = "/icon/azure.png" + mutable = false option { name = "Standard_B1ms (1 vCPU, 2 GiB RAM)" value = "Standard_B1ms" @@ -204,13 +204,13 @@ data "coder_parameter" "instance_type" { } data "coder_parameter" "home_size" { - name = "home_size" - display = "Home Volume Size" - description = "How large would you like your home volume to be (in GB)?" - default = 20 - type = "number" - icon = "/icon/azure.png" - mutable = false + name = "home_size" + display_name = "Home Volume Size" + description = "How large would you like your home volume to be (in GB)?" + default = 20 + type = "number" + icon = "/icon/azure.png" + mutable = false validation { min = 1 max = 1024 From 6c9959e5c001db802296275db1942b115a425fc9 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 11:57:22 +0300 Subject: [PATCH 03/14] update display_name --- examples/templates/do-linux/main.tf | 6 +++--- examples/templates/docker-image-builds/main.tf | 2 +- examples/templates/docker-with-dotfiles/main.tf | 4 ++-- examples/templates/fly-docker-image/main.tf | 6 +++--- examples/templates/gcp-linux/main.tf | 3 ++- examples/templates/gcp-vm-container/main.tf | 3 ++- examples/templates/gcp-windows/main.tf | 3 ++- examples/templates/kubernetes-with-podman/main.tf | 9 ++++++--- examples/templates/kubernetes/main.tf | 9 ++++++--- 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index 14e82904b86fa..69ab5f342e026 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -147,8 +147,8 @@ data "coder_parameter" "droplet_size" { data "coder_parameter" "home_volume_size" { name = "home_volume_size" - display_name = "How large would you like your home volume to be (in GB)?" - description = "This volume will be mounted to /home/coder." + display_name = "Home Volume Size" + description = "How large would you like your home volume to be (in GB)?" type = "number" default = "20" mutable = false @@ -160,7 +160,7 @@ data "coder_parameter" "home_volume_size" { data "coder_parameter" "region" { name = "region" - display_name = "Which region would you like to use?" + display_name = "Region" description = "This is the region where your workspace will be created." icon = "/emojis/1f30e.png" type = "string" diff --git a/examples/templates/docker-image-builds/main.tf b/examples/templates/docker-image-builds/main.tf index a3b7c73f2e5d4..8c8dc1615eb57 100644 --- a/examples/templates/docker-image-builds/main.tf +++ b/examples/templates/docker-image-builds/main.tf @@ -52,7 +52,7 @@ resource "coder_app" "code-server" { } data "coder_parameter" "docker_image" { - name = "What Docker image would you like to use for your workspace?" + name = "Docker Image" description = "The Docker image will be used to build your workspace. You can choose from a list of pre-built images or provide your own." default = "base" icon = "/icon/docker.png" diff --git a/examples/templates/docker-with-dotfiles/main.tf b/examples/templates/docker-with-dotfiles/main.tf index 95a6223bc95fe..5f51d700bf11b 100644 --- a/examples/templates/docker-with-dotfiles/main.tf +++ b/examples/templates/docker-with-dotfiles/main.tf @@ -29,7 +29,7 @@ data "coder_workspace" "me" { data "coder_parameter" "docker_image" { name = "docker_image" - display_name = "What Docker image would you like to use for your workspace?" + display_name = "Docker Image" description = "The Docker image will be used to build your workspace." default = "codercom/enterprise-base:ubuntu" icon = "/icon/docker.png" @@ -39,7 +39,7 @@ data "coder_parameter" "docker_image" { data "coder_parameter" "dotfiles_uri" { name = "dotfiles_uri" - display_name = "What dotfiles repo would you like to use for your workspace?" + display_name = "dotfiles URI" description = <<-EOF Dotfiles repo URI (optional) diff --git a/examples/templates/fly-docker-image/main.tf b/examples/templates/fly-docker-image/main.tf index 28f48411416ef..16fd667a444c1 100644 --- a/examples/templates/fly-docker-image/main.tf +++ b/examples/templates/fly-docker-image/main.tf @@ -148,7 +148,7 @@ data "coder_parameter" "cputype" { data "coder_parameter" "memory" { name = "memory" - display_name = "Memory (GB)" + display_name = "Memory" description = "The amount of memory to allocate to the workspace in GB (up to 16GB)" type = "number" default = "2" @@ -162,7 +162,7 @@ data "coder_parameter" "memory" { data "coder_parameter" "volume-size" { name = "volume-size" - display_name = "Volume Size" + display_name = "Home Volume Size" description = "The size of the volume to create for the workspace in GB (1-20)" type = "number" default = "1" @@ -260,7 +260,7 @@ data "coder_parameter" "region" { resource "coder_app" "code-server" { count = 1 agent_id = coder_agent.main.id - display_name = "Code Server" + display_name = "code-server" slug = "code-server" url = "http://localhost:8080?folder=/home/coder/" icon = "/icon/code.svg" diff --git a/examples/templates/gcp-linux/main.tf b/examples/templates/gcp-linux/main.tf index 26fd9fe540420..234219db35b0c 100644 --- a/examples/templates/gcp-linux/main.tf +++ b/examples/templates/gcp-linux/main.tf @@ -21,7 +21,8 @@ variable "project_id" { data "coder_parameter" "zone" { name = "zone" - display_name = "What region should your workspace live in?" + display_name = "Zone" + description = "Which zone should your workspace live in?" type = "string" icon = "/emojis/1f30e.png" default = "us-central1-a" diff --git a/examples/templates/gcp-vm-container/main.tf b/examples/templates/gcp-vm-container/main.tf index 6bde64b4a14cd..51d82c1da6407 100644 --- a/examples/templates/gcp-vm-container/main.tf +++ b/examples/templates/gcp-vm-container/main.tf @@ -21,7 +21,8 @@ variable "project_id" { data "coder_parameter" "zone" { name = "zone" - display_name = "What region should your workspace live in?" + display_name = "Zone" + description = "Which zone should your workspace live in?" type = "string" default = "us-central1-a" icon = "/emojis/1f30e.png" diff --git a/examples/templates/gcp-windows/main.tf b/examples/templates/gcp-windows/main.tf index 5e2b22be56f7c..c7ef3e175c974 100644 --- a/examples/templates/gcp-windows/main.tf +++ b/examples/templates/gcp-windows/main.tf @@ -21,7 +21,8 @@ variable "project_id" { data "coder_parameter" "zone" { name = "zone" - display_name = "What region should your workspace live in?" + display_name = "Zone" + description = "Which zone should your workspace live in?" type = "string" default = "us-central1-a" icon = "/emojis/1f30e.png" diff --git a/examples/templates/kubernetes-with-podman/main.tf b/examples/templates/kubernetes-with-podman/main.tf index 8a46fd61c0ad1..254352ab030ad 100644 --- a/examples/templates/kubernetes-with-podman/main.tf +++ b/examples/templates/kubernetes-with-podman/main.tf @@ -20,6 +20,7 @@ data "coder_workspace" "me" {} data "coder_parameter" "os" { name = "os" display_name = "Operating system" + description = "The operating system to use for your workspace." default = "ubuntu" option { name = "Ubuntu" @@ -35,7 +36,8 @@ data "coder_parameter" "os" { data "coder_parameter" "cpu" { name = "cpu" - display_name = "CPU (cores)" + display_name = "CPU" + description = "The number of CPU cores" default = "2" option { name = "2 Cores" @@ -57,7 +59,8 @@ data "coder_parameter" "cpu" { data "coder_parameter" "memory" { name = "memory" - display_name = "Memory (GB)" + display_name = "Memory" + description = "The amount of memory (in GB)" default = "2" option { name = "2 GB" @@ -96,7 +99,7 @@ resource "coder_agent" "dev" { # code-server resource "coder_app" "code-server" { agent_id = coder_agent.dev.id - display_name = "Code Server" + display_name = "code-server" slug = "code-server" icon = "/icon/code.svg" url = "http://localhost:13337" diff --git a/examples/templates/kubernetes/main.tf b/examples/templates/kubernetes/main.tf index bbf54ecf1a9f6..f1d819a619837 100644 --- a/examples/templates/kubernetes/main.tf +++ b/examples/templates/kubernetes/main.tf @@ -36,7 +36,8 @@ variable "namespace" { data "coder_parameter" "cpu" { name = "cpu" - display_name = "CPU (cores)" + display_name = "CPU" + description = "The number of CPU cores" default = "2" icon = "/icon/memory.svg" mutable = true @@ -60,7 +61,8 @@ data "coder_parameter" "cpu" { data "coder_parameter" "memory" { name = "memory" - display_name = "Memory (GB)" + display_name = "Memory" + description = "The amount of memory in GB" default = "2" icon = "/icon/memory.svg" mutable = true @@ -84,7 +86,8 @@ data "coder_parameter" "memory" { data "coder_parameter" "home_disk_size" { name = "home_disk_size" - display_name = "Home Disk Size (GB)" + display_name = "Home Disk Size" + description = "The size of the home disk in GB" default = "10" type = "number" icon = "/emojis/1f4be.png" From 9a49c95d75d9451934f37ad462f9c7113357fc95 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:28:11 +0300 Subject: [PATCH 04/14] Update examples/templates/aws-windows/main.tf Co-authored-by: Ben Potter --- examples/templates/aws-windows/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/aws-windows/main.tf b/examples/templates/aws-windows/main.tf index ee27898cd2c27..de9ffe5934925 100644 --- a/examples/templates/aws-windows/main.tf +++ b/examples/templates/aws-windows/main.tf @@ -108,7 +108,7 @@ data "coder_parameter" "region" { data "coder_parameter" "instance_type" { name = "instance_type" - display_name = "Instance Type" + display_name = "Instance type" description = "What instance type should your workspace use?" default = "t3.micro" mutable = false From 8a50c23e018174f2fa35ecefdba01fdce4a26d4d Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:28:21 +0300 Subject: [PATCH 05/14] Update examples/templates/aws-linux/main.tf Co-authored-by: Ben Potter --- examples/templates/aws-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index 5fe0faa0d7072..74e1df2d8b139 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -108,7 +108,7 @@ data "coder_parameter" "region" { data "coder_parameter" "instance_type" { name = "instance_type" - display_name = "Instance Type" + display_name = "Instance type" description = "What instance type should your workspace use?" default = "t3.micro" mutable = false From c43d5c254f890a8b73c1446b729abbc8962ceaee Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:28:33 +0300 Subject: [PATCH 06/14] Update examples/templates/azure-linux/main.tf Co-authored-by: Ben Potter --- examples/templates/azure-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/azure-linux/main.tf b/examples/templates/azure-linux/main.tf index db2742946588b..abfa267a0a460 100644 --- a/examples/templates/azure-linux/main.tf +++ b/examples/templates/azure-linux/main.tf @@ -152,7 +152,7 @@ data "coder_parameter" "location" { data "coder_parameter" "instance_type" { name = "instance_type" - display_name = "Instance Type" + display_name = "Instance type" description = "What instance type should your workspace use?" default = "Standard_B4ms" icon = "/icon/azure.png" From 3f7d72529246ed355a26f463eb5c261934977e1e Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:28:41 +0300 Subject: [PATCH 07/14] Update examples/templates/azure-linux/main.tf Co-authored-by: Ben Potter --- examples/templates/azure-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/azure-linux/main.tf b/examples/templates/azure-linux/main.tf index abfa267a0a460..b76f0508f278e 100644 --- a/examples/templates/azure-linux/main.tf +++ b/examples/templates/azure-linux/main.tf @@ -205,7 +205,7 @@ data "coder_parameter" "instance_type" { data "coder_parameter" "home_size" { name = "home_size" - display_name = "Home Volume Size" + display_name = "Home volume size" description = "How large would you like your home volume to be (in GB)?" default = 20 type = "number" From b747b989718e33990205253a75ce95b6b1be9035 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:28:51 +0300 Subject: [PATCH 08/14] Update examples/templates/do-linux/main.tf Co-authored-by: Ben Potter --- examples/templates/do-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index 69ab5f342e026..d1fa00a11c66a 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -53,7 +53,7 @@ variable "step2_do_admin_ssh_key" { data "coder_parameter" "droplet_image" { name = "droplet_image" - display_name = "Droplet Image" + display_name = "Droplet image" description = "Which Droplet image would you like to use?" default = "ubuntu-22-04-x64" type = "string" From 7844c4e6612a7797c6b51787582fe463e3dad3a3 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 7 Apr 2023 22:29:11 +0300 Subject: [PATCH 09/14] Update examples/templates/do-linux/main.tf Co-authored-by: Ben Potter --- examples/templates/do-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index d1fa00a11c66a..f19131de3acd5 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -112,7 +112,7 @@ data "coder_parameter" "droplet_image" { data "coder_parameter" "droplet_size" { name = "droplet_size" - display_name = "Droplet Size" + display_name = "Droplet size" description = "Which Droplet configuration would you like to use?" default = "s-1vcpu-1gb" type = "string" From 8cb51a2d163660f6bd54415c2f31c6dc53ea0570 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 9 Apr 2023 07:04:56 +0300 Subject: [PATCH 10/14] Update main.tf --- examples/templates/do-linux/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index f19131de3acd5..18406f4b6a6ab 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -147,7 +147,7 @@ data "coder_parameter" "droplet_size" { data "coder_parameter" "home_volume_size" { name = "home_volume_size" - display_name = "Home Volume Size" + display_name = "Home volume size" description = "How large would you like your home volume to be (in GB)?" type = "number" default = "20" From eade13ce0c753ab44f773ccd9fde9022b7f41174 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 9 Apr 2023 07:05:50 +0300 Subject: [PATCH 11/14] Update main.tf --- examples/templates/docker-image-builds/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/docker-image-builds/main.tf b/examples/templates/docker-image-builds/main.tf index 8c8dc1615eb57..f5547b6c64165 100644 --- a/examples/templates/docker-image-builds/main.tf +++ b/examples/templates/docker-image-builds/main.tf @@ -52,7 +52,7 @@ resource "coder_app" "code-server" { } data "coder_parameter" "docker_image" { - name = "Docker Image" + name = "Docker image" description = "The Docker image will be used to build your workspace. You can choose from a list of pre-built images or provide your own." default = "base" icon = "/icon/docker.png" From 1886cc985a9f052780389729ecabf4003c9beab2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 9 Apr 2023 07:06:19 +0300 Subject: [PATCH 12/14] Update main.tf --- examples/templates/docker-with-dotfiles/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/docker-with-dotfiles/main.tf b/examples/templates/docker-with-dotfiles/main.tf index 5f51d700bf11b..a5a2609c7168c 100644 --- a/examples/templates/docker-with-dotfiles/main.tf +++ b/examples/templates/docker-with-dotfiles/main.tf @@ -29,7 +29,7 @@ data "coder_workspace" "me" { data "coder_parameter" "docker_image" { name = "docker_image" - display_name = "Docker Image" + display_name = "Docker image" description = "The Docker image will be used to build your workspace." default = "codercom/enterprise-base:ubuntu" icon = "/icon/docker.png" From a7352779cfccc785ffa06d660c52519f56e93ea6 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 9 Apr 2023 07:07:22 +0300 Subject: [PATCH 13/14] Update main.tf --- examples/templates/fly-docker-image/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/templates/fly-docker-image/main.tf b/examples/templates/fly-docker-image/main.tf index 16fd667a444c1..e539e1664eb46 100644 --- a/examples/templates/fly-docker-image/main.tf +++ b/examples/templates/fly-docker-image/main.tf @@ -109,7 +109,7 @@ EOF data "coder_parameter" "docker-image" { name = "docker-image" - display_name = "Docker Image" + display_name = "Docker image" description = "The docker image to use for the workspace" default = "codercom/code-server:latest" icon = "https://raw.githubusercontent.com/matifali/logos/main/docker.svg" @@ -131,7 +131,7 @@ data "coder_parameter" "cpu" { data "coder_parameter" "cputype" { name = "cputype" - display_name = "CPU Type" + display_name = "CPU type" description = "Which CPU type do you want?" default = "shared" icon = "https://raw.githubusercontent.com/matifali/logos/main/cpu-1.svg" @@ -162,7 +162,7 @@ data "coder_parameter" "memory" { data "coder_parameter" "volume-size" { name = "volume-size" - display_name = "Home Volume Size" + display_name = "Home volume size" description = "The size of the volume to create for the workspace in GB (1-20)" type = "number" default = "1" From 7bc13fb4e0b922017b1c8d1efcdb3dc311c87878 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 9 Apr 2023 07:09:03 +0300 Subject: [PATCH 14/14] Update main.tf --- examples/templates/kubernetes/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/kubernetes/main.tf b/examples/templates/kubernetes/main.tf index f1d819a619837..c96b11edc5954 100644 --- a/examples/templates/kubernetes/main.tf +++ b/examples/templates/kubernetes/main.tf @@ -86,7 +86,7 @@ data "coder_parameter" "memory" { data "coder_parameter" "home_disk_size" { name = "home_disk_size" - display_name = "Home Disk Size" + display_name = "Home disk size" description = "The size of the home disk in GB" default = "10" type = "number"