terraform-provider-github
terraform-provider-github copied to clipboard
[BUG]: `github_actions_runner_group` return error.
Expected Behavior
Normally, the way I use the resource, I should be able to create group runners without any errors.
resource "github_actions_runner_group" "runner_group" {
for_each = local.runners
name = each.key
visibility = "private"
}
Actual Behavior
When the resource is used, it returns an error, but the resource has been created.
github_actions_runner_group.runner_group["infrastructure"]: Creating...
│ Error: Invalid address to set: []string{"id"}
│
│ with github_actions_runner_group.runner_group["infrastructure"],
│ on main.tf line 22, in resource "github_actions_runner_group" "runner_group":
│ 22: resource "github_actions_runner_group" "runner_group" {
│
Terraform Version
Terraform v1.7.3 on darwin_arm64
github = {
source = "integrations/github"
version = "6.0.0"
}
Affected Resource(s)
- github_actions_runner_group
Terraform Configuration Files
No response
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
Can confirm I'm experiencing the same issue with 6.0.0
, if I revert back to 5.45.0
there are no issues.
Also the same here.
Have the same issue but already when running terraform plan
$ terraform plan
github_actions_runner_group.this: Refreshing state... [id=8]
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Invalid address to set: []string{"id"}
│
│ with github_actions_runner_group.this,
│ on main.tf line 1, in resource "github_actions_runner_group" "this":
│ 1: resource "github_actions_runner_group" "this" {
│
I assume it's the same underlying issue.
I have the same issue trying to import a group:
import {
to = github_actions_runner_group.test
id = "5"
}
(Terrafrom 1.7.4, provider 6.0.0)
I tried adding the target resource or using terraform plan -generate-config-out=gen.tf
. Either way it fails with the cryptic
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Invalid address to set: []string{"id"}
In my case it doesn't even point to the problematic resource/block.
+1
Same error here.
My guess is that's related to us checking the result of this call to d.Set("id"
. PRs are appreciated!
+1
The naive, quick thing to do would be to replace
if err = d.Set("id", runnerGroup.GetID()); err != nil {
return err
}
with
_ = d.Set("id", runnerGroup.GetID())
but I don't love that. The better thing to do would be to debug the provider to figure out why the Set
is erroring.
Same on v6.2.0