-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
37 lines (32 loc) · 790 Bytes
/
main.tf
File metadata and controls
37 lines (32 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
terraform {
required_providers {
gitlab = {
source = "gitlabhq/gitlab"
version = "18.9.0"
}
}
}
data "gitlab_project_variable" "runner_support_token" {
project = "code0-tech/secret-manager"
key = "GITHUB_RUNNER_SUPPORT_TOKEN"
}
resource "gitlab_project_hook" "runner_support" {
project = var.project
url = "https://api.github.com/repos/code0-tech/monoceros/actions/workflows/${var.runner_type}.yml/dispatches"
push_events = false
pipeline_events = true
custom_webhook_template = jsonencode(
{
"ref": "main",
"inputs": {
"project": "{{project.id}}"
}
}
)
custom_headers = [
{
key = "Authorization"
value = "Bearer ${data.gitlab_project_variable.runner_support_token.value}"
}
]
}