Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 6.05 KB

File metadata and controls

43 lines (32 loc) · 6.05 KB

Requirements

Name Version
terraform >= 1.6
github ~> 6.0

Providers

Name Version
github ~> 6.0

Modules

No modules.

Resources

Name Type
github_organization_ruleset.ruleset resource
github_repository_ruleset.ruleset resource

Inputs

Name Description Type Default Required
bypass_actors An object containing fields for role, team, organization admin, and integration bypass actors. Defaults to {}
object({
repository_roles = optional(list(object({
role_id = string
always_bypass = optional(bool)
})))
teams = optional(list(object({
team_id = string
always_bypass = optional(bool)
})))
integrations = optional(list(object({
installation_id = number
always_bypass = optional(bool)
})))
organization_admin = optional(object({
always_bypass = optional(bool)
}))
})
{} no
enforcement The enforcement level of the ruleset. Should be one of either active, evaluate or disabled. Defaults to active string "active" no
name The name of the ruleset. string n/a yes
ref_name_exclusions A list of ref names or patterns to exclude. Defaults to an empty list. If set and ruleset_type is set to organization then either repository_name_inclusions or repository_name_exclusions must be set to a list of atleast 1 string. list(string) [] no
ref_name_inclusions A list of ref names or patterns to include. Defaults to an empty list. If set and ruleset_type is set to organization then either repository_name_inclusions or repository_name_exclusions must be set to a list of atleast 1 string. list(string) [] no
repository The name of the repository to apply the ruleset to. Only used when ruleset_type is 'repository'. string null no
repository_name_exclusions A list of repository names or patterns to exclude. If ruleset_type is set to repository then this field is ignored. list(string) [] no
repository_name_inclusions A list of repository names or patterns to include. If ruleset_type is set to repository then this field is ignored. list(string) [] no
rules An object containing fields for all the rule definitions the ruleset should enforce.
object({
branch_name_pattern = optional(object({
operator = string
pattern = string
name = optional(string)
negate = optional(bool)
}))
tag_name_pattern = optional(object({
operator = string
pattern = string
name = optional(string)
negate = optional(bool)
}))
commit_author_email_pattern = optional(object({
operator = string
pattern = string
name = optional(string)
negate = optional(bool)
}))
commit_message_pattern = optional(object({
operator = string
pattern = string
name = optional(string)
negate = optional(bool)
}))
committer_email_pattern = optional(object({
operator = string
pattern = string
name = optional(string)
negate = optional(bool)
}))
creation = optional(bool)
deletion = optional(bool)
update = optional(bool)
non_fast_forward = optional(bool)
required_linear_history = optional(bool)
required_signatures = optional(bool)
update_allows_fetch_and_merge = optional(bool)
pull_request = optional(object({
dismiss_stale_reviews_on_push = optional(bool)
require_code_owner_review = optional(bool)
require_last_push_approval = optional(bool)
required_approving_review_count = optional(number)
required_review_thread_resolution = optional(bool)
}))
required_status_checks = optional(object({
required_check = list(object({
context = string
integration_id = optional(number)
}))
strict_required_status_check_policy = optional(bool)
}))
required_workflows = optional(object({
required_workflows = list(object({
repository_id = number
path = string
ref = optional(string)
}))
}))
required_deployment_environments = optional(list(string))
})
n/a yes
ruleset_type The type of rulset to make. Should be one of ether organization or repository. string n/a yes
target The target of the ruleset. Should be one of either branch or tag. string n/a yes

Outputs

No outputs.