From 61f1d7b5f91f96b7d39c213adc1190b04c684fd0 Mon Sep 17 00:00:00 2001 From: Rie Takahashi Date: Thu, 29 Aug 2024 16:52:52 +0100 Subject: [PATCH] chore: add readme for folder_name attribute --- git-clone/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/git-clone/README.md b/git-clone/README.md index 255b3f1..5efc50e 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -153,3 +153,20 @@ module "git-clone" { branch_name = "feat/example" } ``` + +## Git clone with different destination folder + +By default, the repository will be cloned into a folder matching the repository name. You can use the `folder_name` attribute to change the name of the destination folder to something else. + +For example, this will clone into the `~/projects/coder/coder-dev` folder: + +```tf +module "git-clone" { + source = "registry.coder.com/modules/git-clone/coder" + version = "1.0.12" + agent_id = coder_agent.example.id + url = "https://github.com/coder/coder" + folder_name = "coder-dev" + base_dir = "~/projects/coder" +} +```