chore: update templates to use rich parameters (#6397)

This commit is contained in:
Muhammad Atif Ali
2023-03-15 13:11:52 +00:00
committed by GitHub
parent 3cf235c564
commit a0e096bcfe
21 changed files with 1251 additions and 358 deletions
+5 -8
View File
@@ -2,11 +2,11 @@ terraform {
required_providers {
coder = {
source = "coder/coder"
version = "~> 0.6.12"
version = "~> 0.6.17"
}
docker = {
source = "kreuzwerker/docker"
version = "~> 2.22"
version = "~> 3.0.1"
}
}
}
@@ -25,9 +25,8 @@ data "coder_workspace" "me" {
}
resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
arch = data.coder_provisioner.me.arch
os = "linux"
login_before_ready = false
startup_script_timeout = 180
startup_script = <<-EOT
@@ -66,7 +65,6 @@ resource "coder_app" "code-server" {
}
}
resource "docker_volume" "home_volume" {
name = "coder-${data.coder_workspace.me.id}-home"
# Protect the volume from being deleted due to changes in attributes.
@@ -94,11 +92,10 @@ resource "docker_volume" "home_volume" {
}
}
resource "docker_image" "main" {
name = "coder-${data.coder_workspace.me.id}"
build {
path = "./build"
context = "./build"
build_args = {
USER = local.username
}