github_actions_organization_permissions

This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. You must have admin access to an organization to use this resource.

Example Usage

resource "github_repository" "example" {
  name = "my-repository"
}

resource "github_actions_organization_permissions" "test" {
  allowed_actions = "selected"
  enabled_repositories = "selected"
  allowed_actions_config {
    github_owned_allowed = true 
    patterns_allowed     = ["actions/cache@*", "actions/checkout@*"]
    verified_allowed     = true
  }
  enabled_repositories_config {
    repository_ids = [github_repository.example.repo_id]
  }
}

Argument Reference

The following arguments are supported:

Allowed Actions Config

The allowed_actions_config block supports the following:

Enabled Repositories Config

The enabled_repositories_config block supports the following:

Import

This resource can be imported using the name of the GitHub organization:

$ terraform import github_actions_organization_permissions.test github_organization_name