Skip to content

github_branch_protection requires branch to exist #164

@abridgett

Description

@abridgett

Terraform Version

0.11.10

Affected Resource(s)

  • github_branch_protection

Expected Behavior

A branch protection rule should be created for the branch (or fnmatch wildcard) in question

Actual Behavior

github_branch_protection.release-branch-protection: PUT https://api.github.com/repos/foo/bar/branches/release/protection: 404 Branch not found []

Important Factoids

I wonder if this is a limitation of the github API, the request being sent matches what you'd expect from https://developer.github.com/v3/repos/branches/#update-branch-protection
It is possible to do this from the UI though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions