We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88121eb commit 601187eCopy full SHA for 601187e
deploy.tf
@@ -1,7 +1,7 @@
1
locals {
2
gitlab_project_ids = toset(concat(var.gitlab_project_ids, var.gitlab_project_id != "" ? [var.gitlab_project_id] : []))
3
- first_project_web_url = data.gitlab_project.this[element(keys(data.gitlab_project.this), 0)].web_url
4
- gitlab_domain = regex("https://([^/]+)/.*", local.first_project_web_url)[0]
+ first_project_web_url = length(local.gitlab_project_ids) > 0 ? data.gitlab_project.this[element(keys(data.gitlab_project.this), 0)].web_url : ""
+ gitlab_domain = length(local.gitlab_project_ids) > 0 ? regex("https://([^/]+)/.*", local.first_project_web_url)[0] : ""
5
}
6
7
data "gitlab_project" "this" {
0 commit comments