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

error on creating github_repository_environment #1311

Closed
KamranBiglari opened this issue Sep 30, 2022 · 2 comments
Closed

error on creating github_repository_environment #1311

KamranBiglari opened this issue Sep 30, 2022 · 2 comments
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@KamranBiglari
Copy link

There is an issue while creating an environment using terraform. In the end, terraform create the environment in github and exit with this error.
I use the github API with empty data and there is no error but if I set wait_time or anything else I'll receive the error.

curl -X PUT -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${var.GITHUB_TOKEN}" https://api.github.com/repos/ORG/REPO/environments/dev -d "{}"
# resource "github_repository_environment" "main" {
#   environment  = "dev"
#   repository   = "REPO"
#   deployment_branch_policy {
#     protected_branches          = false
#     custom_branch_policies = false
#   }
#   reviewers {
#     users = []
#    }
# }
│ Error: PUT https://api.github.com/repos/ORG/REPO/environments/dev: 422 Fail to create protected rule, please ensure billing plan include protected branch gate. []
│
│   with github_repository_environment.main["REPO"],
│   on main.tf line 70, in resource "github_repository_environment" "main":
│   70: resource "github_repository_environment" "main" {
@snovikov
Copy link

I think this duplicates #1262

@nickfloyd nickfloyd added Type: Bug Something isn't working as documented Priority: Normal Status: Needs info Full requirements are not yet known, so implementation should not be started Status: Triage This is being looked at and prioritized labels Nov 15, 2022
@kfcampbell
Copy link
Member

Closing in favor of #1262, let's continue future discussion there.

@kfcampbell kfcampbell closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

4 participants