forked from devopshobbies/terraform-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
30 lines (24 loc) · 949 Bytes
/
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
# Resources
# This resource allows you to create and manage repositories within your GitHub organization or personal account.
resource "github_repository" "my-new-repo" {
name = "my-new-repo"
description = "My new repo description"
auto_init = true
visibility = "public"
}
# This resource allows you to create and manage files within a GitHub repository.
resource "github_repository_file" "my-new-repo" {
repository = "my-new-repo"
branch = "main"
file = ".gitignore"
content = "**/*.tfstate"
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}
# This resource allows you to create and manage branches within your repository.
resource "github_branch" "development" {
repository = "my-new-repo"
branch = "new-branch"
}