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

support for adding labels #618

Merged
merged 2 commits into from
Nov 5, 2024
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
1 change: 1 addition & 0 deletions modules/cron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ No modules.
| <a name="input_importpath"></a> [importpath](#input\_importpath) | The import path that contains the cron application. | `string` | n/a | yes |
| <a name="input_invokers"></a> [invokers](#input\_invokers) | List of iam members invoker perimssions to invoke the job. | `list(string)` | `[]` | no |
| <a name="input_ko_build_env"></a> [ko\_build\_env](#input\_ko\_build\_env) | A list of custom environment variables to pass to the ko build. | `list(string)` | `[]` | no |
| <a name="input_labels"></a> [labels](#input\_labels) | Labels to apply to the job. | `map(string)` | `{}` | no |
| <a name="input_max_retries"></a> [max\_retries](#input\_max\_retries) | The maximum number of times to retry the job. | `number` | `3` | no |
| <a name="input_memory"></a> [memory](#input\_memory) | The memory limit for the job. | `string` | `"512Mi"` | no |
| <a name="input_name"></a> [name](#input\_name) | Name to prefix to created resources. | `any` | n/a | yes |
Expand Down
1 change: 1 addition & 0 deletions modules/cron/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "google_cloud_run_v2_job" "job" {
template {
parallelism = var.parallelism
task_count = var.task_count
labels = var.labels

template {
execution_environment = var.execution_environment
Expand Down
6 changes: 6 additions & 0 deletions modules/cron/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,9 @@ variable "deletion_protection" {
description = "Whether to enable delete protection for the service."
default = true
}

variable "labels" {
description = "Labels to apply to the job."
type = map(string)
default = {}
}
1 change: 1 addition & 0 deletions modules/github-bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ No requirements.
| <a name="input_extra_filter_not_has_attributes"></a> [extra\_filter\_not\_has\_attributes](#input\_extra\_filter\_not\_has\_attributes) | Optional additional prefixes to check for presence. | `list(string)` | `[]` | no |
| <a name="input_extra_filter_prefix"></a> [extra\_filter\_prefix](#input\_extra\_filter\_prefix) | Optional additional prefixes for filtering events. | `map(string)` | `{}` | no |
| <a name="input_github-event"></a> [github-event](#input\_github-event) | The GitHub event type to subscribe to. | `string` | n/a | yes |
| <a name="input_labels"></a> [labels](#input\_labels) | Labels to apply to the service. | `map(string)` | `{}` | no |
| <a name="input_name"></a> [name](#input\_name) | The name of the bot. | `string` | n/a | yes |
| <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) | Project ID to create resources in. | `string` | n/a | yes |
Expand Down
3 changes: 2 additions & 1 deletion modules/github-bots/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ module "service" {
project_id = var.project_id
regions = var.regions

service_account = var.service_account_email == "" ? google_service_account.sa[0].email : var.service_account_email
labels = var.labels

service_account = var.service_account_email == "" ? google_service_account.sa[0].email : var.service_account_email

egress = "PRIVATE_RANGES_ONLY" // Makes GitHub API calls

Expand Down
6 changes: 6 additions & 0 deletions modules/github-bots/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ variable "service_account_email" {
type = string
default = ""
}

variable "labels" {
description = "Labels to apply to the service."
type = map(string)
default = {}
}
Loading