| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -8,39 +8,31 @@ tags: [git, helper]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				---
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Git Clone
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				This module allows you to automatically clone a repository by URL and skip if it
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				exists in the path provided.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				## Examples
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				1. Add only GPU zones in the US West 1 region:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				This module allows you to automatically clone a repository by URL and skip if it exists in the path provided.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```hcl
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    module "gcp_region" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      source   = "https://registry.coder.com/modules/gcp-region"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      default  = ["us-west1-a"]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      regions  = ["us-west1"]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      gpu_only = false
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				module "git-clone" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    source = "https://registry.coder.com/modules/git-clone"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    url = "https://github.com/coder/coder"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				2. Add all zones in the Europe West region:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```hcl
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    module "gcp_region" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      source                 = "https://registry.coder.com/modules/gcp-region"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      regions                = ["europe-west"]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      single_zone_per_region = false
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				data "coder_git_auth" "github" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    id = "github"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				3. Add a single zone from each region in US and Europe that laos has GPUs
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				## Examples
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				### Custom Path
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```hcl
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    module "gcp_region" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      source                 = "https://registry.coder.com/modules/gcp-region"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      regions                = ["us", "europe"]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      gpu_only               = true
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      single_zone_per_region = true
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				module "git-clone" {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    source = "https://registry.coder.com/modules/git-clone"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    url = "https://github.com/coder/coder"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    path = "~/projects/coder/coder"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				```
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |