-
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
[BUG]: github_repository_deploy_key fails when creating: POST returns 404 #1971
Comments
seems like a similar issue to what i'm encountering
repo is private in org i can't tell if it's a github_repository_environment issue or a data source issue (probably the former - i can put the result of the data source in an output and see the right repo) it will only ever try to manage a nonexistent repo in my user's namespace |
Same issue. |
I am also facing similar issue while creating deploy key in github. github_repository_deploy_key.main: Creating... |
PAT token was expired, that's why I was getting error. |
In case this helps anyone: we faced the same issue today and the fix was to ensure that the user associated with the token had the admin role on the repository. This is documented in: https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization |
Facing the same issue also: PAT token hasn't expired. |
Just an update this can occur if you forgot to add the Github Provider block. Could we add a dependency check for another provider to prevent this? |
Thanks, this fixed it for me. I'd missed the injection of the custom GitHub provider. I'm using fine grained access tokens generated via a GitHub App with the repo constraints managed in a terraform submodule. |
In my case, I had forgotten to add a a
$ cat ./modules/deploy-key/versions.tf
terraform {
required_providers {
github = {
source = "integrations/github"
version = "6.2.2"
}
}
}
|
Expected Behavior
The deploy key should be created
Actual Behavior
Terraform Version
terraform -v
Terraform v1.5.7
on darwin_arm64
Your version of Terraform is out of date! The latest version
is 1.6.2. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
I have tried these variants:
Debug Output
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: