Jörg Markert a07bd291f5 feat: add branch_protection resource (#72)
added terraform tests for the resource

Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/72
Co-authored-by: Jörg Markert <joerg.markert@gmail.com>
Co-committed-by: Jörg Markert <joerg.markert@gmail.com>
2024-09-11 17:32:48 +00:00

15 lines
373 B
HCL

resource "gitea_repository" "repo" {
username = var.username
name = var.name
auto_init = false
}
resource "gitea_repository_branch_protection" "main" {
username = gitea_repository.repo.username
name = gitea_repository.repo.name
rule_name = "main"
enable_push = true
status_check_patterns = var.branch_protection_patterns
}