Skip to content

Commit 164c4ec

Browse files
committed
chore: update terradoc
1 parent deee1cb commit 164c4ec

File tree

2 files changed

+7
-238
lines changed

2 files changed

+7
-238
lines changed

README.md

Lines changed: 4 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,15 @@ This is due to some terraform limitation and we will update the module once terr
483483

484484
#### Branch Protections Configuration
485485

486-
- [**`branch_protections_v3`**](#var-branch_protections_v3): *(Optional `list(branch_protection)`)*<a name="var-branch_protections_v3"></a>
486+
- [**`branch_protections_v3`**](#var-branch_protections_v3): *(Optional `list(branch_protection_v3)`)*<a name="var-branch_protections_v3"></a>
487487

488488
This resource allows you to configure branch protection for repositories in your organization.
489489
When applied, the branch will be protected from forced pushes and deletion.
490490
Additional constraints, such as required status checks or restrictions on users and teams, can also be configured.
491491

492492
Default is `[]`.
493493

494-
Each `branch_protection` object in the list accepts the following attributes:
494+
Each `branch_protection_v3` object in the list accepts the following attributes:
495495

496496
- [**`branch`**](#attr-branch_protections_v3-branch): *(**Required** `string`)*<a name="attr-branch_protections_v3-branch"></a>
497497

@@ -598,119 +598,13 @@ This is due to some terraform limitation and we will update the module once terr
598598

599599
Default is `[]`.
600600

601-
- [**`branch_protections`**](#var-branch_protections): *(Optional `list(branch_protection)`)*<a name="var-branch_protections"></a>
601+
- [**`branch_protections`**](#var-branch_protections): *(Optional `list(branch_protection_v3)`)*<a name="var-branch_protections"></a>
602602

603603
**_DEPRECATED_** To ensure compatibility with future versions of this module, please use `branch_protections_v3`.
604-
This argument is ignored if `branch_protections_v3` is used.
604+
This argument is ignored if `branch_protections_v3` is used. Please see `branch_protections_v3` for supported attributes.
605605

606606
Default is `[]`.
607607

608-
Each `branch_protection` object in the list accepts the following attributes:
609-
610-
- [**`branch`**](#attr-branch_protections-branch): *(**Required** `string`)*<a name="attr-branch_protections-branch"></a>
611-
612-
The Git branch to protect.
613-
614-
- [**`enforce_admins`**](#attr-branch_protections-enforce_admins): *(Optional `bool`)*<a name="attr-branch_protections-enforce_admins"></a>
615-
616-
Setting this to true enforces status checks for repository administrators.
617-
618-
Default is `false`.
619-
620-
- [**`require_conversation_resolution`**](#attr-branch_protections-require_conversation_resolution): *(Optional `bool`)*<a name="attr-branch_protections-require_conversation_resolution"></a>
621-
622-
Setting this to true requires all conversations to be resolved.
623-
624-
Default is `false`.
625-
626-
- [**`require_signed_commits`**](#attr-branch_protections-require_signed_commits): *(Optional `bool`)*<a name="attr-branch_protections-require_signed_commits"></a>
627-
628-
Setting this to true requires all commits to be signed with GPG.
629-
630-
Default is `false`.
631-
632-
- [**`required_status_checks`**](#attr-branch_protections-required_status_checks): *(Optional `object(required_status_checks)`)*<a name="attr-branch_protections-required_status_checks"></a>
633-
634-
Enforce restrictions for required status checks.
635-
See Required Status Checks below for details.
636-
637-
Default is `{}`.
638-
639-
The `required_status_checks` object accepts the following attributes:
640-
641-
- [**`strict`**](#attr-branch_protections-required_status_checks-strict): *(Optional `bool`)*<a name="attr-branch_protections-required_status_checks-strict"></a>
642-
643-
Require branches to be up to date before merging.
644-
Defaults is `false`.
645-
646-
- [**`contexts`**](#attr-branch_protections-required_status_checks-contexts): *(Optional `list(string)`)*<a name="attr-branch_protections-required_status_checks-contexts"></a>
647-
648-
The list of status checks to require in order to merge into this branch. If default is `[]` no status checks are required.
649-
650-
Default is `[]`.
651-
652-
- [**`required_pull_request_reviews`**](#attr-branch_protections-required_pull_request_reviews): *(Optional `object(required_pull_request_reviews)`)*<a name="attr-branch_protections-required_pull_request_reviews"></a>
653-
654-
Enforce restrictions for pull request reviews.
655-
656-
Default is `{}`.
657-
658-
The `required_pull_request_reviews` object accepts the following attributes:
659-
660-
- [**`dismiss_stale_reviews`**](#attr-branch_protections-required_pull_request_reviews-dismiss_stale_reviews): *(Optional `bool`)*<a name="attr-branch_protections-required_pull_request_reviews-dismiss_stale_reviews"></a>
661-
662-
Dismiss approved reviews automatically when a new commit is pushed.
663-
664-
Default is `true`.
665-
666-
- [**`dismissal_users`**](#attr-branch_protections-required_pull_request_reviews-dismissal_users): *(Optional `list(string)`)*<a name="attr-branch_protections-required_pull_request_reviews-dismissal_users"></a>
667-
668-
The list of user logins with dismissal access
669-
670-
Default is `[]`.
671-
672-
- [**`dismissal_teams`**](#attr-branch_protections-required_pull_request_reviews-dismissal_teams): *(Optional `list(string)`)*<a name="attr-branch_protections-required_pull_request_reviews-dismissal_teams"></a>
673-
674-
The list of team slugs with dismissal access.
675-
Always use slug of the team, not its name.
676-
Each team already has to have access to the repository.
677-
678-
Default is `[]`.
679-
680-
- [**`require_code_owner_reviews`**](#attr-branch_protections-required_pull_request_reviews-require_code_owner_reviews): *(Optional `bool`)*<a name="attr-branch_protections-required_pull_request_reviews-require_code_owner_reviews"></a>
681-
682-
Require an approved review in pull requests including files with a designated code owner.
683-
684-
Default is `false`.
685-
686-
- [**`restrictions`**](#attr-branch_protections-restrictions): *(Optional `object(restrictions)`)*<a name="attr-branch_protections-restrictions"></a>
687-
688-
Enforce restrictions for the users and teams that may push to the branch - only available for organization-owned repositories. See Restrictions below for details.
689-
690-
Default is `{}`.
691-
692-
The `restrictions` object accepts the following attributes:
693-
694-
- [**`users`**](#attr-branch_protections-restrictions-users): *(Optional `list(string)`)*<a name="attr-branch_protections-restrictions-users"></a>
695-
696-
The list of user logins with push access.
697-
698-
Default is `[]`.
699-
700-
- [**`teams`**](#attr-branch_protections-restrictions-teams): *(Optional `list(string)`)*<a name="attr-branch_protections-restrictions-teams"></a>
701-
702-
The list of team slugs with push access.
703-
Always use slug of the team, not its name.
704-
Each team already has to have access to the repository.
705-
706-
Default is `[]`.
707-
708-
- [**`apps`**](#attr-branch_protections-restrictions-apps): *(Optional `list(string)`)*<a name="attr-branch_protections-restrictions-apps"></a>
709-
710-
The list of app slugs with push access.
711-
712-
Default is `[]`.
713-
714608
#### Issue Labels Configuration
715609

716610
- [**`issue_labels`**](#var-issue_labels): *(Optional `list(issue_label)`)*<a name="var-issue_labels"></a>

README.tfdoc.hcl

Lines changed: 3 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ section {
622622
title = "Branch Protections Configuration"
623623

624624
variable "branch_protections_v3" {
625-
type = list(branch_protection)
625+
type = list(branch_protection_v3)
626626
default = []
627627
description = <<-END
628628
This resource allows you to configure branch protection for repositories in your organization.
@@ -765,137 +765,12 @@ section {
765765
}
766766

767767
variable "branch_protections" {
768-
type = list(branch_protection)
768+
type = list(branch_protection_v3)
769769
default = []
770770
description = <<-END
771771
**_DEPRECATED_** To ensure compatibility with future versions of this module, please use `branch_protections_v3`.
772-
This argument is ignored if `branch_protections_v3` is used.
772+
This argument is ignored if `branch_protections_v3` is used. Please see `branch_protections_v3` for supported attributes.
773773
END
774-
775-
attribute "branch" {
776-
required = true
777-
type = string
778-
description = <<-END
779-
The Git branch to protect.
780-
END
781-
}
782-
783-
attribute "enforce_admins" {
784-
type = bool
785-
default = false
786-
description = <<-END
787-
Setting this to true enforces status checks for repository administrators.
788-
END
789-
}
790-
791-
attribute "require_signed_commits" {
792-
type = bool
793-
default = false
794-
description = <<-END
795-
Setting this to true requires all commits to be signed with GPG.
796-
END
797-
}
798-
799-
attribute "required_status_checks" {
800-
type = object(required_status_checks)
801-
default = {}
802-
description = <<-END
803-
Enforce restrictions for required status checks.
804-
See Required Status Checks below for details.
805-
END
806-
807-
attribute "strict" {
808-
type = bool
809-
description = <<-END
810-
Require branches to be up to date before merging.
811-
Defaults is `false`.
812-
END
813-
}
814-
815-
attribute "contexts" {
816-
type = list(string)
817-
default = []
818-
description = <<-END
819-
The list of status checks to require in order to merge into this branch. If default is `[]` no status checks are required.
820-
END
821-
}
822-
}
823-
824-
attribute "required_pull_request_reviews" {
825-
type = object(required_pull_request_reviews)
826-
default = {}
827-
description = <<-END
828-
Enforce restrictions for pull request reviews.
829-
END
830-
831-
attribute "dismiss_stale_reviews" {
832-
type = bool
833-
default = true
834-
description = <<-END
835-
Dismiss approved reviews automatically when a new commit is pushed.
836-
END
837-
}
838-
839-
attribute "dismissal_users" {
840-
type = list(string)
841-
default = []
842-
description = <<-END
843-
The list of user logins with dismissal access
844-
END
845-
}
846-
847-
attribute "dismissal_teams" {
848-
type = list(string)
849-
default = []
850-
description = <<-END
851-
The list of team slugs with dismissal access.
852-
Always use slug of the team, not its name.
853-
Each team already has to have access to the repository.
854-
END
855-
}
856-
857-
attribute "require_code_owner_reviews" {
858-
type = bool
859-
default = false
860-
description = <<-END
861-
Require an approved review in pull requests including files with a designated code owner.
862-
END
863-
}
864-
}
865-
866-
attribute "restrictions" {
867-
type = object(restrictions)
868-
default = {}
869-
description = <<-END
870-
Enforce restrictions for the users and teams that may push to the branch - only available for organization-owned repositories. See Restrictions below for details.
871-
END
872-
873-
attribute "users" {
874-
type = list(string)
875-
default = []
876-
description = <<-END
877-
The list of user logins with push access.
878-
END
879-
}
880-
881-
attribute "teams" {
882-
type = list(string)
883-
default = []
884-
description = <<-END
885-
The list of team slugs with push access.
886-
Always use slug of the team, not its name.
887-
Each team already has to have access to the repository.
888-
END
889-
}
890-
891-
attribute "apps" {
892-
type = list(string)
893-
default = []
894-
description = <<-END
895-
The list of app slugs with push access.
896-
END
897-
}
898-
}
899774
}
900775
}
901776

0 commit comments

Comments
 (0)