Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github-events: Add tf vars for webhook id env vars #691

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/github-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ No requirements.
| <a name="input_notification_channels"></a> [notification\_channels](#input\_notification\_channels) | List of notification channels to alert. | `list(string)` | n/a | yes |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | n/a | `string` | n/a | yes |
| <a name="input_regions"></a> [regions](#input\_regions) | A map from region names to a network and subnetwork. The bucket must be in one of these regions. | <pre>map(object({<br/> network = string<br/> subnet = string<br/> }))</pre> | n/a | yes |
| <a name="input_requested_only_webhook_id"></a> [requested\_only\_webhook\_id](#input\_requested\_only\_webhook\_id) | If set, the csv IDs of the webhooks that should only receive check requested events. | `string` | `""` | no |
| <a name="input_require_squad"></a> [require\_squad](#input\_require\_squad) | Whether to require squad variable to be specified | `bool` | `false` | no |
| <a name="input_secret_version_adder"></a> [secret\_version\_adder](#input\_secret\_version\_adder) | The user allowed to populate new webhook secret versions. | `string` | n/a | yes |
| <a name="input_service-ingress"></a> [service-ingress](#input\_service-ingress) | Which type of ingress traffic to accept for the service (see regional-go-service). Valid values are:<br/><br/>- INGRESS\_TRAFFIC\_ALL accepts all traffic, enabling the public .run.app URL for the service<br/>- INGRESS\_TRAFFIC\_INTERNAL\_LOAD\_BALANCER accepts traffic only from a load balancer | `string` | `"INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"` | no |
| <a name="input_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |
| <a name="input_webhook_id"></a> [webhook\_id](#input\_webhook\_id) | If set, the csv IDs of the webhooks that the trampoline should listen to. | `string` | `""` | no |

## Outputs

Expand Down
8 changes: 8 additions & 0 deletions modules/github-events/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ module "this" {
name = "GITHUB_ORGANIZATIONS_FILTER"
value = var.github_organizations
},
{
name = "REQUESTED_ONLY_WEBHOOK_ID"
value = var.requested_only_webhook_id
},
{
name = "WEBHOOK_ID"
value = var.webhook_id
}
],
[for name, secret in var.additional_webhook_secrets : {
name = "WEBHOOK_SECRET_${upper(name)}"
Expand Down
12 changes: 12 additions & 0 deletions modules/github-events/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,15 @@ variable "github_organizations" {
type = string
default = ""
}

variable "requested_only_webhook_id" {
description = "If set, the csv IDs of the webhooks that should only receive check requested events."
type = string
default = ""
}

variable "webhook_id" {
description = "If set, the csv IDs of the webhooks that the trampoline should listen to."
type = string
default = ""
}
Loading