From 2451b7af085f9982e4af421c76f24ab3b018ce85 Mon Sep 17 00:00:00 2001
From: Daniele Monti <62102073+Monska85@users.noreply.github.com>
Date: Wed, 10 Jul 2024 17:00:24 +0200
Subject: [PATCH] feat: add gitlab_agents_project_id and
gitlab_root_namespace_id outputs
---
CHANGELOG.md | 8 ++++++++
README.md | 2 ++
outputs.tf | 10 ++++++++++
3 files changed, 20 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8dc5c96..f8e9b9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,14 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+## [0.4.0] - 2024-07-10
+
+[Compare with previous version](https://github.com/sparkfabrik/terraform-gitlab-kubernetes-gitlab-agent/compare/0.3.0...0.4.0)
+
+### Added
+
+- Add the `gitlab_agents_project_id` and `gitlab_root_namespace_id` outputs to allow the retrieval of the Gitlab project and root namespace IDs.
+
## [0.3.0] - 2024-07-10
[Compare with previous version](https://github.com/sparkfabrik/terraform-gitlab-kubernetes-gitlab-agent/compare/0.2.0...0.3.0)
diff --git a/README.md b/README.md
index 1fc346c..ad25424 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,8 @@ provider "gitlab" {
|------|-------------|
| [gitlab\_agent\_kubernetes\_context\_variables](#output\_gitlab\_agent\_kubernetes\_context\_variables) | The Gitlab Agent information to be used to configure the Kubernetes context. |
| [gitlab\_agent\_token](#output\_gitlab\_agent\_token) | The token of the Gitlab Agent. |
+| [gitlab\_agents\_project\_id](#output\_gitlab\_agents\_project\_id) | The ID of the Gitlab project where the Gitlab Agents are installed. |
+| [gitlab\_root\_namespace\_id](#output\_gitlab\_root\_namespace\_id) | The ID of the root namespace of the Gitlab Agents project. |
| [k8s\_common\_labels](#output\_k8s\_common\_labels) | Common labels to apply to the kubernetes resources. |
| [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. |
diff --git a/outputs.tf b/outputs.tf
index 1b1ddc2..bf12857 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -18,3 +18,13 @@ output "gitlab_agent_kubernetes_context_variables" {
value = local.gitlab_agent_kubernetes_context_variables
description = "The Gitlab Agent information to be used to configure the Kubernetes context."
}
+
+output "gitlab_agents_project_id" {
+ description = "The ID of the Gitlab project where the Gitlab Agents are installed."
+ value = data.gitlab_project.this.id
+}
+
+output "gitlab_root_namespace_id" {
+ description = "The ID of the root namespace of the Gitlab Agents project."
+ value = data.gitlab_group.root_namespace.group_id
+}