-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github_branch_protection requires branch to exist #164
Comments
@abridgett We have the same issue and I guess you would need to use |
After PR integrations#135, auto_init, license_template, and gitignore_template now all have ForceNew set to true, which means they *will* affect the resource after initial creation. See also PR integrations#148, integrations#155, integrations#164 Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
This is a limitation of the GitHub API: https://github.saobby.my.eu.orgmunity/t5/GitHub-API-Development-and/REST-API-v3-wildcard-branch-protection/m-p/14547#M260 |
Github v4 API provides the ability to specify a pattern rather than a branch. I have uplifted the resource to use the v4 API: https://github.com/terraform-providers/terraform-provider-github/pull/337 |
After PR integrations#135, auto_init, license_template, and gitignore_template now all have ForceNew set to true, which means they *will* affect the resource after initial creation. See also PR integrations#148, integrations#155, integrations#164 Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
👋 Hey Friends, this issue has been automatically marked as |
Closing as #337 has been merged/released. Please create a new issue for further problems with this! |
Terraform Version
0.11.10
Affected Resource(s)
Expected Behavior
A branch protection rule should be created for the branch (or fnmatch wildcard) in question
Actual Behavior
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.
The text was updated successfully, but these errors were encountered: