Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <[email protected]>
  • Loading branch information
k4leung4 committed Nov 13, 2024
1 parent 7bbf65f commit 35c6629
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 11 deletions.
3 changes: 1 addition & 2 deletions modules/alerting/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,8 @@ resource "google_monitoring_alert_policy" "cloudrun_timeout" {
severity=ERROR
textPayload="The request has been terminated because it has reached the maximum request timeout. To change this limit, see https://cloud.google.com/run/docs/configuring/request-timeout"
${var.timeout_filter}
${var.global_filter}
${local.squad_log_filter}
-resource.labels.service_name:"-ing-vuln"
${local.squad_log_filter}
EOT

label_extractors = {
Expand Down
2 changes: 2 additions & 0 deletions modules/cron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ No modules.
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project that will host the cron job. | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The region to run the job. | `string` | `"us-east4"` | no |
| <a name="input_repository"></a> [repository](#input\_repository) | Container repository to publish images to. | `string` | `""` | no |
| <a name="input_require_squad"></a> [require\_squad](#input\_require\_squad) | Whether to require squad variable to be specified | `bool` | `true` | no |
| <a name="input_schedule"></a> [schedule](#input\_schedule) | The cron schedule on which to run the job. | `any` | n/a | yes |
| <a name="input_scheduled_env_overrides"></a> [scheduled\_env\_overrides](#input\_scheduled\_env\_overrides) | List of env object overrides. | <pre>list(object({<br/> name = string<br/> value = string<br/> }))</pre> | `[]` | no |
| <a name="input_secret_env"></a> [secret\_env](#input\_secret\_env) | A map of secrets to mount as environment variables from Google Secrets Manager (e.g. secret\_key=secret\_name) | `map` | `{}` | no |
| <a name="input_service_account"></a> [service\_account](#input\_service\_account) | The email address of the service account to run the service as, and to invoke the job as. | `string` | n/a | yes |
| <a name="input_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |
| <a name="input_success_alert_alignment_period_seconds"></a> [success\_alert\_alignment\_period\_seconds](#input\_success\_alert\_alignment\_period\_seconds) | Alignment period for successful completion alert. 0 (default) to not create alert. | `number` | `0` | no |
| <a name="input_task_count"></a> [task\_count](#input\_task\_count) | The number of tasks to run. | `number` | `1` | no |
| <a name="input_timeout"></a> [timeout](#input\_timeout) | The maximum amount of time in seconds to allow the job to run. | `string` | `"600s"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/cron/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "google_cloud_run_v2_job" "job" {

name = "${var.name}-cron"
location = var.region
labels = merge(var.labels, local.squad_label)

deletion_protection = var.deletion_protection

Expand All @@ -70,7 +71,6 @@ resource "google_cloud_run_v2_job" "job" {
service_account = var.service_account
max_retries = var.max_retries
timeout = var.timeout
labels = merge(var.labels, local.squad_label)
dynamic "volumes" {
for_each = var.volumes
content {
Expand Down
4 changes: 2 additions & 2 deletions modules/cron/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ variable "require_squad" {
}

variable "squad" {
description = "Labels to apply to the service."
type = map(string)
description = "squad label to apply to the service."
type = string
default = ""

validation {
Expand Down
2 changes: 2 additions & 0 deletions modules/github-bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ No requirements.
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project ID to create resources in. | `string` | n/a | yes |
| <a name="input_raw_filter"></a> [raw\_filter](#input\_raw\_filter) | Raw PubSub filter to apply, ignores other variables. https://cloud.google.com/pubsub/docs/subscription-message-filter#filtering_syntax | `string` | `""` | no |
| <a name="input_regions"></a> [regions](#input\_regions) | A map from region names to a network and subnetwork. | <pre>map(object({<br/> network = string<br/> subnet = string<br/> }))</pre> | n/a | yes |
| <a name="input_require_squad"></a> [require\_squad](#input\_require\_squad) | Whether to require squad variable to be specified | `bool` | `true` | no |
| <a name="input_service_account_email"></a> [service\_account\_email](#input\_service\_account\_email) | The email of the service account being authorized to invoke the private Cloud Run service. If empty, a service account will be created and used. | `string` | `""` | no |
| <a name="input_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |

## Outputs

Expand Down
4 changes: 2 additions & 2 deletions modules/github-bots/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ variable "require_squad" {
}

variable "squad" {
description = "Labels to apply to the service."
type = map(string)
description = "squad label to apply to the service."
type = string
default = ""

validation {
Expand Down
2 changes: 2 additions & 0 deletions modules/regional-go-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ No requirements.
| <a name="input_regional-volumes"></a> [regional-volumes](#input\_regional-volumes) | The volumes to make available to the containers in the service for mounting. | <pre>list(object({<br/> name = string<br/> gcs = optional(map(object({<br/> bucket = string<br/> read_only = optional(bool, true)<br/> })), {})<br/> nfs = optional(map(object({<br/> server = string<br/> path = string<br/> read_only = optional(bool, true)<br/> })), {})<br/> }))</pre> | `[]` | no |
| <a name="input_regions"></a> [regions](#input\_regions) | A map from region names to a network and subnetwork. A service will be created in each region configured to egress the specified traffic via the specified subnetwork. | <pre>map(object({<br/> network = string<br/> subnet = string<br/> }))</pre> | n/a | yes |
| <a name="input_request_timeout_seconds"></a> [request\_timeout\_seconds](#input\_request\_timeout\_seconds) | The timeout for requests to the service, in seconds. | `number` | `300` | no |
| <a name="input_require_squad"></a> [require\_squad](#input\_require\_squad) | Whether to require squad variable to be specified | `bool` | `true` | no |
| <a name="input_scaling"></a> [scaling](#input\_scaling) | The scaling configuration for the service. | <pre>object({<br/> min_instances = optional(number, 0)<br/> max_instances = optional(number, 100)<br/> max_instance_request_concurrency = optional(number)<br/> })</pre> | `{}` | no |
| <a name="input_service_account"></a> [service\_account](#input\_service\_account) | The service account as which to run the service. | `string` | n/a | yes |
| <a name="input_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |
| <a name="input_volumes"></a> [volumes](#input\_volumes) | The volumes to make available to the containers in the service for mounting. | <pre>list(object({<br/> name = string<br/> empty_dir = optional(object({<br/> medium = optional(string, "MEMORY")<br/> size_limit = optional(string, "2G")<br/> }))<br/> secret = optional(object({<br/> secret = string<br/> items = list(object({<br/> version = string<br/> path = string<br/> }))<br/> }))<br/> }))</pre> | `[]` | no |

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions modules/regional-go-service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ variable "require_squad" {
}

variable "squad" {
description = "Labels to apply to the service."
type = map(string)
description = "squad label to apply to the service."
type = string
default = ""

validation {
Expand Down
2 changes: 2 additions & 0 deletions modules/regional-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ No modules.
| <a name="input_regional-volumes"></a> [regional-volumes](#input\_regional-volumes) | The volumes to make available to the containers in the service for mounting. | <pre>list(object({<br/> name = string<br/> gcs = optional(map(object({<br/> bucket = string<br/> read_only = optional(bool, true)<br/> })), {})<br/> nfs = optional(map(object({<br/> server = string<br/> path = string<br/> read_only = optional(bool, true)<br/> })), {})<br/> }))</pre> | `[]` | no |
| <a name="input_regions"></a> [regions](#input\_regions) | A map from region names to a network and subnetwork. A service will be created in each region configured to egress the specified traffic via the specified subnetwork. | <pre>map(object({<br/> network = string<br/> subnet = string<br/> }))</pre> | n/a | yes |
| <a name="input_request_timeout_seconds"></a> [request\_timeout\_seconds](#input\_request\_timeout\_seconds) | The timeout for requests to the service, in seconds. | `number` | `300` | no |
| <a name="input_require_squad"></a> [require\_squad](#input\_require\_squad) | Whether to require squad variable to be specified | `bool` | `true` | no |
| <a name="input_scaling"></a> [scaling](#input\_scaling) | The scaling configuration for the service. | <pre>object({<br/> min_instances = optional(number, 0)<br/> max_instances = optional(number, 100)<br/> max_instance_request_concurrency = optional(number)<br/> })</pre> | `{}` | no |
| <a name="input_service_account"></a> [service\_account](#input\_service\_account) | The service account as which to run the service. | `string` | n/a | yes |
| <a name="input_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |
| <a name="input_volumes"></a> [volumes](#input\_volumes) | The volumes to make available to the containers in the service for mounting. | <pre>list(object({<br/> name = string<br/> empty_dir = optional(object({<br/> medium = optional(string, "MEMORY")<br/> size_limit = optional(string, "2G")<br/> }))<br/> secret = optional(object({<br/> secret = string<br/> items = list(object({<br/> version = string<br/> path = string<br/> }))<br/> }))<br/> }))</pre> | `[]` | no |

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions modules/regional-service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ variable "require_squad" {
}

variable "squad" {
description = "Labels to apply to the service."
type = map(string)
description = "squad label to apply to the service."
type = string
default = ""

validation {
Expand Down

0 comments on commit 35c6629

Please sign in to comment.