mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-17 23:13:47 +01:00
Added bitbucketserver_project_hooks data source
This commit is contained in:
58
docusaurus/docs/data_project_hooks.md
Normal file
58
docusaurus/docs/data_project_hooks.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: data_bitbucketserver_project_hooks
|
||||
title: bitbucketserver_project_hooks
|
||||
---
|
||||
|
||||
Retrieve a list of project hooks and their status' for the specified project.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
data "bitbucketserver_project_hooks" "main" {
|
||||
project = "TEST"
|
||||
}
|
||||
|
||||
# data.bitbucketserver_project_hooks.main.hooks = [{
|
||||
# "key" = "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook",
|
||||
# "name" = "Reject Force Push",
|
||||
# "type" = "PRE_RECEIVE",
|
||||
# "description" = "Reject all force pushes (git push --force) to this repository",
|
||||
# "version" = "6.7.0",
|
||||
# "scope_types" = ["PROJECT", "REPOSITORY"],
|
||||
# "enabled" = "false",
|
||||
# "configured" = "false",
|
||||
# "scope_type" = "PROJECT",
|
||||
# }]
|
||||
```
|
||||
|
||||
### Applying a Custom Filter
|
||||
|
||||
Find specific types of project hooks.
|
||||
|
||||
```hcl
|
||||
data "bitbucketserver_project_hooks" "main" {
|
||||
project = "TEST"
|
||||
type = "PRE_RECEIVE"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Project Key to lookup hooks for.
|
||||
* `type` - Optional. Type of hook to find. Must be one of `PRE_RECEIVE`, `POST_RECEIVE`
|
||||
|
||||
## Attribute Reference
|
||||
|
||||
* `hooks` - List of maps containing:
|
||||
|
||||
* `key` - Unique key identifying the hook e.g. `com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook`
|
||||
* `name` - Name of the hook e.g. `Reject Force Push`
|
||||
* `type` - Type of the hook e.g. `PRE_RECEIVE`
|
||||
* `description` - Detailed description e.g. `Reject all force pushes (git push --force) to this repository`
|
||||
* `version` - Version of the hook, for system hooks this is the bitbucket version e.g. `6.7.0`
|
||||
* `scope_types` - List of strings containing the scopes available for this hook, e.g. `["PROJECT", "REPOSITORY"]`
|
||||
* `enabled` - Set if this hook is enabled for this project
|
||||
* `configured` - Set if the hook is configured for this project
|
||||
* `scope_type` - Type of scope applied for this hook, e.g. `PROJECT`
|
||||
* `scope_resource_id` - Reference ID of the applied scope, e.g. `1`
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
"data_bitbucketserver_plugin": {
|
||||
"title": "bitbucketserver_plugin"
|
||||
},
|
||||
"data_bitbucketserver_project_hooks": {
|
||||
"title": "bitbucketserver_project_hooks"
|
||||
},
|
||||
"data_bitbucketserver_project_permissions_groups": {
|
||||
"title": "bitbucketserver_project_permissions_groups"
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"data_bitbucketserver_group_users",
|
||||
"data_bitbucketserver_groups",
|
||||
"data_bitbucketserver_plugin",
|
||||
"data_bitbucketserver_project_hooks",
|
||||
"data_bitbucketserver_project_permissions_groups",
|
||||
"data_bitbucketserver_project_permissions_users",
|
||||
"data_bitbucketserver_repository_permissions_groups",
|
||||
|
||||
Reference in New Issue
Block a user