Skip to content

Commit

Permalink
Fix submodule paths in READMEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch committed Jan 3, 2024
1 parent 0949b30 commit 3d115d2
Show file tree
Hide file tree
Showing 25 changed files with 1,095 additions and 42 deletions.
12 changes: 12 additions & 0 deletions hack/update-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

# Update terraform docs
for d in `find . -name '*.tf' -exec dirname {} \; | sort | uniq`; do
echo "###############################################"
echo "# Generating $d"
terraform-docs markdown table \
--output-file README.md \
--output-mode inject \
$d
done
12 changes: 6 additions & 6 deletions modules/cloudevent-broker/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# `cloudevent-broker`

This module provisions a regionalizied Broker abstraction akin to the Knative
"Broker" concept. The dual "Trigger" concept is captured by the sibling
`cloudevent-trigger` module. The intended usage of this module for publishing
"Broker" concept. The dual "Trigger" concept is captured by the sibling
`cloudevent-trigger` module. The intended usage of this module for publishing
events is something like this:

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"
name = "my-networking"
project_id = var.project_id
Expand All @@ -17,7 +17,7 @@ module "networking" {
// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"
name = "my-broker"
project_id = var.project_id
Expand All @@ -28,7 +28,7 @@ module "cloudevent-broker" {
module "foo-emits-events" {
for_each = module.networking.regional-networks
source = "chainguard-dev/common/infra//authorize-private-service"
source = "chainguard-dev/common/infra//modules/authorize-private-service"
project_id = var.project_id
region = each.key
Expand All @@ -40,7 +40,7 @@ module "foo-emits-events" {
// Run a cloud run service as the "foo" service account, and pass in the address
// of the regional ingress endpoint.
module "foo-service" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"
project_id = var.project_id
name = "foo"
Expand Down
6 changes: 3 additions & 3 deletions modules/cloudevent-recorder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ intended usage of this module for publishing events is something like this:
```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"
name = "my-networking"
project_id = var.project_id
Expand All @@ -18,7 +18,7 @@ module "networking" {
// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"
name = "my-broker"
project_id = var.project_id
Expand All @@ -27,7 +27,7 @@ module "cloudevent-broker" {
// Record cloudevents of type com.example.foo and com.example.bar
module "foo-emits-events" {
source = "chainguard-dev/common/infra//cloudevent-recorder"
source = "chainguard-dev/common/infra//modules/cloudevent-recorder"
name = "my-recorder"
project_id = var.project_id
Expand Down
14 changes: 7 additions & 7 deletions modules/cloudevent-trigger/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# `cloudevent-trigger`

This module provisions regionalizied event-triggered services using a Trigger
abstraction akin to the Knative "Trigger" concept. The dual "Broker" concept
is captured by the sibling `cloudevent-broker` module. The intended usage of
this module for consuming events is something like this:
abstraction akin to the Knative "Trigger" concept. The dual "Broker" concept is
captured by the sibling `cloudevent-broker` module. The intended usage of this
module for consuming events is something like this:

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"
name = "my-networking"
project_id = var.project_id
Expand All @@ -17,15 +17,15 @@ module "networking" {
// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"
name = "my-broker"
project_id = var.project_id
regions = module.networking.regional-networks
}
module "bar-service" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"
project_id = var.project_id
name = "bar"
Expand All @@ -48,7 +48,7 @@ module "bar-service" {
module "cloudevent-trigger" {
for_each = module.networking.regional-networks
source = "chainguard-dev/common/infra//cloudevent-trigger"
source = "chainguard-dev/common/infra//modules/cloudevent-trigger"
name = "bar"
project_id = var.project_id
Expand Down
16 changes: 10 additions & 6 deletions modules/dashboard/cloudevent-receiver/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# `dashboard/cloudevent-receiver`

This module provisions a Google Cloud Monitoring dashboard for a regionalized Cloud Run service that receives Cloud Events from one or more `cloudevent-trigger`.
This module provisions a Google Cloud Monitoring dashboard for a regionalized
Cloud Run service that receives Cloud Events from one or more
`cloudevent-trigger`.

It assumes the service has the same name in all regions.

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"
name = "my-networking"
project_id = var.project_id
Expand All @@ -16,7 +18,7 @@ module "networking" {
// Run a regionalized cloud run service "receiver" to handle events.
module "receiver" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"
project_id = var.project_id
name = "receiver"
Expand All @@ -37,7 +39,7 @@ module "receiver" {
module "cloudevent-trigger" {
for_each = module.networking.regional-networks
source = "chainguard-dev/common/infra//cloudevent-trigger"
source = "chainguard-dev/common/infra//modules/cloudevent-trigger"
name = "my-trigger"
project_id = var.project_id
Expand All @@ -53,7 +55,7 @@ module "cloudevent-trigger" {
// Set up a dashboard for a regionalized event handler named "receiver".
module "receiver-dashboard" {
source = "chainguard-dev/common/infra//dashboard/cloudevent-receiver"
source = "chainguard-dev/common/infra//modules/dashboard/cloudevent-receiver"
service_name = "receiver"
triggers = {
Expand All @@ -62,7 +64,9 @@ module "receiver-dashboard" {
}
```

The dashboard it creates includes widgets for service logs, request count, latency (p50,p95,p99), instance count grouped by revision, CPU and memory utilization, startup latency, and sent/received bytes.
The dashboard it creates includes widgets for service logs, request count,
latency (p50,p95,p99), instance count grouped by revision, CPU and memory
utilization, startup latency, and sent/received bytes.

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
5 changes: 3 additions & 2 deletions modules/dashboard/job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ resource "google_cloud_run_v2_job" "sync" {
// Set up a dashboard for a regionalized job named "sync".
module "job-dashboard" {
source = "chainguard-dev/common/infra//dashboard/job"
source = "chainguard-dev/common/infra//modules/dashboard/job"
service_name = google_cloud_run_v2_job.name
}
```

The dashboard it creates includes widgets for job logs, CPU and memory utilization, startup latency, and sent/received bytes.
The dashboard it creates includes widgets for job logs, CPU and memory
utilization, startup latency, and sent/received bytes.

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
70 changes: 70 additions & 0 deletions modules/dashboard/sections/alerts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_alert"></a> [alert](#module\_alert) | ../../widgets/alert | n/a |
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alert"></a> [alert](#input\_alert) | n/a | `string` | n/a | yes |
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |

<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_alert"></a> [alert](#module\_alert) | ../../widgets/alert | n/a |
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alert"></a> [alert](#input\_alert) | n/a | `string` | n/a | yes |
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->

66 changes: 66 additions & 0 deletions modules/dashboard/sections/collapsible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_tiles"></a> [tiles](#input\_tiles) | n/a | `any` | n/a | yes |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |

<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_tiles"></a> [tiles](#input\_tiles) | n/a | `any` | n/a | yes |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->

Loading

0 comments on commit 3d115d2

Please sign in to comment.