-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
109 lines (87 loc) · 2.66 KB
/
main.tf
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 5.0"
}
}
}
# Configure the GitHub Provider
provider "github" {
owner = "CounterStrikeSharp"
token = var.GH_TOKEN
}
resource "github_repository" "infrastructure" {
name = "infrastructure"
visibility = "public"
allow_auto_merge = true
allow_merge_commit = false
allow_rebase_merge = false
delete_branch_on_merge = true
description = "Terraform for CounterStrikeSharp related resources"
has_issues = true
squash_merge_commit_message = "BLANK"
squash_merge_commit_title = "PR_TITLE"
}
resource "github_branch_protection" "infrastructure" {
repository_id = github_repository.infrastructure.id
pattern = "main"
force_push_bypassers = ["/roflmuffin"]
push_restrictions = []
required_pull_request_reviews {
dismiss_stale_reviews = true
dismissal_restrictions = []
pull_request_bypassers = []
require_code_owner_reviews = true
require_last_push_approval = false
required_approving_review_count = 1
restrict_dismissals = false
}
}
resource "github_actions_secret" "gh_token" {
repository = "infrastructure"
secret_name = "GH_TOKEN"
}
resource "github_actions_secret" "private_key" {
repository = "infrastructure"
secret_name = "PRIVATE_KEY"
}
resource "github_repository" "docs" {
name = "docs"
visibility = "public"
allow_auto_merge = true
allow_merge_commit = false
allow_rebase_merge = false
delete_branch_on_merge = true
description = "Docs Site for CounterStrikeSharp"
has_issues = true
squash_merge_commit_message = "BLANK"
squash_merge_commit_title = "PR_TITLE"
}
resource "github_branch_protection" "docs" {
repository_id = github_repository.docs.id
pattern = "main"
force_push_bypassers = ["/roflmuffin"]
push_restrictions = []
required_pull_request_reviews {
dismiss_stale_reviews = true
dismissal_restrictions = []
pull_request_bypassers = []
require_code_owner_reviews = true
require_last_push_approval = false
required_approving_review_count = 1
restrict_dismissals = false
}
}
resource "github_repository" "gdc" {
name = "GamedataChecker"
visibility = "public"
allow_auto_merge = true
allow_merge_commit = false
allow_rebase_merge = false
delete_branch_on_merge = true
description = "Gamedata Checker for CounterStrikeSharp"
has_issues = true
squash_merge_commit_message = "BLANK"
squash_merge_commit_title = "PR_TITLE"
}