| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -17,7 +17,7 @@ variable "agent_id" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				variable "extensions" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  type        = list(string)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  description = "A list of extensions to install."
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    default = [ ]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  default     = []
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				variable "port" {
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -55,12 +55,12 @@ resource "coder_script" "code-server" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  display_name = "code-server"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  icon         = "/icon/code.svg"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  script = templatefile("${path.module}/run.sh", {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      EXTENSIONS: join(",", var.extensions),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      PORT: var.port,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      LOG_PATH: var.log_path,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      INSTALL_PREFIX: var.install_prefix,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    EXTENSIONS : join(",", var.extensions),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    PORT : var.port,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    LOG_PATH : var.log_path,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    INSTALL_PREFIX : var.install_prefix,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    // This is necessary otherwise the quotes are stripped!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      SETTINGS: replace(jsonencode(var.settings), "\"", "\\\""),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    SETTINGS : replace(jsonencode(var.settings), "\"", "\\\""),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  })
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  run_on_start = true
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |