integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
891 stars 736 forks source link

[BUG]: encountering issues with Terraform attempting a hard replacement even when using the repository name as specified in the documentation #1934

Closed Moradabuaqel1 closed 2 months ago

Moradabuaqel1 commented 1 year ago

Expected Behavior

no replacement or changes should be happen when using repository name instead of repository id as specified in the documentation.

Actual Behavior

encountering issues with Terraform attempting a hard replacement even when using the repository name as specified in the documentation

Terraform Version

Terraform v1.5.6 on darwin_amd64

Affected Resource(s)

-github_branch_protection

Terraform Configuration Files

resource "github_branch_protection" "example" {

  repository_id  = "example-service"

  pattern          = "master"
  enforce_admins   = false
  allows_deletions = false

  required_status_checks {
    contexts = ["default"]
  }

  required_pull_request_reviews {
    dismiss_stale_reviews  = true
    require_code_owner_reviews = true
  }
}

Steps to Reproduce

import example-service from existing repo run terraform apply

Debug Output

if i changed the repo name with id it works properly and i get what expected

Panic Output

No response

Code of Conduct

nickfloyd commented 1 year ago

Hey @Moradabuaqel1 thank you for hunting this down and apologies for the trouble. I am going to assign the labels hacktoberfest and Up for Grabs to signal to the community that this is something that has been verified and can be worked. Please feel free to pick the issue up if you have time! Thank you again for all that you do for this community ❤️ !

github-actions[bot] commented 3 months ago

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