Skip to content

Commit 369b82a

Browse files
committed
refs platform/#3152: remove unused variables
1 parent f21fd59 commit 369b82a

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ locals {
99

1010
final_namespace = var.create_namespace ? resource.kubernetes_namespace_v1.this[0].metadata[0].name : data.kubernetes_namespace_v1.this[0].metadata[0].name
1111

12+
use_existing_project = var.gitlab_project_name == "" ? 1 : 0
13+
project_id = local.use_existing_project == 1 ? data.gitlab_project.this[0].id : gitlab_project.project[0].id
14+
1215
gitlab_agent_token_name_computed = replace(var.gitlab_agent_token_name, "{{gitlab_agent_name}}", var.gitlab_agent_name)
1316
gitlab_agent_token_description_computed = replace(var.gitlab_agent_token_description, "{{gitlab_agent_name}}", var.gitlab_agent_name)
1417
gitlab_agent_commmit_message_computed = replace(var.gitlab_agent_commmit_message, "{{gitlab_agent_name}}", var.gitlab_agent_name)
@@ -22,10 +25,6 @@ locals {
2225
(var.gitlab_agent_variable_name_agent_id) : gitlab_cluster_agent.this.name,
2326
(var.gitlab_agent_variable_name_agent_project) : local.use_existing_project == 1 ? data.gitlab_project.this[0].path_with_namespace : gitlab_project.project[0].path_with_namespace,
2427
}
25-
use_existing_project = var.gitlab_project_name == "" ? 1 : 0
26-
project_id = local.use_existing_project == 1 ? data.gitlab_project.this[0].id : gitlab_project.project[0].id
27-
28-
2928
}
3029

3130
# Gitlab resources

variables.tf

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@ variable "gitlab_project_name" {
44
default = ""
55
}
66

7-
variable "gitlab_project_details" {
8-
description = "Details of the Gitlab project including name, group, and description"
9-
type = object({
10-
name = string
11-
group = string
12-
})
13-
default = {
14-
name = ""
15-
group = ""
16-
description = ""
17-
}
18-
}
19-
207
variable "gitlab_root_namespace" {
218
description = "The full path of the root namespace in Gitlab. This is the namespace where the Gitlab Agent will be granted access."
229
type = string

0 commit comments

Comments
 (0)