-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-config.tf
More file actions
36 lines (30 loc) · 988 Bytes
/
github-config.tf
File metadata and controls
36 lines (30 loc) · 988 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
resource "github_repository" "github_config" {
name = "github-config"
description = "Manage GitHub configuration for NorthOps"
auto_init = true
allow_merge_commit = false
delete_branch_on_merge = true
has_issues = true
topics = local.common_topics
lifecycle {
prevent_destroy = true
}
}
resource "github_branch_protection" "github_config_main" {
branch = github_repository.github_config.default_branch
repository = github_repository.github_config.name
enforce_admins = false
required_status_checks {
strict = true
}
required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
}
}
resource "github_issue_label" "github_config" {
for_each = { for common_label in local.common_labels : common_label.name => common_label }
color = each.value.colour
name = each.value.name
repository = github_repository.github_config.name
}