Skip to content

Commit 1372e93

Browse files
authored
Support terraform-provider-github v4 (#168)
1 parent e85255a commit 1372e93

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

terraform/github/branch_protection.tf

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "github_branch_protection" "hackathon_master" {
2-
repository = "hackathon"
3-
branch = "master"
2+
repository_id = "hackathon"
3+
pattern = "master"
44
enforce_admins = false
55

66
required_status_checks {}
@@ -9,33 +9,31 @@ resource "github_branch_protection" "hackathon_master" {
99
dismiss_stale_reviews = false
1010
}
1111

12-
restrictions {
13-
teams = ["imas_hack"]
14-
}
12+
push_restrictions = [
13+
"imas_hack"
14+
]
1515
}
1616

1717
resource "github_branch_protection" "mastodon_imastodon" {
18-
repository = "mastodon"
19-
branch = "imastodon"
18+
repository_id = "mastodon"
19+
pattern = "imastodon"
2020
enforce_admins = false
2121

2222
required_status_checks {
2323
strict = false
2424
contexts = [
25-
"ci/circleci: test-ruby2.6",
25+
"ci/circleci: test-ruby2.6",
2626
]
2727
}
2828

2929
required_pull_request_reviews {
3030
dismiss_stale_reviews = false
3131
}
32-
33-
restrictions {}
3432
}
3533

3634
resource "github_branch_protection" "imasparql_master" {
37-
repository = "imasparql"
38-
branch = "master"
35+
repository_id = "imasparql"
36+
pattern = "master"
3937
enforce_admins = false
4038

4139
required_status_checks {
@@ -48,6 +46,4 @@ resource "github_branch_protection" "imasparql_master" {
4846
require_code_owner_reviews = true
4947
required_approving_review_count = 1
5048
}
51-
52-
restrictions {}
5349
}

0 commit comments

Comments
 (0)