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

[BUG]: Importing an internal repo still causes the provider to want to modify visibility from private to internal #2239

Open
1 task done
martinb3 opened this issue Apr 23, 2024 · 0 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@martinb3
Copy link

martinb3 commented Apr 23, 2024

Expected Behavior

There should be no change.

Actual Behavior

The provider wants to update visibility from "private" to "internal" after refreshing state.

Terraform Version

Terraform 1.5.6

Affected Resource(s)

github_repository

Terraform Configuration Files

resource "github_repository" "main" {
  name        = ...
  description = ...

  visibility = "internal"

Steps to Reproduce

Simply run an import and then apply. Here's the GitHub UI for the internal repo:
Screenshot 2024-04-23 at 11 38 01 AM

Error Output

My organization doesn't allow changing repo visibility, even though it shouldn't need to be done.

Error: PATCH https://api.github.com/repos/my-org/my-repo: 422 Visibility can't be changed by this user. []

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@martinb3 martinb3 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 23, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

3 participants
@martinb3 @kfcampbell and others