Skip to content
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

Unable to set require_linear_history in github_branch_protection to True #952

Closed
leosunmo opened this issue Oct 18, 2021 · 3 comments
Closed
Labels
Status: Stale Used by stalebot to clean house Type: Bug Something isn't working as documented

Comments

@leosunmo
Copy link

Terraform Version

Running Atlantis
Terraform v0.15.3
on linux_amd64

  • provider registry.terraform.io/integrations/github v4.17.0

Affected Resource(s)

Please list the resources as a list, for example:

  • github_branch_protection
  • require_linear_history

Expected Behavior

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

  1. terraform plan in an unchanged state
  2. 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.

@alexbde
Copy link

alexbde commented 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_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.

@github-actions
Copy link

👋 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!

@github-actions github-actions bot added the Stale label Nov 30, 2022
@nickfloyd nickfloyd added Status: Stale Used by stalebot to clean house and removed Stale labels Nov 30, 2022
@kfcampbell kfcampbell added Type: Bug Something isn't working as documented Priority: Normal labels Dec 1, 2022
@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Dec 1, 2022
Copy link

👋 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!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Apr 21, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants