Skip to content

Commit

Permalink
chore(docs): add github_workflow_repository_permissions documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
  • Loading branch information
M0NsTeRRR committed Jul 9, 2024
1 parent f46def7 commit 3a2c40d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions website/docs/r/workflow_repository_permissions.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: "github"
page_title: "GitHub: github_workflow_repository_permissions"
description: |-
Enables and manages Workflow permissions for a GitHub repository
---

# github_workflow_repository_permissions

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

## Example Usage

```hcl
resource "github_repository" "example" {
name = "my-repository"
}
resource "github_workflow_repository_permissions" "test" {
default_workflow_permissions = "read"
can_approve_pull_request_reviews = true
repository = github_repository.example.name
}
```

## Argument Reference

The following arguments are supported:

* `repository` - (Required) The GitHub repository
* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be one of: `read` or `write`.
* `can_approve_pull_request_reviews` - (Optional) Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.

## Import

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

```
$ terraform import github_workflow_repository_permissions.test my-repository
```

0 comments on commit 3a2c40d

Please sign in to comment.