integrations / integrations/terraform-provider-github
[BUG]: `github_actions_hosted_runner` does not wait for public IP provisioning
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Expected Behavior
When `public_ip_enabled = true`, creating or updating a
`github_actions_hosted_runner` should wait until:
1. The runner status is `Ready`.
2. The GitHub API returns the allocated `public_ips`.
After `terraform apply` completes, outputs referencing `public_ips` should be populated.
### Actual Behavior
The provider performs only one read immediately after creating or updating the runner. Because GitHub provisions hosted runners asynchronously, the resource can return while its status is still `Provisioning` and `public_ips` is empty.
The IPs appear in GitHub later, but Terraform state and dependent outputs remain empty until another refresh or apply.
### Terraform Version
1.14.9
### GitHub Installation Type
- [ ] GitHub.com (Free, Pro, or Team)
- [ ] GitHub Enterprise Server (on-premises)
- [x] GitHub Enterprise Cloud with Personal Accounts (github.com)
- [ ] GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- [ ] GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- [ ] I don't know
### Affected Resource(s)
github_actions_hosted_runner
### Terraform Configuration Files
```hcl
resource "github_actions_hosted_runner" "this" {
name = "example"
image {
id = "2306"
source = "github"
}
public_ip_enabled = true
maximum_runners = 5
size = "2-core"
runner_group_id = github_actions_runner_group.this.id
}
output "github_actions_runner_public_ips" {
value = github_actions_hosted_runner.this.public_ips
}
```
### Steps to Reproduce
terraform apply
### Debug Output
```shell
github_actions_runner_group.this: Creating...
github_actions_runner_group.this: Creation complete after 3s [id=5]
github_actions_hosted_runner.this: Creating...
github_actions_hosted_runner.this: Creation complete after 3s [id=8]
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Outputs:
github_actions_runner_public_ips = tolist([])
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start at the github_actions_hosted_runner resource implementation and reproduce the issue with terraform apply, checking the resource state and public_ips output. Done means creation and updates wait for status Ready and for the GitHub API to return public_ips, so dependent Terraform outputs are populated immediately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, go, terraform
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100