| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -42,13 +42,13 @@ variable "accept_license" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }
 | 
					 | 
					 | 
					 | 
					  }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					variable "version" {
 | 
					 | 
					 | 
					 | 
					variable "custom_version" {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  type        = string
 | 
					 | 
					 | 
					 | 
					  type        = string
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  description = "The version of VS Code to install."
 | 
					 | 
					 | 
					 | 
					  description = "The version of VS Code to install."
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  default     = "latest"
 | 
					 | 
					 | 
					 | 
					  default     = "latest"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  # add a validation block to validate the version is greater than or equal to 1.82.0
 | 
					 | 
					 | 
					 | 
					  # add a validation block to validate the version is greater than or equal to 1.82.0
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  validation {
 | 
					 | 
					 | 
					 | 
					  validation {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    condition     = var.version >= "1.82.0"
 | 
					 | 
					 | 
					 | 
					    condition     = var.custom_version >= "1.82.0"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    error_message = "Version must be greater than or equal to 1.82.0"
 | 
					 | 
					 | 
					 | 
					    error_message = "Version must be greater than or equal to 1.82.0"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }
 | 
					 | 
					 | 
					 | 
					  }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -60,7 +60,7 @@ resource "coder_script" "vscode-web" {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  script = templatefile("${path.module}/run.sh", {
 | 
					 | 
					 | 
					 | 
					  script = templatefile("${path.module}/run.sh", {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    PORT : var.port,
 | 
					 | 
					 | 
					 | 
					    PORT : var.port,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    LOG_PATH : var.log_path,
 | 
					 | 
					 | 
					 | 
					    LOG_PATH : var.log_path,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    VERSION : var.version,
 | 
					 | 
					 | 
					 | 
					    VERSION : var.custom_version,
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  })
 | 
					 | 
					 | 
					 | 
					  })
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  run_on_start = true
 | 
					 | 
					 | 
					 | 
					  run_on_start = true
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |