Skip to content

Unable to set require_linear_history in github_branch_protection to True #952

@leosunmo

Description

@leosunmo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleUsed by stalebot to clean houseType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions