Skip to content

Unable to set branch names/patterns when custom_branch_policies is true. #922

@Omicron7

Description

@Omicron7

Affected Resource(s)

  • github_repository_environment

Terraform Configuration Files

resource "github_repository_environment" "environment" {
  repository  = "repository_name"
  environment = "testing"

  deployment_branch_policy {
    protected_branches     = false
    custom_branch_policies = true
  }
}

In the GitHub console, when custom_branch_policies is set to true, it allows setting one or more Branch names/patterns to match against. It doesn't seem like this is possible in Terraform. I'm unable to find any other GitHub resource that would allow managing that list per environment. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions