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

required_pull_request_reviews in github_branch_protection isn't applying #40

Closed
gregswift opened this issue Jul 11, 2017 · 3 comments
Closed

Comments

@gregswift
Copy link

gregswift commented Jul 11, 2017

Hi there,

Terraform Version

0.9.11 (Last time I knew this worked was 0.9.5, but we upgraded and it started having this issue)

Affected Resource(s)

  • github_branch_protection

We are seeing a similar output with the vcd_vapp.ip, but I'm not sure that its the same issue. We aren't seeing it with any other resources.

Terraform Configuration Files

resource "github_branch_protection" "myrepo_master" {
    repository = "${github_repository.myrepo.name}"
    branch = "master"
    required_status_checks {
        include_admins = true
        strict = true
        contexts = []
    }
    required_pull_request_reviews {
        include_admins = true
    }

}

Debug Output

https://gist.github.com/gregswift/5a934aa4a638701ec1a73123b84fb788 (encrypted with hashicorp gpg key)

Panic Output

No panic

Expected Behavior

The configuration should be set in GitHub to require reviews and include admins.

Actual Behavior

The setting isn't taking so every time we run terraform apply it wants to re-apply the setting.

github_branch_protection.deployment-control_master: Modifying... (ID: myrepo:master)
  required_pull_request_reviews.#:                "0" => "1"
  required_pull_request_reviews.0.include_admins: "" => "true"

Steps to Reproduce

  1. Create github_branch_protection that matches the one above
  2. terraform apply

Important Factoids

This is against GitHub:Enterprise 2.8. The vcd_vapp thing I was talking about above is that we have it set to 'allocated', which is a thing in the documetnation that has worked for a while for us, but now it keeps storing the IP in the state and wanting to change it back to 'allocated' every run. This doesnt actually change anything as far as we can tell, whichs i why it appears simiar, in that it keeps wanting to apply the change. but here it isnt applying the change. With vcd_vapp it seems more of a statefile handling issue.

References

terraform-providers/terraform-provider-vcd#29 for that issue

@grubernaut
Copy link
Contributor

Hey @gregswift, thanks for the issue!

I believe #26 should contain the fix that you need. Please ping if it doesn't solve the issue you're seeing though. Thanks!

@gregswift
Copy link
Author

@grubernaut so this wont be anywhere until 0.10 ?

@grubernaut
Copy link
Contributor

@gregswift Correct, we can release v0.1.1 of the github provider (probably should do that now), and it'll be present in the latest 0.10 beta of Terraform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants