Update README

pull/46/head
Kyle Carberry 2 years ago
parent 928380bc41
commit cded504ff2

@ -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.
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:
```hcl
module "git-clone" {
source = "https://registry.coder.com/modules/git-clone"
url = "https://github.com/coder/coder"
}
```
```hcl
module "gcp_region" {
source = "https://registry.coder.com/modules/gcp-region"
default = ["us-west1-a"]
regions = ["us-west1"]
gpu_only = false
}
```
To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template:
2. Add all zones in the Europe West region:
```hcl
data "coder_git_auth" "github" {
id = "github"
}
```
```hcl
module "gcp_region" {
source = "https://registry.coder.com/modules/gcp-region"
regions = ["europe-west"]
single_zone_per_region = false
}
```
## Examples
3. Add a single zone from each region in US and Europe that laos has GPUs
### 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
}
```
```hcl
module "git-clone" {
source = "https://registry.coder.com/modules/git-clone"
url = "https://github.com/coder/coder"
path = "~/projects/coder/coder"
}
```

Loading…
Cancel
Save