github_actions_repository_permissions

This resource allows you to enable and manage GitHub Actions permissions for a given repository. You must have admin access to an repository to use this resource.

Example Usage

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

resource "github_actions_repository_permissions" "test" {
  allowed_actions = "selected"
  allowed_actions_config {
    github_owned_allowed = true
    patterns_allowed     = ["actions/cache@*", "actions/checkout@*"]
    verified_allowed     = true
  }
  repository = github_repository.example.name
}

Argument Reference

The following arguments are supported:

Allowed Actions Config

The allowed_actions_config block supports the following:

Import

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

$ terraform import github_actions_repository_permissions.test my-repository