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

[BUG]: actions_registration_token inserts additional / prior to repo name #2312

Open
1 task done
2good4hisowngood opened this issue Jul 10, 2024 · 0 comments
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@2good4hisowngood
Copy link

2good4hisowngood commented Jul 10, 2024

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

  • I agree to follow this project's Code of Conduct
@2good4hisowngood 2good4hisowngood added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jul 10, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

2 participants