-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): add github_workflow_repository_permissions documentation
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
website/docs/r/workflow_repository_permissions.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |