-
Notifications
You must be signed in to change notification settings - Fork 949
Allow Setting the github_repository.default_branch on creation to any designated value #513
Description
Affected Resource(s)
Please list the resources as a list, for example:
- github_repository.default_branch
Expected Behavior
In support of the more modern naming convention that GitHub is adopting for allowing the default branch to be main by default rather than master, I attempted to update my git repo management project to use the same convention.
I expected the default_branch attribute of github_repository to allow setting this.
Actual Behavior
The provider returned an error:
Error: Cannot set the default branch on a new repository to something other than 'master'.
on main.tf line 5, in resource "github_repository" "repo":
5: resource "github_repository" "repo" {
Limits
If this is a provider limitation with GitHub right now, and not able to be resolved immediately, I'd suggest this be marked as a pinned item to revisit in a few months after GitHub finishes these changes. This is part of the better inclusive language that GitHub is working to support and if the current provider is limited, would be good to pin to have as item to support once GitHub fixes it.