-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
135 lines (113 loc) · 2.81 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
resource "github_repository" "repository" {
name = var.repository
visibility = "public"
is_template = false
has_issues = true
has_discussions = false
has_downloads = false
has_projects = false
has_wiki = false
delete_branch_on_merge = true
web_commit_signoff_required = true
vulnerability_alerts = true
allow_update_branch = true
allow_auto_merge = true
security_and_analysis {
secret_scanning {
status = "enabled"
}
secret_scanning_push_protection {
status = "enabled"
}
}
template {
owner = "juliendoutre"
repository = "template"
include_all_branches = false
}
lifecycle {
ignore_changes = [
description,
homepage_url,
template,
]
}
}
resource "github_actions_repository_permissions" "actions_permissions" {
repository = github_repository.repository.name
enabled = true
allowed_actions = "selected"
allowed_actions_config {
github_owned_allowed = true
verified_allowed = true
patterns_allowed = [
"golangci/golangci-lint-action@*",
"hadolint/hadolint-action@*",
]
}
}
resource "github_repository_dependabot_security_updates" "dependabot_security_updates" {
repository = github_repository.repository.name
enabled = true
}
resource "github_repository_ruleset" "default" {
name = "default"
repository = github_repository.repository.name
target = "branch"
enforcement = "active"
bypass_actors {
actor_id = 5
actor_type = "RepositoryRole"
bypass_mode = "always"
}
conditions {
ref_name {
exclude = []
include = [
"~DEFAULT_BRANCH",
]
}
}
rules {
creation = true
deletion = true
non_fast_forward = true
required_linear_history = true
required_signatures = true
pull_request {
dismiss_stale_reviews_on_push = true
require_code_owner_review = true
require_last_push_approval = true
required_approving_review_count = 1
required_review_thread_resolution = true
}
}
}
resource "github_repository_ruleset" "releases" {
name = "releases"
repository = github_repository.repository.name
target = "tag"
enforcement = "active"
bypass_actors {
actor_id = 5
actor_type = "RepositoryRole"
bypass_mode = "always"
}
conditions {
ref_name {
exclude = []
include = [
"~ALL",
]
}
}
rules {
creation = true
deletion = true
non_fast_forward = true
required_linear_history = true
required_signatures = true
update = true
update_allows_fetch_and_merge = false
}
}