Repository navigation
Closed
Description
I'm having issue with setting delete_branch_on_merge = true. It looks like it keeps getting reset back to false in the next run.
Terraform Version
Terraform v0.12.24
+ provider.github v2.8.0
Affected Resource(s)
- github_repository
Terraform Configuration Files
resource "github_repository" "my_repo" {
name = "my_repo"
description = "My Repo"
default_branch = "master"
private = true
delete_branch_on_merge = true
}Terraform Plan Output
# github_repository.my_repo will be updated in-place
~ resource "github_repository" "my_repo" {
allow_merge_commit = true
allow_rebase_merge = true
allow_squash_merge = true
archived = false
auto_init = false
default_branch = "master"
~ delete_branch_on_merge = false -> true
description = "My Repo"
etag = "<SOME_HASH>"
full_name = "<some-org>/my_repo"
git_clone_url = "git://github.com/<some-org>/my_repo.git"
has_downloads = false
has_issues = false
has_projects = false
has_wiki = false
html_url = "https://github.com/<some-org>/my-repo"
http_clone_url = "https://github.com/<some-org>/my-repo.git"
id = "my_repo"
is_template = false
name = "my_repo"
node_id = "<SOME_HASH>"
private = true
ssh_clone_url = "[email protected]:<some-org>/my-repo.git"
svn_url = "https://github.com/<some-org>/mh-repo"
topics = []
}
Expected Behavior
delete_branch_on_merge will be set to true and stays as true
Actual Behavior
~ delete_branch_on_merge = false -> true
This line keeps showing up in my plan, and the attribute is never set to true.
Steps to Reproduce
- Create a
.hclfile like mentioned above (Note: not sure if it is related, but the repo wasterraform importearlier) - Run
terraform planand thenterraform apply
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]`delete_branch_on_merge` doesn't stay as `true`[/-][+]delete_branch_on_merge doesn't stay as true[/+]SanderKnape commentedon May 30, 2020
I'm not able to reproduce this, either with a newly created repo from Terraform or with an imported repo. Same Terraform version and GitHub Provider version. Are you able to share a specific way to reproduce? Including what kind of initial settings to give the manually created repo and such.
jcudit commentedon May 30, 2020
My attempt linked above was also unsuccessful:
zmingxie commentedon May 30, 2020
This is odd... I was able to reproduce this all the time yesterday, but now I cannot reproduce it either.
I'm going to close this issue now, and sorry about the false alarm.
Thanks again!
jcudit commentedon May 30, 2020
No worries. If it happens again try adding a
TF_LOG=DEBUG ...ahead of theterraforminvocation as the added output may help.analytically commentedon Jul 28, 2020
Seeing this as well using 2.8.1.