Switching default branch to something other than master, then attempting to switch it back to master again results in success being reported, but the default branch not changing back to master.
Problem is here: https://github.com/terraform-providers/terraform-provider-github/blob/master/github/resource_github_repository.go#L248 - it will only ever update default branch if it's NOT master.
Terraform Version
Terraform v0.11.11
Affected Resource(s)
Terraform Configuration Files
resource "github_repository" "main" {
name = "my-repo-12345"
private = true
auto_init = true
}
then create develop branch and:
resource "github_repository" "main" {
name = "my-repo-12345"
private = true
auto_init = true
default_branch = "develop"
}
then:
resource "github_repository" "main" {
name = "my-repo-12345"
private = true
auto_init = true
default_branch = "master"
}
Expected Behavior
Default branch should be switched back to master once the third step above is run.
Actual Behavior
Default branch is left as develop.
Steps to Reproduce
See config files above.
Switching default branch to something other than master, then attempting to switch it back to master again results in success being reported, but the default branch not changing back to master.
Problem is here: https://github.com/terraform-providers/terraform-provider-github/blob/master/github/resource_github_repository.go#L248 - it will only ever update default branch if it's NOT
master.Terraform Version
Terraform v0.11.11
Affected Resource(s)
Terraform Configuration Files
then create
developbranch and:then:
Expected Behavior
Default branch should be switched back to master once the third step above is run.
Actual Behavior
Default branch is left as
develop.Steps to Reproduce
See config files above.