Skip to content

Commit 2451b7a

Browse files
committed
feat: add gitlab_agents_project_id and gitlab_root_namespace_id outputs
1 parent 4bea633 commit 2451b7a

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99
## [Unreleased]
1010

11+
## [0.4.0] - 2024-07-10
12+
13+
[Compare with previous version](https://github.com/sparkfabrik/terraform-gitlab-kubernetes-gitlab-agent/compare/0.3.0...0.4.0)
14+
15+
### Added
16+
17+
- Add the `gitlab_agents_project_id` and `gitlab_root_namespace_id` outputs to allow the retrieval of the Gitlab project and root namespace IDs.
18+
1119
## [0.3.0] - 2024-07-10
1220

1321
[Compare with previous version](https://github.com/sparkfabrik/terraform-gitlab-kubernetes-gitlab-agent/compare/0.2.0...0.3.0)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ provider "gitlab" {
7777
|------|-------------|
7878
| <a name="output_gitlab_agent_kubernetes_context_variables"></a> [gitlab\_agent\_kubernetes\_context\_variables](#output\_gitlab\_agent\_kubernetes\_context\_variables) | The Gitlab Agent information to be used to configure the Kubernetes context. |
7979
| <a name="output_gitlab_agent_token"></a> [gitlab\_agent\_token](#output\_gitlab\_agent\_token) | The token of the Gitlab Agent. |
80+
| <a name="output_gitlab_agents_project_id"></a> [gitlab\_agents\_project\_id](#output\_gitlab\_agents\_project\_id) | The ID of the Gitlab project where the Gitlab Agents are installed. |
81+
| <a name="output_gitlab_root_namespace_id"></a> [gitlab\_root\_namespace\_id](#output\_gitlab\_root\_namespace\_id) | The ID of the root namespace of the Gitlab Agents project. |
8082
| <a name="output_k8s_common_labels"></a> [k8s\_common\_labels](#output\_k8s\_common\_labels) | Common labels to apply to the kubernetes resources. |
8183
| <a name="output_k8s_gitlab_agent_token_secret_name"></a> [k8s\_gitlab\_agent\_token\_secret\_name](#output\_k8s\_gitlab\_agent\_token\_secret\_name) | The name of the Kubernetes secret that will store the Gitlab Agent token. |
8284

outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ output "gitlab_agent_kubernetes_context_variables" {
1818
value = local.gitlab_agent_kubernetes_context_variables
1919
description = "The Gitlab Agent information to be used to configure the Kubernetes context."
2020
}
21+
22+
output "gitlab_agents_project_id" {
23+
description = "The ID of the Gitlab project where the Gitlab Agents are installed."
24+
value = data.gitlab_project.this.id
25+
}
26+
27+
output "gitlab_root_namespace_id" {
28+
description = "The ID of the root namespace of the Gitlab Agents project."
29+
value = data.gitlab_group.root_namespace.group_id
30+
}

0 commit comments

Comments
 (0)