terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

Need docs for upgrade path to github_branch_protection_v3

Open jspiro opened this issue 4 years ago • 6 comments

terraform state mv module.foo.github_branch_protection.this module.foo.github_branch_protection_v3.this does not work, I think this is because the change was introduced after switching maintainers to github. Once you switch providers, you can't read the old state anymore, even though they're actually 100% compatible.

There's only two ways I've found to "upgrade" for folks like me stuck in 2.9:

  • Allow it to destroy all the old resources (yeek! not terrible for branch protection, since you will quickly re-add it, but... terrible)
  • Manually find and replace in the statefile (double yeek!)

Can someone provide a safe, intended upgrade path?

Op/Ed: While I appreciate the existence of github_branch_protection_v3, once the graphql API is usable for big orgs, we'll have the same migration nightmare back from v3 to mainline.

Perhaps there could have been a flag to enable the new graphql api, or to enable the old API, or at least an experimental graphql branch protection resource while restoring the old functionality?

I understand there are likely technical reasons why it couldn't be done at this point (incompatible new keywords like pattern, so going backward would be tough for those that upgraded), but the biggest users of this provider are the ones who are ironically suffering the most from a change that should have benefitted them the most. This solution sort of further antagonizes us.

Still, I appreciate it, and I've spent the last five hours figuring out how to make it work.

jspiro avatar Jan 20 '21 07:01 jspiro

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

github-actions[bot] avatar Dec 05 '22 02:12 github-actions[bot]

@jspiro what's the status of this?

While I appreciate the existence of github_branch_protection_v3, once the graphql API is usable for big orgs, we'll have the same migration nightmare back from v3 to mainline.

Is the graphql API usable for big orgs now?

joebowbeer avatar Sep 01 '23 01:09 joebowbeer

@jspiro what's the status of this?

While I appreciate the existence of github_branch_protection_v3, once the graphql API is usable for big orgs, we'll have the same migration nightmare back from v3 to mainline.

Is the graphql API usable for big orgs now?

No idea. Moved on :-/

jspiro avatar Sep 01 '23 03:09 jspiro

Nope, still extremely slow.

devopsrick avatar Sep 01 '23 08:09 devopsrick

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

github-actions[bot] avatar May 29 '24 01:05 github-actions[bot]

This is still relevant.

legoscia avatar May 29 '24 08:05 legoscia

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

github-actions[bot] avatar Feb 24 '25 02:02 github-actions[bot]

This is still relevant.

legoscia avatar Feb 24 '25 13:02 legoscia