2022-06-25 21:36:24 +00:00
|
|
|
resource "gitea_org" "test_org" {
|
|
|
|
name = "test-org"
|
|
|
|
}
|
|
|
|
|
2022-06-25 22:18:20 +00:00
|
|
|
resource "gitea_user" "test" {
|
|
|
|
username = "test"
|
|
|
|
login_name = "test"
|
|
|
|
password = "Geheim1!"
|
|
|
|
email = "test@user.dev"
|
|
|
|
must_change_password = false
|
|
|
|
admin = true
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-25 21:36:24 +00:00
|
|
|
resource "gitea_team" "test_team" {
|
2022-06-25 22:18:20 +00:00
|
|
|
name = "Devs"
|
2022-06-25 21:36:24 +00:00
|
|
|
organisation = gitea_org.test_org.name
|
2022-06-25 22:18:20 +00:00
|
|
|
description = "Devs of Test Org"
|
|
|
|
permission = "write"
|
|
|
|
members = [gitea_user.test.username]
|
|
|
|
}
|
2023-05-15 03:22:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
resource "gitea_repository" "test" {
|
|
|
|
username = gitea_org.test_org.name
|
|
|
|
name = "test"
|
|
|
|
private = true
|
|
|
|
issue_labels = "Default"
|
|
|
|
license = "MIT"
|
|
|
|
gitignores = "Go"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "gitea_team" "test_team_restricted" {
|
|
|
|
name = "Restricted Devs"
|
|
|
|
organisation = gitea_org.test_org.name
|
|
|
|
description = "Restricted Devs of Test Org"
|
|
|
|
permission = "write"
|
|
|
|
members = [gitea_user.test.username]
|
|
|
|
include_all_repositories = false
|
|
|
|
repositories = [gitea_repository.test.name]
|
|
|
|
}
|