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>
This commit is contained in:

committed by
techknowlogick

parent
aa450c1855
commit
a07bd291f5
14
examples/resources/gitea_repo_branch_protection/resource.tf
Normal file
14
examples/resources/gitea_repo_branch_protection/resource.tf
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user