@ -39,9 +39,14 @@ variable "coder_parameter_order" {
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  default      = null 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				} 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				data  " coder_parameter "  " dotfiles_uri "  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  count  = var . dotfiles_uri  ==  null  ?  1  :  0 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				variable  " manual_update "  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  type         = bool 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  description  = " Choose whether to enable a Coder app to update dotfiles on demand. This will add a button to workspace page to update dotfiles on demand. " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  default      = false 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				} 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				data  " coder_parameter "  " dotfiles_uri "  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  count         = var . dotfiles_uri  ==  null  ?  1  :  0 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  type          = " string " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  name          = " dotfiles_uri " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  display_name  = " Dotfiles URL " 
 
			
		 
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
			
			 
			 
			
				@ -68,6 +73,18 @@ resource "coder_script" "dotfiles" {
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  run_on_start  = true 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				} 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				resource  " coder_app "  " dotfiles "  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  count         = var . manual_update 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  agent_id      = var . agent_id 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  display_name  = " Update Dotfiles " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  slug          = " dotfiles " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  icon          = " /icon/dotfiles.svg " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  command       = templatefile ( " ${ path . module } /run.sh " ,  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				    DOTFILES_URI  :  local . dotfiles_uri , 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				    DOTFILES_USER  :  local . user 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  } ) 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				} 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				output  " dotfiles_uri "  { 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  description  = " Dotfiles URI " 
 
			
		 
		
	
		
			
				 
				 
			
			 
			 
			
				  value        = local . dotfiles_uri