-
Notifications
You must be signed in to change notification settings - Fork 769
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
How to force the github provider to use v4 graphql api #551
Comments
Hey I think its just a matter of defining another github provider and then passing that to specific resource/module invocations like so: https://github.com/terraform-providers/terraform-provider-github/issues/167#issuecomment-606375836 provider "github" {
organization = "myorg"
...
}
provider "github-v4" {
organization = "myorg"
...
}
resource "github_branch_protection" "master" {
provider = github-v4 # defaults to github
...
} |
Hi @majormoses, Thanks for the help. That custom provider is base on version 2. |
OK. I found the master branch has switch branch protection to v4 but not tag v3.0.0. Tried to build the master branch locally got this error:
|
I'm able to replicate the master branch failure: |
Confirmed that the implementation for this resource has changed to the v4 GraphQL API. There is ongoing discussion around supporting both previous and current implementations going forward over in https://github.com/terraform-providers/terraform-provider-github/issues/606, but not sure how it will turn out. I'm not sure if this issue is still relevant, but please reopen and clarify what can be helped with if I've misunderstood. |
Hi there,
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
Expected Behavior
v4 graphql api could protect a non-existent git branch
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init
terraform apply
References
The text was updated successfully, but these errors were encountered: