Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch committed Jan 22, 2025
1 parent 833ed87 commit 5e6a5f9
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 11 deletions.
6 changes: 4 additions & 2 deletions modules/dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_object"></a> [object](#input\_object) | Object to encode into JSON | `object({})` | n/a | yes |
| <a name="input_object"></a> [object](#input\_object) | Object to encode into JSON | `any` | n/a | yes |

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_json"></a> [json](#output\_json) | n/a |
<!-- END_TF_DOCS -->
10 changes: 3 additions & 7 deletions modules/dashboard/alerts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@ No requirements.

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | n/a |
No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_alerts"></a> [alerts](#module\_alerts) | ../widgets/alert | n/a |
| <a name="module_dashboard-json"></a> [dashboard-json](#module\_dashboard-json) | ../json | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../ | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../sections/width | n/a |

## Resources

| Name | Type |
|------|------|
| [google_monitoring_dashboard.dashboard](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
No resources.

## Inputs

Expand Down
1 change: 1 addition & 0 deletions modules/dashboard/sections/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ No providers.
|------|--------|---------|
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_cpu_utilization"></a> [cpu\_utilization](#module\_cpu\_utilization) | ../../widgets/xy | n/a |
| <a name="module_disk_usage"></a> [disk\_usage](#module\_disk\_usage) | ../../widgets/xy | n/a |
| <a name="module_instance_count"></a> [instance\_count](#module\_instance\_count) | ../../widgets/xy | n/a |
| <a name="module_memory_utilization"></a> [memory\_utilization](#module\_memory\_utilization) | ../../widgets/xy | n/a |
| <a name="module_received_bytes"></a> [received\_bytes](#module\_received\_bytes) | ../../widgets/xy | n/a |
Expand Down
58 changes: 58 additions & 0 deletions modules/gke/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | n/a |
| <a name="provider_google-beta"></a> [google-beta](#provider\_google-beta) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [google-beta_google_container_node_pool.pools](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_container_node_pool) | resource |
| [google_compute_firewall.master_webhook](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_firewall) | resource |
| [google_container_cluster.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster) | resource |
| [google_project_iam_member.cluster](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
| [google_service_account.cluster_default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cluster_autoscaling"></a> [cluster\_autoscaling](#input\_cluster\_autoscaling) | Enabling of node auto-provisioning | `bool` | `false` | no |
| <a name="input_cluster_autoscaling_cpu_limits"></a> [cluster\_autoscaling\_cpu\_limits](#input\_cluster\_autoscaling\_cpu\_limits) | cluster autoscaling cpu limits | <pre>object({<br/> resource_type = optional(string, "cpu")<br/> minimum = optional(number, 4)<br/> maximum = optional(number, 10)<br/> })</pre> | `{}` | no |
| <a name="input_cluster_autoscaling_memory_limits"></a> [cluster\_autoscaling\_memory\_limits](#input\_cluster\_autoscaling\_memory\_limits) | cluster autoscaling memory limits | <pre>object({<br/> resource_type = optional(string, "memory"),<br/> minimum = optional(number, 8)<br/> maximum = optional(number, 80)<br/> })</pre> | `null` | no |
| <a name="input_cluster_autoscaling_profile"></a> [cluster\_autoscaling\_profile](#input\_cluster\_autoscaling\_profile) | cluster autoscaling profile | `string` | `null` | no |
| <a name="input_cluster_autoscaling_provisioning_defaults"></a> [cluster\_autoscaling\_provisioning\_defaults](#input\_cluster\_autoscaling\_provisioning\_defaults) | cluster autoscaling provisioning defaults | <pre>object({<br/> disk_size = optional(number, null)<br/> disk_type = optional(string, null)<br/> shielded_instance_config = optional(object({<br/> enable_secure_boot = optional(bool, null)<br/> enable_integrity_monitoring = optional(bool, null)<br/> }), null)<br/> management = optional(object({<br/> auto_upgrade = optional(bool, null)<br/> auto_repair = optional(bool, null)<br/> }), null)<br/> })</pre> | `null` | no |
| <a name="input_extra_roles"></a> [extra\_roles](#input\_extra\_roles) | Extra roles to add to the cluster's default service account | `map(string)` | `{}` | no |
| <a name="input_master_ipv4_cidr_block"></a> [master\_ipv4\_cidr\_block](#input\_master\_ipv4\_cidr\_block) | If specified, will use this CIDR block for the master's IP address | `any` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | n/a | `any` | n/a | yes |
| <a name="input_network"></a> [network](#input\_network) | n/a | `any` | n/a | yes |
| <a name="input_pools"></a> [pools](#input\_pools) | n/a | <pre>map(object({<br/> min_node_count = optional(number, 1)<br/> max_node_count = optional(number, 1)<br/> machine_type = optional(string, "c3-standard-4")<br/> disk_type = optional(string, "pd-balanced")<br/> disk_size = optional(number, 100)<br/> ephemeral_storage_local_ssd_count = optional(number, 0)<br/> spot = optional(bool, false)<br/> gvisor = optional(bool, false)<br/> labels = optional(map(string), {})<br/> taints = optional(list(object({<br/> key = string<br/> value = string<br/> effect = string<br/> })), [])<br/> }))</pre> | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | n/a | `any` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | Always create a regional cluster since GKE doesn't charge differently for regional/zonal clusters. Rather, we configure the node locations using `var.zones` | `any` | n/a | yes |
| <a name="input_release_channel"></a> [release\_channel](#input\_release\_channel) | GKE release channel | `string` | `"REGULAR"` | 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_squad"></a> [squad](#input\_squad) | squad label to apply to the service. | `string` | `""` | no |
| <a name="input_subnetwork"></a> [subnetwork](#input\_subnetwork) | n/a | `any` | n/a | yes |
| <a name="input_zones"></a> [zones](#input\_zones) | If specified, will spread nodes across these zones | `any` | `null` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_cluster_ca_certificate"></a> [cluster\_ca\_certificate](#output\_cluster\_ca\_certificate) | n/a |
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | n/a |
| <a name="output_cluster_id"></a> [cluster\_id](#output\_cluster\_id) | n/a |
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | n/a |
| <a name="output_service_account_email"></a> [service\_account\_email](#output\_service\_account\_email) | n/a |
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion modules/regional-go-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ No requirements.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_containers"></a> [containers](#input\_containers) | The containers to run in the service. Each container will be run in each region. | <pre>map(object({<br/> source = object({<br/> base_image = optional(string, "cgr.dev/chainguard/static:latest-glibc")<br/> working_dir = string<br/> importpath = string<br/> env = optional(list(string), [])<br/> })<br/> args = optional(list(string), [])<br/> ports = optional(list(object({<br/> name = optional(string, "http1")<br/> container_port = number<br/> })), [])<br/> resources = optional(<br/> object(<br/> {<br/> limits = optional(object(<br/> {<br/> cpu = string<br/> memory = string<br/> }<br/> ), null)<br/> cpu_idle = optional(bool, true)<br/> startup_cpu_boost = optional(bool, true)<br/> }<br/> ),<br/> {<br/> cpu_idle = true<br/> }<br/> )<br/> env = optional(list(object({<br/> name = string<br/> value = optional(string)<br/> value_source = optional(object({<br/> secret_key_ref = object({<br/> secret = string<br/> version = string<br/> })<br/> }), null)<br/> })), [])<br/> regional-env = optional(list(object({<br/> name = string<br/> value = map(string)<br/> })), [])<br/> volume_mounts = optional(list(object({<br/> name = string<br/> mount_path = string<br/> })), [])<br/> }))</pre> | n/a | yes |
| <a name="input_containers"></a> [containers](#input\_containers) | The containers to run in the service. Each container will be run in each region. | <pre>map(object({<br/> source = object({<br/> base_image = optional(string, "cgr.dev/chainguard/static:latest-glibc")<br/> working_dir = string<br/> importpath = string<br/> env = optional(list(string), [])<br/> })<br/> args = optional(list(string), [])<br/> ports = optional(list(object({<br/> name = optional(string, "http1")<br/> container_port = number<br/> })), [])<br/> resources = optional(<br/> object(<br/> {<br/> limits = optional(object(<br/> {<br/> cpu = string<br/> memory = string<br/> }<br/> ), null)<br/> cpu_idle = optional(bool, true)<br/> startup_cpu_boost = optional(bool, true)<br/> }<br/> ),<br/> {<br/> cpu_idle = true<br/> }<br/> )<br/> env = optional(list(object({<br/> name = string<br/> value = optional(string)<br/> value_source = optional(object({<br/> secret_key_ref = object({<br/> secret = string<br/> version = string<br/> })<br/> }), null)<br/> })), [])<br/> regional-env = optional(list(object({<br/> name = string<br/> value = map(string)<br/> })), [])<br/> volume_mounts = optional(list(object({<br/> name = string<br/> mount_path = string<br/> })), [])<br/> startup_probe = optional(object({<br/> initial_delay_seconds = optional(number)<br/> // GCP Terraform provider defaults differ from Cloud Run defaults.<br/> // See https://cloud.google.com/run/docs/configuring/healthchecks#tcp-startup-probe<br/> period_seconds = optional(number, 240)<br/> timeout_seconds = optional(number, 240)<br/> failure_threshold = optional(number, 1)<br/> http_get = optional(object({<br/> path = string<br/> port = optional(number)<br/> }), null)<br/> tcp_socket = optional(object({<br/> port = optional(number)<br/> }), null)<br/> grpc = optional(object({<br/> service = optional(string)<br/> port = optional(number)<br/> }), null)<br/> }))<br/> liveness_probe = optional(object({<br/> initial_delay_seconds = optional(number)<br/> // GCP Terraform provider defaults differ from Cloud Run defaults.<br/> // See https://cloud.google.com/run/docs/configuring/healthchecks#tcp-startup-probe<br/> period_seconds = optional(number, 240)<br/> timeout_seconds = optional(number, 240)<br/> failure_threshold = optional(number, 1)<br/> http_get = optional(object({<br/> path = string<br/> port = optional(number)<br/> }), null)<br/> tcp_socket = optional(object({<br/> port = optional(number)<br/> }), null)<br/> grpc = optional(object({<br/> service = optional(string)<br/> port = optional(number)<br/> }), null)<br/> }))<br/> }))</pre> | n/a | yes |
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Whether to enable delete protection for the service. | `bool` | `true` | no |
| <a name="input_egress"></a> [egress](#input\_egress) | Which type of egress traffic to send through the VPC.<br/><br/>- ALL\_TRAFFIC sends all traffic through regional VPC network<br/>- PRIVATE\_RANGES\_ONLY sends only traffic to private IP addresses through regional VPC network | `string` | `"ALL_TRAFFIC"` | no |
| <a name="input_enable_profiler"></a> [enable\_profiler](#input\_enable\_profiler) | Enable cloud profiler. | `bool` | `false` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/regional-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_containers"></a> [containers](#input\_containers) | The containers to run in the service. Each container will be run in each region. | <pre>map(object({<br/> image = string<br/> args = optional(list(string), [])<br/> ports = optional(list(object({<br/> name = optional(string, "http1")<br/> container_port = number<br/> })), [])<br/> resources = optional(<br/> object(<br/> {<br/> limits = optional(object(<br/> {<br/> cpu = string<br/> memory = string<br/> }<br/> ), null)<br/> cpu_idle = optional(bool, true)<br/> startup_cpu_boost = optional(bool, true)<br/> }<br/> ),<br/> {<br/> cpu_idle = true<br/> }<br/> )<br/> env = optional(list(object({<br/> name = string<br/> value = optional(string)<br/> value_source = optional(object({<br/> secret_key_ref = object({<br/> secret = string<br/> version = string<br/> })<br/> }), null)<br/> })), [])<br/> regional-env = optional(list(object({<br/> name = string<br/> value = map(string)<br/> })), [])<br/> volume_mounts = optional(list(object({<br/> name = string<br/> mount_path = string<br/> })), [])<br/> }))</pre> | n/a | yes |
| <a name="input_containers"></a> [containers](#input\_containers) | The containers to run in the service. Each container will be run in each region. | <pre>map(object({<br/> image = string<br/> args = optional(list(string), [])<br/> ports = optional(list(object({<br/> name = optional(string, "http1")<br/> container_port = number<br/> })), [])<br/> resources = optional(<br/> object(<br/> {<br/> limits = optional(object(<br/> {<br/> cpu = string<br/> memory = string<br/> }<br/> ), null)<br/> cpu_idle = optional(bool, true)<br/> startup_cpu_boost = optional(bool, true)<br/> }<br/> ),<br/> {<br/> cpu_idle = true<br/> }<br/> )<br/> env = optional(list(object({<br/> name = string<br/> value = optional(string)<br/> value_source = optional(object({<br/> secret_key_ref = object({<br/> secret = string<br/> version = string<br/> })<br/> }), null)<br/> })), [])<br/> regional-env = optional(list(object({<br/> name = string<br/> value = map(string)<br/> })), [])<br/> volume_mounts = optional(list(object({<br/> name = string<br/> mount_path = string<br/> })), [])<br/> startup_probe = optional(object({<br/> initial_delay_seconds = optional(number)<br/> // GCP Terraform provider defaults differ from Cloud Run defaults.<br/> // See https://cloud.google.com/run/docs/configuring/healthchecks#tcp-startup-probe<br/> period_seconds = optional(number, 240)<br/> timeout_seconds = optional(number, 240)<br/> failure_threshold = optional(number, 1)<br/> http_get = optional(object({<br/> path = string<br/> port = optional(number)<br/> }), null)<br/> tcp_socket = optional(object({<br/> port = optional(number)<br/> }), null)<br/> grpc = optional(object({<br/> service = optional(string)<br/> port = optional(number)<br/> }), null)<br/> }))<br/> liveness_probe = optional(object({<br/> initial_delay_seconds = optional(number)<br/> // GCP Terraform provider defaults differ from Cloud Run defaults.<br/> // See https://cloud.google.com/run/docs/configuring/healthchecks#tcp-startup-probe<br/> period_seconds = optional(number, 240)<br/> timeout_seconds = optional(number, 240)<br/> failure_threshold = optional(number, 1)<br/> http_get = optional(object({<br/> path = string<br/> port = optional(number)<br/> }), null)<br/> tcp_socket = optional(object({<br/> port = optional(number)<br/> }), null)<br/> grpc = optional(object({<br/> service = optional(string)<br/> port = optional(number)<br/> }), null)<br/> }))<br/> }))</pre> | n/a | yes |
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Whether to enable delete protection for the service. | `bool` | `true` | no |
| <a name="input_egress"></a> [egress](#input\_egress) | Which type of egress traffic to send through the VPC.<br/><br/>- ALL\_TRAFFIC sends all traffic through regional VPC network<br/>- PRIVATE\_RANGES\_ONLY sends only traffic to private IP addresses through regional VPC network | `string` | `"ALL_TRAFFIC"` | no |
| <a name="input_enable_profiler"></a> [enable\_profiler](#input\_enable\_profiler) | Enable cloud profiler. | `bool` | `false` | no |
Expand Down
7 changes: 7 additions & 0 deletions modules/regional-service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ resource "google_cloud_run_v2_service" "this" {
port = tcp_socket.value.port
}
}
dynamic "grpc" {
for_each = startup_probe.value.grpc != null ? { "" : startup_probe.value.grpc } : {}
content {
service = grpc.value.service
port = grpc.value.port
}
}

initial_delay_seconds = startup_probe.value.initial_delay_seconds
period_seconds = startup_probe.value.period_seconds
Expand Down
Loading

0 comments on commit 5e6a5f9

Please sign in to comment.