-
Notifications
You must be signed in to change notification settings - Fork 764
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
provider wants to endlessly change the branches
attribute of github_repository
resource when repo is archived
#1037
Comments
I'm seeing this on normal, unarchived repositories too. The first pass I did terraform wanted to add "branches" attribute to 191 repos and subsequent passes it wants to add "branches" to 92 repos. Terraform v1.1.3
Looking at a diff between a repository terraform repeatedly wants to add "branches" to vs. one it actually put "branches" into, the one it added it to has attribute "auto_init" and it's set to "false". The repo it keeps asking to add "branches" to does not have attribute "auto_init". -- This seems to be a red herring as I found another problematic repo that does have "auto_init" attribute set and no "branches" set. |
Interesting. The archived repos in our case, have indeed the auto_init attribute set to true, so it could be correlated |
After upgrading provider to Workaround we have for now is adding :
in Terraform v1.0.11 |
I'm guessing this was introduced in Sure enough attempting to upgrade from |
Sorry - I had to downvote this answer as it is a hack. We really need this fixed as we have 500+ repositories managed and adding this 500+ times and then removing once the bug is fixed is a non-starter. |
Related issue ^ |
I have migrated from the deprecated hashicorp/github provider to integrations/github and this started happening for me too. |
I gave a shot to fix this issue here: #1117 Would appreciate any feedback on the best ways to potentially roll this change out. |
Adding on additional information to the sentiment that the ignore_changes workaround is insufficient. Thanks to hashicorp/terraform#30517, Terraform now slaps the user's hand for ignoring a computed attribute (
|
We still have sort of an issue with ignoring branches (version 1.2.5). In part of our code, we use a loop to bulk create repositories
In such case, running
generates warning
It looks like changes in branches are not properly ignored. |
Any ETA when this will be fixed? The |
Does 5.0 version close this issue by eliminating |
@dimisjim , @k24dizzle , @kfcampbell it seems after merging #1117 fixes this issue, could you confirm? I see this issue still open, so I'm not sure on how it is going. |
the branch attribute no longer exists on the repo resource relates to integrations/terraform-provider-github#1037 #major
Hey,
What the title says basically. The provider keeps trying to change the branches attribute of the github_repository resource, when the repo is archived. Even after applying, which outputs no error, the drift persists.
I presume this is related to the fact that even via the UI, when a repo is archived, it is read-only and thus branches config cannot change. So when visiting https://github.com/$org/$repo$/settings/branches one gets this message:
Terraform Version
1.1.2
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
No drift to be outputted
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
branches
is included in theignore_changes
array, but this could lead to other issues tooThe text was updated successfully, but these errors were encountered: