Update main.tf

pull/132/head
Muhammad Atif Ali 1 year ago committed by GitHub
parent e972d8f97c
commit fec4eca637
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,9 +14,9 @@ variable "url" {
type = string type = string
} }
variable "path" { variable "base_dir" {
default = "" default = ""
description = "The path to clone the repository. Defaults to \"$HOME/<basename of url>\"." description = "The base directory to clone the repository. Defaults to \"$HOME\"."
type = string type = string
} }
@ -26,7 +26,7 @@ variable "agent_id" {
} }
locals { 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" { output "repo_dir" {

Loading…
Cancel
Save