From 81cc8bfcd7bad157bbdc6cca053937acc2751238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Fri, 19 Apr 2024 14:02:07 +0200 Subject: [PATCH] fix --- share/gitea-tekton-org/gitea_hook.tf | 34 +++++++++++++++------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/share/gitea-tekton-org/gitea_hook.tf b/share/gitea-tekton-org/gitea_hook.tf index d98d5ae..4b31a7e 100644 --- a/share/gitea-tekton-org/gitea_hook.tf +++ b/share/gitea-tekton-org/gitea_hook.tf @@ -20,19 +20,21 @@ provider "restapi" { id_attribute = "id" } -# resource "restapi_object" "gitea_org_hook" { -# path = "/orgs/${var.organization}/hooks" -# data = jsonencode({ -# type = "gitea" -# active = true -# branch_filter = "*" -# events = [ -# "create", -# "push" -# ], -# config = { -# url = "" -# content_type = "application/json" -# } -# }) -# } +resource "restapi_object" "gitea_org_hook" { + path = "/orgs/${var.organization}/hooks" + data = jsonencode({ + type = "gitea" + active = true + branch_filter = "*" + authorization_header = "" + events = [ + "create", + "push", + "repository" + ] + config = { + url = "http://el-${var.instance}-${var.component}.${var.namespace}.svc:8080" + content_type = "json" + } + }) +}