Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
380 changes: 380 additions & 0 deletions docs/data-sources/enterprise_ruleset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,380 @@
---
page_title: "github_enterprise_ruleset (Data Source) - GitHub"
subcategory: ""
description: |-
Retrieves an existing GitHub enterprise ruleset by its ID.
---

# github_enterprise_ruleset (Data Source)

Retrieves an existing GitHub enterprise ruleset by its ID.

## Example Usage

```terraform
data "github_enterprise_ruleset" "example" {
enterprise_slug = "my-enterprise"
ruleset_id = 12345
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `enterprise_slug` (String) The slug of the enterprise the ruleset belongs to.
- `ruleset_id` (Number) GitHub ID for the ruleset.

### Read-Only

- `bypass_actors` (List of Object) The actors that can bypass the rules in this ruleset. (see [below for nested schema](#nestedatt--bypass_actors))
- `conditions` (List of Object) The organizations, repositories and refs the ruleset applies to. (see [below for nested schema](#nestedatt--conditions))
- `enforcement` (String) The enforcement level of the ruleset. One of `disabled`, `active` or `evaluate`.
- `etag` (String) An etag representing the ruleset for caching purposes.
- `id` (String) The ID of this resource.
- `name` (String) The name of the ruleset.
- `node_id` (String) GraphQL global node id for use with v4 API.
- `rules` (List of Object) Rules within the ruleset. (see [below for nested schema](#nestedatt--rules))
- `target` (String) The target of the ruleset. One of `branch`, `tag`, `push` or `repository`.

<a id="nestedatt--bypass_actors"></a>
### Nested Schema for `bypass_actors`

Read-Only:

- `actor_id` (Number)
- `actor_type` (String)
- `bypass_mode` (String)


<a id="nestedatt--conditions"></a>
### Nested Schema for `conditions`

Read-Only:

- `organization_id` (List of Number)
- `organization_name` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--organization_name))
- `organization_property` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--organization_property))
- `ref_name` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--ref_name))
- `repository_name` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--repository_name))
- `repository_property` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--repository_property))

<a id="nestedobjatt--conditions--organization_name"></a>
### Nested Schema for `conditions.organization_name`

Read-Only:

- `exclude` (List of String)
- `include` (List of String)


<a id="nestedobjatt--conditions--organization_property"></a>
### Nested Schema for `conditions.organization_property`

Read-Only:

- `exclude` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--organization_property--exclude))
- `include` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--organization_property--include))

<a id="nestedobjatt--conditions--organization_property--exclude"></a>
### Nested Schema for `conditions.organization_property.exclude`

Read-Only:

- `name` (String)
- `property_values` (List of String)


<a id="nestedobjatt--conditions--organization_property--include"></a>
### Nested Schema for `conditions.organization_property.include`

Read-Only:

- `name` (String)
- `property_values` (List of String)



<a id="nestedobjatt--conditions--ref_name"></a>
### Nested Schema for `conditions.ref_name`

Read-Only:

- `exclude` (List of String)
- `include` (List of String)


<a id="nestedobjatt--conditions--repository_name"></a>
### Nested Schema for `conditions.repository_name`

Read-Only:

- `exclude` (List of String)
- `include` (List of String)
- `protected` (Boolean)


<a id="nestedobjatt--conditions--repository_property"></a>
### Nested Schema for `conditions.repository_property`

Read-Only:

- `exclude` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--repository_property--exclude))
- `include` (List of Object) (see [below for nested schema](#nestedobjatt--conditions--repository_property--include))

<a id="nestedobjatt--conditions--repository_property--exclude"></a>
### Nested Schema for `conditions.repository_property.exclude`

Read-Only:

- `name` (String)
- `property_values` (List of String)
- `source` (String)


<a id="nestedobjatt--conditions--repository_property--include"></a>
### Nested Schema for `conditions.repository_property.include`

Read-Only:

- `name` (String)
- `property_values` (List of String)
- `source` (String)




<a id="nestedatt--rules"></a>
### Nested Schema for `rules`

Read-Only:

- `branch_name_pattern` (List of Object) (see [below for nested schema](#nestedobjatt--rules--branch_name_pattern))
- `commit_author_email_pattern` (List of Object) (see [below for nested schema](#nestedobjatt--rules--commit_author_email_pattern))
- `commit_message_pattern` (List of Object) (see [below for nested schema](#nestedobjatt--rules--commit_message_pattern))
- `committer_email_pattern` (List of Object) (see [below for nested schema](#nestedobjatt--rules--committer_email_pattern))
- `copilot_code_review` (List of Object) (see [below for nested schema](#nestedobjatt--rules--copilot_code_review))
- `creation` (Boolean)
- `deletion` (Boolean)
- `file_extension_restriction` (List of Object) (see [below for nested schema](#nestedobjatt--rules--file_extension_restriction))
- `file_path_restriction` (List of Object) (see [below for nested schema](#nestedobjatt--rules--file_path_restriction))
- `max_file_path_length` (List of Object) (see [below for nested schema](#nestedobjatt--rules--max_file_path_length))
- `max_file_size` (List of Object) (see [below for nested schema](#nestedobjatt--rules--max_file_size))
- `non_fast_forward` (Boolean)
- `pull_request` (List of Object) (see [below for nested schema](#nestedobjatt--rules--pull_request))
- `repository_create` (Boolean)
- `repository_delete` (Boolean)
- `repository_name` (List of Object) (see [below for nested schema](#nestedobjatt--rules--repository_name))
- `repository_transfer` (Boolean)
- `repository_visibility` (List of Object) (see [below for nested schema](#nestedobjatt--rules--repository_visibility))
- `required_code_scanning` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_code_scanning))
- `required_linear_history` (Boolean)
- `required_signatures` (Boolean)
- `required_status_checks` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_status_checks))
- `required_workflows` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_workflows))
- `tag_name_pattern` (List of Object) (see [below for nested schema](#nestedobjatt--rules--tag_name_pattern))
- `update` (Boolean)

<a id="nestedobjatt--rules--branch_name_pattern"></a>
### Nested Schema for `rules.branch_name_pattern`

Read-Only:

- `name` (String)
- `negate` (Boolean)
- `operator` (String)
- `pattern` (String)


<a id="nestedobjatt--rules--commit_author_email_pattern"></a>
### Nested Schema for `rules.commit_author_email_pattern`

Read-Only:

- `name` (String)
- `negate` (Boolean)
- `operator` (String)
- `pattern` (String)


<a id="nestedobjatt--rules--commit_message_pattern"></a>
### Nested Schema for `rules.commit_message_pattern`

Read-Only:

- `name` (String)
- `negate` (Boolean)
- `operator` (String)
- `pattern` (String)


<a id="nestedobjatt--rules--committer_email_pattern"></a>
### Nested Schema for `rules.committer_email_pattern`

Read-Only:

- `name` (String)
- `negate` (Boolean)
- `operator` (String)
- `pattern` (String)


<a id="nestedobjatt--rules--copilot_code_review"></a>
### Nested Schema for `rules.copilot_code_review`

Read-Only:

- `review_draft_pull_requests` (Boolean)
- `review_on_push` (Boolean)


<a id="nestedobjatt--rules--file_extension_restriction"></a>
### Nested Schema for `rules.file_extension_restriction`

Read-Only:

- `restricted_file_extensions` (List of String)


<a id="nestedobjatt--rules--file_path_restriction"></a>
### Nested Schema for `rules.file_path_restriction`

Read-Only:

- `restricted_file_paths` (List of String)


<a id="nestedobjatt--rules--max_file_path_length"></a>
### Nested Schema for `rules.max_file_path_length`

Read-Only:

- `max_file_path_length` (Number)


<a id="nestedobjatt--rules--max_file_size"></a>
### Nested Schema for `rules.max_file_size`

Read-Only:

- `max_file_size` (Number)


<a id="nestedobjatt--rules--pull_request"></a>
### Nested Schema for `rules.pull_request`

Read-Only:

- `allowed_merge_methods` (List of String)
- `dismiss_stale_reviews_on_push` (Boolean)
- `require_code_owner_review` (Boolean)
- `require_last_push_approval` (Boolean)
- `required_approving_review_count` (Number)
- `required_review_thread_resolution` (Boolean)
- `required_reviewers` (List of Object) (see [below for nested schema](#nestedobjatt--rules--pull_request--required_reviewers))

<a id="nestedobjatt--rules--pull_request--required_reviewers"></a>
### Nested Schema for `rules.pull_request.required_reviewers`

Read-Only:

- `file_patterns` (List of String)
- `minimum_approvals` (Number)
- `reviewer` (List of Object) (see [below for nested schema](#nestedobjatt--rules--pull_request--required_reviewers--reviewer))

<a id="nestedobjatt--rules--pull_request--required_reviewers--reviewer"></a>
### Nested Schema for `rules.pull_request.required_reviewers.reviewer`

Read-Only:

- `id` (Number)
- `type` (String)




<a id="nestedobjatt--rules--repository_name"></a>
### Nested Schema for `rules.repository_name`

Read-Only:

- `negate` (Boolean)
- `pattern` (String)


<a id="nestedobjatt--rules--repository_visibility"></a>
### Nested Schema for `rules.repository_visibility`

Read-Only:

- `internal` (Boolean)
- `private` (Boolean)
- `public` (Boolean)


<a id="nestedobjatt--rules--required_code_scanning"></a>
### Nested Schema for `rules.required_code_scanning`

Read-Only:

- `required_code_scanning_tool` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_code_scanning--required_code_scanning_tool))

<a id="nestedobjatt--rules--required_code_scanning--required_code_scanning_tool"></a>
### Nested Schema for `rules.required_code_scanning.required_code_scanning_tool`

Read-Only:

- `alerts_threshold` (String)
- `security_alerts_threshold` (String)
- `tool` (String)



<a id="nestedobjatt--rules--required_status_checks"></a>
### Nested Schema for `rules.required_status_checks`

Read-Only:

- `do_not_enforce_on_create` (Boolean)
- `required_check` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_status_checks--required_check))
- `strict_required_status_checks_policy` (Boolean)

<a id="nestedobjatt--rules--required_status_checks--required_check"></a>
### Nested Schema for `rules.required_status_checks.required_check`

Read-Only:

- `context` (String)
- `integration_id` (Number)



<a id="nestedobjatt--rules--required_workflows"></a>
### Nested Schema for `rules.required_workflows`

Read-Only:

- `do_not_enforce_on_create` (Boolean)
- `required_workflow` (List of Object) (see [below for nested schema](#nestedobjatt--rules--required_workflows--required_workflow))

<a id="nestedobjatt--rules--required_workflows--required_workflow"></a>
### Nested Schema for `rules.required_workflows.required_workflow`

Read-Only:

- `path` (String)
- `ref` (String)
- `repository_id` (Number)



<a id="nestedobjatt--rules--tag_name_pattern"></a>
### Nested Schema for `rules.tag_name_pattern`

Read-Only:

- `name` (String)
- `negate` (Boolean)
- `operator` (String)
- `pattern` (String)
Loading
Loading