From fec4eca637cc515ddae0a7b77dd1b390e14bc755 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 26 Jan 2024 15:17:03 +0300 Subject: [PATCH] Update main.tf --- git-clone/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-clone/main.tf b/git-clone/main.tf index 90d5428..c1e65cf 100644 --- a/git-clone/main.tf +++ b/git-clone/main.tf @@ -14,9 +14,9 @@ variable "url" { type = string } -variable "path" { +variable "base_dir" { default = "" - description = "The path to clone the repository. Defaults to \"$HOME/\"." + description = "The base directory to clone the repository. Defaults to \"$HOME\"." type = string } @@ -26,7 +26,7 @@ variable "agent_id" { } locals { - clone_path = var.path != "" ? join("/", [var.path, replace(basename(var.url), ".git", "")]) : join("/", ["~", replace(basename(var.url), ".git", "")]) + clone_path = var.base_dir != "" ? join("/", [var.base_dir, replace(basename(var.url), ".git", "")]) : join("/", ["~", replace(basename(var.url), ".git", "")]) } output "repo_dir" {