terraform-provider-github
terraform-provider-github copied to clipboard
[BUG]: actions_registration_token inserts additional / prior to repo name
Expected Behavior
actions_registration_token pulls repository and creates token for runner.
Actual Behavior
actions_registration_token inserts additional / prior to repo name, or perhaps it's trying to pull the repo owner but failing, either way it's dropping an extra / into the url which is causing it to fail.
Error: error creating a GitHub Actions repository registration token for /2good4hisowngood/Terraform-tech-talk: POST https://api.github.com/repos//2good4hisowngood/Terraform-tech-talk/actions/runners/registration-token: 404 Not Found []
with data.github_actions_registration_token.example["2good4hisowngood/Terraform-tech-talk"],
on github.tf line 7, in data "github_actions_registration_token" "example":
7: data "github_actions_registration_token" "example" {
Terraform Version
hashicorp/setup-terraform@v2 integrations/github version = "6.2.2"
Affected Resource(s)
actions_registration_token
Terraform Configuration Files
data "github_repositories" "example" {
query = "org:${var.org_name}" # Passing in the org name at runtime
include_repo_id = true
}
# Generate registration tokens for each repository
data "github_actions_registration_token" "example" {
for_each = toset(data.github_repositories.example.names)
repository = "${var.org_name}/${each.value}"
}
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct