github_enterprise_actions_permissions

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

Example Usage

data "github_enterprise" "example-enterprise" {
  slug = "my-enterprise"
}

data "github_organization" "example-org" {
  name = "my-org"
}

resource "github_enterprise_actions_permissions" "test" {
  enterprise_id = data.github_enterprise.example-enterprise.slug
  allowed_actions = "selected"
  enabled_organizations = "selected"
  allowed_actions_config {
    github_owned_allowed = true 
    patterns_allowed     = ["actions/cache@*", "actions/checkout@*"]
    verified_allowed     = true
  }
  enabled_organizations_config {
    organization_ids = [data.github_organization.example-org.id]
  }
}

Argument Reference

The following arguments are supported:

Allowed Actions Config

The allowed_actions_config block supports the following:

Enabled Organizations Config

The enabled_organizations_config block supports the following:

Import

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

$ terraform import github_enterprise_actions_permissions.test github_enterprise_name