Skip to content

Commit

Permalink
docs: Add support for multiple webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
fabidick22 committed Jul 3, 2023
1 parent f057a50 commit c922986
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module "flux2-ecr-webhook" {
...
repo_mapping = {
my-ecr-repo = {
webhook = "https://custom.domain.com/hook/11111111"
webhook = ["https://custom.domain.com/hook/11111111", "https://custom.domain.com/hook/2222222"]
}
}
...
Expand Down Expand Up @@ -102,7 +102,7 @@ module "flux2-ecr-webhook" {
|------|-------------|------|---------|:--------:|
| <a name="input_app_name"></a> [app\_name](#input\_app\_name) | Name used for resources to create. | `string` | `"flux2-ecr-webhook"` | no |
| <a name="input_cw_logs_retention"></a> [cw\_logs\_retention](#input\_cw\_logs\_retention) | Specifies the number of days you want to retain log events in the specified log group. | `number` | `14` | no |
| <a name="input_repo_mapping"></a> [repo\_mapping](#input\_repo\_mapping) | Object with repository mapping, if this variable is set `repo_mapping_file` will be ignored.<br>**Example:**<pre>{<br> ecr-repo-name = {<br> webhook = "https://gitops.domain.com/hook/111111 "<br> }<br> test/ecr-repo-name = {<br> webhook = "https://gitops.domain.com/hook/111111 "<br> token = "webhook-token "<br> }<br>}</pre> | `any` | `null` | no |
| <a name="input_repo_mapping"></a> [repo\_mapping](#input\_repo\_mapping) | Object with repository mapping, if this variable is set `repo_mapping_file` will be ignored.<br>**Example:**<pre>{<br> ecr-repo-name = {<br> webhook = ["https://gitops.domain.com/hook/111111" ]<br> }<br> test/ecr-repo-name = {<br> webhook = ["https://gitops.domain.com/hook/111111", "https://gitops.domain.com/hook/222222" ]<br> token = "webhook-token "<br> }<br>}</pre> | `any` | `null` | no |
| <a name="input_repo_mapping_file"></a> [repo\_mapping\_file](#input\_repo\_mapping\_file) | YAML file path with repository mapping. | `string` | `""` | no |
| <a name="input_webhook_token"></a> [webhook\_token](#input\_webhook\_token) | Webhook default token used to call the Flux receiver. If it doesn't find a `token` attribute in the repository mapping use this token for the webhooks | `string` | `null` | no |

Expand Down
3 changes: 1 addition & 2 deletions docs/tf-docs/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ graph LR
- Add unit tests
- Add support for [generic-hmac](https://fluxcd.io/flux/components/notification/receiver/#generic-hmac)
- Add support to lambda with VPC (for internal webhook)
- Add support to multiple webhooks

## Usage
To use this Terraform module, you must first have created webhooks for each [ImageRepository](https://fluxcd.io/flux/components/image/imagerepositories/) resource in your cluster.
Expand Down Expand Up @@ -50,7 +49,7 @@ module "flux2-ecr-webhook" {
...
repo_mapping = {
my-ecr-repo = {
webhook = "https://custom.domain.com/hook/11111111"
webhook = ["https://custom.domain.com/hook/11111111", "https://custom.domain.com/hook/2222222"]
}
}
...
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Object with repository mapping, if this variable is set `repo_mapping_file` will
```
{
ecr-repo-name = {
webhook = "https://gitops.domain.com/hook/111111 "
webhook = ["https://gitops.domain.com/hook/111111" ]
}
test/ecr-repo-name = {
webhook = "https://gitops.domain.com/hook/111111 "
webhook = ["https://gitops.domain.com/hook/111111", "https://gitops.domain.com/hook/222222" ]
token = "webhook-token "
}
}
Expand Down

0 comments on commit c922986

Please sign in to comment.