|
| 1 | +--- |
| 2 | +layout: "github" |
| 3 | +page_title: "GitHub: github_organization_security_configuration" |
| 4 | +description: |- |
| 5 | + Manages a code security configuration for a GitHub Organization. |
| 6 | +--- |
| 7 | + |
| 8 | +# github_organization_security_configuration |
| 9 | + |
| 10 | +This resource allows you to create and manage code security configurations for a GitHub Organization. |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```hcl |
| 15 | +resource "github_organization_security_configuration" "default" { |
| 16 | + name = "default-config" |
| 17 | + description = "Default security configuration" |
| 18 | + advanced_security = "enabled" |
| 19 | + dependency_graph = "enabled" |
| 20 | + dependabot_alerts = "enabled" |
| 21 | + dependabot_security_updates = "enabled" |
| 22 | + code_scanning_default_setup = "enabled" |
| 23 | + secret_scanning = "enabled" |
| 24 | + secret_scanning_push_protection = "enabled" |
| 25 | + private_vulnerability_reporting = "enabled" |
| 26 | + enforcement = "enforced" |
| 27 | +} |
| 28 | +``` |
| 29 | + |
| 30 | +## Argument Reference |
| 31 | + |
| 32 | +The following arguments are supported: |
| 33 | + |
| 34 | +* `name` - (Required) The name of the code security configuration. |
| 35 | +* `description` - (Optional) A description of the code security configuration. |
| 36 | +* `advanced_security` - (Optional) The advanced security configuration. Can be one of `enabled`, `disabled`. |
| 37 | +* `dependency_graph` - (Optional) The dependency graph configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 38 | +* `dependency_graph_autosubmit_action` - (Optional) The dependency graph autosubmit action configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 39 | +* `dependency_graph_autosubmit_action_options` - (Optional) The dependency graph autosubmit action options. See [Dependency Graph Autosubmit Action Options](#dependency-graph-autosubmit-action-options) below for details. |
| 40 | +* `dependabot_alerts` - (Optional) The dependabot alerts configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 41 | +* `dependabot_security_updates` - (Optional) The dependabot security updates configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 42 | +* `code_scanning_default_setup` - (Optional) The code scanning default setup configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 43 | +* `code_scanning_default_setup_options` - (Optional) The code scanning default setup options. See [Code Scanning Default Setup Options](#code-scanning-default-setup-options) below for details. |
| 44 | +* `code_scanning_delegated_alert_dismissal` - (Optional) The code scanning delegated alert dismissal configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 45 | +* `code_scanning_options` - (Optional) The code scanning options. See [Code Scanning Options](#code-scanning-options) below for details. |
| 46 | +* `code_security` - (Optional) The code security configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 47 | +* `secret_scanning` - (Optional) The secret scanning configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 48 | +* `secret_scanning_push_protection` - (Optional) The secret scanning push protection configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 49 | +* `secret_scanning_delegated_bypass` - (Optional) The secret scanning delegated bypass configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 50 | +* `secret_scanning_delegated_bypass_options` - (Optional) The secret scanning delegated bypass options. See [Secret Scanning Delegated Bypass Options](#secret-scanning-delegated-bypass-options) below for details. |
| 51 | +* `secret_scanning_validity_checks` - (Optional) The secret scanning validity checks configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 52 | +* `secret_scanning_non_provider_patterns` - (Optional) The secret scanning non provider patterns configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 53 | +* `secret_scanning_generic_secrets` - (Optional) The secret scanning generic secrets configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 54 | +* `secret_scanning_delegated_alert_dismissal` - (Optional) The secret scanning delegated alert dismissal configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 55 | +* `secret_protection` - (Optional) The secret protection configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 56 | +* `private_vulnerability_reporting` - (Optional) The private vulnerability reporting configuration. Can be one of `enabled`, `disabled`, `not_set`. |
| 57 | +* `enforcement` - (Optional) The enforcement configuration. Can be one of `enforced`, `unenforced`. |
| 58 | + |
| 59 | +## Attributes Reference |
| 60 | + |
| 61 | +* `configuration_id` - The numeric ID of the code security configuration. |
| 62 | +* `target_type` - The target type of the code security configuration. |
| 63 | + |
| 64 | +### Dependency Graph Autosubmit Action Options |
| 65 | + |
| 66 | +The `dependency_graph_autosubmit_action_options` block supports: |
| 67 | + |
| 68 | +* `labeled_runners` - (Optional) Whether to use labeled runners for the dependency graph autosubmit action. |
| 69 | + |
| 70 | +### Code Scanning Default Setup Options |
| 71 | + |
| 72 | +The `code_scanning_default_setup_options` block supports: |
| 73 | + |
| 74 | +* `runner_type` - (Optional) The type of runner to use for code scanning default setup. Can be one of `standard`, `labeled`. |
| 75 | +* `runner_label` - (Optional) The label of the runner to use for code scanning default setup. |
| 76 | + |
| 77 | +### Code Scanning Options |
| 78 | + |
| 79 | +The `code_scanning_options` block supports: |
| 80 | + |
| 81 | +* `allow_advanced` - (Optional) Whether to allow advanced security for code scanning. |
| 82 | + |
| 83 | +### Secret Scanning Delegated Bypass Options |
| 84 | + |
| 85 | +The `secret_scanning_delegated_bypass_options` block supports: |
| 86 | + |
| 87 | +* `reviewers` - (Optional) The bypass reviewers. Each entry supports: |
| 88 | + * `reviewer_id` - (Required) The ID of the bypass reviewer (team or role ID). |
| 89 | + * `reviewer_type` - (Required) The type of the bypass reviewer. Can be one of `Team`, `Role`. |
| 90 | + |
| 91 | +## Import |
| 92 | + |
| 93 | +GitHub Organization Code Security Configurations can be imported using the organization name and the configuration ID separated by a colon, e.g. |
| 94 | + |
| 95 | +```text |
| 96 | +$ terraform import github_organization_security_configuration.example my-org:123 |
| 97 | +``` |
0 commit comments