You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to set require_linear_history in github_branch_protection to True #952
When using require_linear_history = true in a github_branch_protection block it should enable it in the Github API
Actual Behavior
Terraform seems unable to set it to true as it keeps coming up in plans.
The follow plan appears every time it's executed:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.my-repo.github_branch_protection.repo_branch_protection["branch1"] will be updated in-place
~ resource "github_branch_protection" "repo_branch_protection" {
~ required_linear_history = false -> true
# (7 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.my-repo.github_branch_protection.repo_branch_protection["branch2"] will be updated in-place
~ resource "github_branch_protection" "repo_branch_protection" {
~ required_linear_history = false -> true
# (7 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy.
Steps to Reproduce
terraform plan in an unchanged state
See changes to require_linear_history every time.
References
This is mentioned here as well, #887 (comment), but figured we should open a real issue.
Reacted by Arne, Julien Ammous, Romeu Fonseca, Philippe Boyd, Rob Zwissler, Tomasz Maciążek and Daniel Martins
Just leaving a quick note here: we're experiencing the same issue with GHES 3.1, Terraform 1.0.7, and github-provider 4.17. It is happening for attributes github_branch_protection.required_linear_history and github_repository.allow_auto_merge.
Root cause is the GHES 3.1 not supporting setting these attributes via API. It is added in GHES 3.2.
Reacted by Rob Zwissler, Ben Abrams and Julien Ammous
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Activity
alexbde commentedon Nov 3, 2021
Just leaving a quick note here: we're experiencing the same issue with GHES 3.1, Terraform 1.0.7, and github-provider 4.17. It is happening for attributes
github_branch_protection.required_linear_historyandgithub_repository.allow_auto_merge.Root cause is the GHES 3.1 not supporting setting these attributes via API. It is added in GHES 3.2.
github-actions commentedon Nov 30, 2022
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!github-actions commentedon Apr 21, 2024
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!