Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions examples/hosted_runner/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
resource "github_actions_runner_group" "example" {
name = "example-runner-group"
visibility = "all"
}

# NOTE: You must first query available images using the GitHub API:
# GET /orgs/{org}/actions/hosted-runners/images/github-owned
# The image ID is numeric, not a string like "ubuntu-latest"
resource "github_actions_hosted_runner" "example" {
name = "example-hosted-runner"

image {
id = "2306" # Ubuntu Latest (24.04) - query your org for available IDs
source = "github"
}

size = "4-core"
runner_group_id = github_actions_runner_group.example.id
}

# Advanced example with optional parameters
resource "github_actions_hosted_runner" "advanced" {
name = "advanced-hosted-runner"

image {
id = "2306" # Ubuntu Latest (24.04) - query your org for available IDs
source = "github"
}

size = "8-core"
runner_group_id = github_actions_runner_group.example.id
maximum_runners = 10
enable_static_ip = true
}
1 change: 1 addition & 0 deletions github/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func Provider() *schema.Provider {
"github_actions_repository_oidc_subject_claim_customization_template": resourceGithubActionsRepositoryOIDCSubjectClaimCustomizationTemplate(),
"github_actions_repository_permissions": resourceGithubActionsRepositoryPermissions(),
"github_actions_runner_group": resourceGithubActionsRunnerGroup(),
"github_actions_hosted_runner": resourceGithubActionsHostedRunner(),
"github_actions_secret": resourceGithubActionsSecret(),
"github_actions_variable": resourceGithubActionsVariable(),
"github_app_installation_repositories": resourceGithubAppInstallationRepositories(),
Expand Down
Loading