-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.tf
35 lines (31 loc) · 1.18 KB
/
template.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
resource "github_repository" "repo_template" {
name = "repo-template"
description = "This is a repo template for new repositories"
visibility = "private"
is_template = true
auto_init = true
}
resource "github_branch_default" "repo_template" {
repository = github_repository.repo_template.name
branch = "main"
}
resource "github_repository_file" "repo_template_pr" {
repository = github_repository.repo_template.name
branch = "main"
file = ".github/pull_request_template.md"
content = file("template/.github/pull_request_template.md")
commit_message = "Managed by Terraform"
commit_author = "Terraform"
commit_email = "terraform@nairalink.com"
overwrite_on_create = true
}
resource "github_repository_file" "repo_template_codeowners" {
repository = github_repository.repo_template.name
branch = "main"
file = ".github/CODEOWNERS"
content = file("template/.github/CODEOWNERS")
commit_message = "Managed by Terraform"
commit_author = "Terraform"
commit_email = "terraform@nairalink.com"
overwrite_on_create = true
}