mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-01-15 08:14:14 +01:00
For some reason this api does return ints, where it is supposed to return strings in older LTS versions.
1.9 KiB
1.9 KiB
Data Source: bitbucketserver_project_hooks
Retrieve a list of project hooks and their status' for the specified project.
Example Usage
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" = "9.4.2",
# "scope_types" = ["PROJECT", "REPOSITORY"],
# "enabled" = "false",
# "configured" = "false",
# "scope_type" = "PROJECT",
# }]
Applying a Custom Filter
Find specific types of project hooks.
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 ofPRE_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-hookname- Name of the hook e.g.Reject Force Pushtype- Type of the hook e.g.PRE_RECEIVEdescription- Detailed description e.g.Reject all force pushes (git push --force) to this repositoryversion- Version of the hook, for system hooks this is the bitbucket version e.g.9.4.2scope_types- List of strings containing the scopes available for this hook, e.g.["PROJECT", "REPOSITORY"]enabled- Set if this hook is enabled for this projectconfigured- Set if the hook is configured for this projectscope_type- Type of scope applied for this hook, e.g.PROJECTscope_resource_id- Reference ID of the applied scope, e.g.1