You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Copy file name to clipboardExpand all lines: README.tfdoc.hcl
+3-128Lines changed: 3 additions & 128 deletions
Original file line number
Diff line number
Diff line change
@@ -622,7 +622,7 @@ section {
622
622
title="Branch Protections Configuration"
623
623
624
624
variable"branch_protections_v3" {
625
-
type=list(branch_protection)
625
+
type=list(branch_protection_v3)
626
626
default=[]
627
627
description=<<-END
628
628
This resource allows you to configure branch protection for repositories in your organization.
@@ -765,137 +765,12 @@ section {
765
765
}
766
766
767
767
variable"branch_protections" {
768
-
type=list(branch_protection)
768
+
type=list(branch_protection_v3)
769
769
default=[]
770
770
description=<<-END
771
771
**_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.
773
773
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.
0 commit comments