| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -150,8 +150,7 @@ resource "coder_script" "vscode-web" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    EXTENSIONS_DIR : var.extensions_dir,
 | 
					 | 
					 | 
					 | 
					    EXTENSIONS_DIR : var.extensions_dir,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    FOLDER : var.folder,
 | 
					 | 
					 | 
					 | 
					    FOLDER : var.folder,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
 | 
					 | 
					 | 
					 | 
					    AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    SERVER_BASE_PATH : var.subdomain ? "" : format("/@%s/%s/apps/vscode-web/",
 | 
					 | 
					 | 
					 | 
					    SERVER_BASE_PATH : local.server_base_path,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    data.coder_workspace_owner.me.name, data.coder_workspace.me.name),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  })
 | 
					 | 
					 | 
					 | 
					  })
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  run_on_start = true
 | 
					 | 
					 | 
					 | 
					  run_on_start = true
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -172,16 +171,21 @@ resource "coder_app" "vscode-web" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  agent_id     = var.agent_id
 | 
					 | 
					 | 
					 | 
					  agent_id     = var.agent_id
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  slug         = var.slug
 | 
					 | 
					 | 
					 | 
					  slug         = var.slug
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  display_name = var.display_name
 | 
					 | 
					 | 
					 | 
					  display_name = var.display_name
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					  url          = local.url
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  url       = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  icon         = "/icon/code.svg"
 | 
					 | 
					 | 
					 | 
					  icon         = "/icon/code.svg"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  subdomain    = var.subdomain
 | 
					 | 
					 | 
					 | 
					  subdomain    = var.subdomain
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  share        = var.share
 | 
					 | 
					 | 
					 | 
					  share        = var.share
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  order        = var.order
 | 
					 | 
					 | 
					 | 
					  order        = var.order
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  healthcheck {
 | 
					 | 
					 | 
					 | 
					  healthcheck {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    url       = "http://localhost:${var.port}/healthz"
 | 
					 | 
					 | 
					 | 
					    url       = local.healthcheck_url
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    interval  = 5
 | 
					 | 
					 | 
					 | 
					    interval  = 5
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    threshold = 6
 | 
					 | 
					 | 
					 | 
					    threshold = 6
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }
 | 
					 | 
					 | 
					 | 
					  }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					locals {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  server_base_path = var.subdomain ? "" : format("/@%s/%s/apps/%s/", data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.slug)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  url              = var.folder == "" ? "http://localhost:${var.port}${local.server_base_path}" : "http://localhost:${var.port}${local.server_base_path}?folder=${var.folder}"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  healthcheck_url   = var.subdomain ? "http://localhost:${var.port}/healthz" : "http://localhost:${var.port}${local.server_base_path}/healthz"  
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
 
 |