From 15ebbedef47a4ca5b702cfe00aad00b314df7b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Sun, 21 Apr 2024 16:47:05 +0200 Subject: [PATCH] fix --- share/gitea-tekton-org/gitea_hook.tf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/gitea-tekton-org/gitea_hook.tf b/share/gitea-tekton-org/gitea_hook.tf index 473213b..6b83b13 100644 --- a/share/gitea-tekton-org/gitea_hook.tf +++ b/share/gitea-tekton-org/gitea_hook.tf @@ -47,9 +47,14 @@ resource "restapi_object" "gitea_org_hook" { resource "restapi_object" "ci-token" { path = "/users/org-${var.organization}-ci/tokens" create_method = "POST" + read_path = "/users/org-${var.organization}-ci/tokens" + read_search = { + search_key = "name" + search_value = "tekton-${var.organization}" + } id_attribute = "name" data = jsonencode({ - name = "tekton-${var.organization}-${var.instance}-${var.component}-${var.namespace}" + name = "tekton-${var.organization}" scopes = [ "write:repository" ]