@@ -18,6 +18,7 @@ A [Terraform] module for creating a public or private repository on [Github].
1818 - [ Resources] ( #resources )
1919 - [ Inputs] ( #inputs )
2020 - [ Outputs] ( #outputs )
21+ - [ Security And Analysis Configuration] ( #security-and-analysis-configuration )
2122 - [ External Documentation] ( #external-documentation )
2223 - [ Terraform Github Provider Documentation] ( #terraform-github-provider-documentation )
2324 - [ Module Versioning] ( #module-versioning )
@@ -178,6 +179,7 @@ See [variables.tf] and [examples/] for details and use-cases.
178179| <a name =" input_push_team_ids " ></a > [ push\_ team\_ ids] ( #input\_ push\_ team\_ ids ) | (Optional) A list of teams (by id) to grant push (read-write) permission to. | ` list(string) ` | ` [] ` | no |
179180| <a name =" input_push_teams " ></a > [ push\_ teams] ( #input\_ push\_ teams ) | (Optional) A list of teams (by name/slug) to grant push (read-write) permission to. | ` list(string) ` | ` [] ` | no |
180181| <a name="input_rulesets"></a> [rulesets](#input\_rulesets) | (Optional) A list of branch rulesets to apply to the repository. Default is [].<br/><br/>It is very likely removal of any section will require setting it to an empty list/map.<br/>This is due to limitations in the API whereby components are not destroyed upon removal. | <pre>list(<br/> object({<br/> enforcement = string<br/> name = string<br/> target = string<br/><br/> rules = list(<br/> object({<br/> creation = optional(bool)<br/> deletion = optional(bool)<br/> non_fast_forward = optional(bool)<br/> required_signatures = optional(bool)<br/> required_linear_history = optional(bool)<br/> update = optional(bool)<br/> update_allows_fetch_and_merge = optional(bool)<br/><br/> branch_name_pattern = optional(<br/> object({<br/> operator = string<br/> pattern = string<br/> name = optional(string)<br/> negate = optional(bool)<br/> })<br/> )<br/><br/> commit_author_email_pattern = optional(<br/> object({<br/> operator = string<br/> pattern = string<br/> name = optional(string)<br/> negate = optional(bool)<br/> })<br/> )<br/><br/> commit_message_pattern = optional(<br/> object({<br/> operator = string<br/> pattern = string<br/> name = optional(string)<br/> negate = optional(bool)<br/> })<br/> )<br/><br/> committer_email_pattern = optional(<br/> object({<br/> operator = string<br/> pattern = string<br/> name = optional(string)<br/> negate = optional(bool)<br/> })<br/> )<br/><br/> tag_name_pattern = optional(<br/> object({<br/> operator = string<br/> pattern = string<br/> name = optional(string)<br/> negate = optional(bool)<br/> })<br/> )<br/><br/> required_status_checks = optional(<br/> object({<br/> strict_required_status_checks_policy = optional(bool)<br/> do_not_enforce_on_create = optional(bool)<br/> required_check = list(<br/> object({<br/> context = string<br/> integration_id = optional(number)<br/> })<br/> )<br/> })<br/> )<br/><br/> pull_request = optional(<br/> object({<br/> dismiss_stale_reviews_on_push = optional(bool)<br/> require_code_owner_review = optional(bool)<br/> require_last_push_approval = optional(bool)<br/> required_approving_review_count = optional(number)<br/> required_review_thread_resolution = optional(bool)<br/> })<br/> )<br/><br/> required_workflows = optional(<br/> object({<br/> required_workflow = list(<br/> object({<br/> repository_id = number<br/> ref = string<br/> path = string<br/> })<br/> )<br/> })<br/> )<br/><br/> required_deployments = optional(<br/> object({<br/> required_deployment_environments = list(string)<br/> })<br/> )<br/><br/> required_code_scanning = optional(<br/> object({<br/> required_code_scanning_tool = list(<br/> object({<br/> tool = string<br/> alerts_threshold = string<br/> security_alerts_threshold = string<br/> })<br/> )<br/> })<br/> )<br/><br/> merge_queue = optional(<br/> object({<br/> check_response_timeout_minutes = optional(number)<br/> grouping_strategy = optional(string)<br/> max_entries_to_build = optional(number)<br/> max_entries_to_merge = optional(number)<br/> merge_method = optional(string)<br/> min_entries_to_merge = optional(number)<br/> min_entries_to_merge_wait_minutes = optional(number)<br/> })<br/> )<br/> })<br/> )<br/><br/> bypass_actors = optional(<br/> list(<br/> object({<br/> actor_id = optional(number)<br/> actor_type = string<br/> bypass_mode = optional(string)<br/> })<br/> )<br/> )<br/><br/> conditions = optional(<br/> object({<br/> ref_name = object({<br/> include = list(string)<br/> exclude = list(string)<br/> })<br/> })<br/> )<br/> })<br/> )</pre> | `[]` | no |
182+ | <a name =" input_security_and_analysis " ></a > [ security\_ and\_ analysis] ( #input\_ security\_ and\_ analysis ) | (Optional) Security and analysis configuration block | <pre >object({<br /> advanced_security = optional(string, "disabled")<br /> secret_scanning = optional(string, "disabled")<br /> secret_scanning_push_protection = optional(string, "disabled")<br /> })</pre > | ` {} ` | no |
181183| <a name =" input_squash_merge_commit_message " ></a > [ squash\_ merge\_ commit\_ message] ( #input\_ squash\_ merge\_ commit\_ message ) | (Optional) Can be ` PR_BODY ` , ` COMMIT_MESSAGES ` , or ` BLANK ` for a default squash merge commit message. | ` string ` | ` "COMMIT_MESSAGES" ` | no |
182184| <a name =" input_squash_merge_commit_title " ></a > [ squash\_ merge\_ commit\_ title] ( #input\_ squash\_ merge\_ commit\_ title ) | (Optional) Can be ` PR_BODY ` , ` COMMIT_MESSAGES ` , or ` BLANK ` for a default squash merge commit message. | ` string ` | ` "COMMIT_OR_PR_TITLE" ` | no |
183185| <a name =" input_template " ></a > [ template] ( #input\_ template ) | (Optional) Template repository to use. (Default: {}) | <pre >object({<br /> owner = string<br /> repository = string<br /> })</pre > | ` null ` | no |
@@ -210,6 +212,35 @@ See [variables.tf] and [examples/] for details and use-cases.
210212| <a name =" output_webhooks " ></a > [ webhooks] ( #output\_ webhooks ) | All attributes and arguments as returned by the github\_ repository\_ webhook resource. |
211213<!-- END_TF_DOCS -->
212214
215+ ### Security And Analysis Configuration
216+
217+ - [ ** ` security_and_analysis ` ** ] ( #var-security_and_analysis ) : * (Optional ` object(security_and_analysis) ` )* <a name =" var-security_and_analysis " ></a >
218+
219+ (Optional) The repository's [ security and analysis] ( https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository ) configuration.
220+ See [ Security and Analysis Configuration] ( #security-and-analysis-configuration ) below for details.
221+
222+ Default is ` {} ` .
223+
224+ The ` security_and_analysis ` object accepts the following attributes:
225+
226+ - [ ** ` advanced_security ` ** ] ( #attr-security_and_analysis-advanced_security ) : * (** Required** ` string ` )* <a name =" attr-security_and_analysis-advanced_security " ></a >
227+
228+ The advanced security configuration for the repository. See [ Advanced Security Configuration] ( #advanced-security-configuration ) below for details.
229+
230+ Default is ` "disabled" ` .
231+
232+ - [ ** ` secret_scanning ` ** ] ( #attr-security_and_analysis-secret_scanning ) : * (** Required** ` string ` )* <a name =" attr-security_and_analysis-secret_scanning " ></a >
233+
234+ The secret scanning configuration for the repository. See [ Secret Scanning Configuration] ( #secret-scanning-configuration ) below for details.
235+
236+ Default is ` "disabled" ` .
237+
238+ - [ ** ` secret_scanning_push_protection ` ** ] ( #attr-security_and_analysis-secret_scanning_push_protection ) : * (** Required** ` string ` )* <a name =" attr-security_and_analysis-secret_scanning_push_protection " ></a >
239+
240+ The secret scanning push protection configuration for the repository. See [ Secret Scanning Push Protection Configuration] ( #secret-scanning-push-protection-configuration ) below for details.
241+
242+ Default is ` "disabled" ` .
243+
213244## External Documentation
214245
215246### Terraform Github Provider Documentation
0 commit comments