Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <[email protected]>
  • Loading branch information
k4leung4 committed Oct 24, 2024
1 parent 34ebc20 commit dcb3cee
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 54 deletions.
3 changes: 1 addition & 2 deletions modules/bucket-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ No requirements.
| Name | Source | Version |
|------|--------|---------|
| <a name="module_authorize-delivery"></a> [authorize-delivery](#module\_authorize-delivery) | ../authorize-private-service | n/a |
| <a name="module_dashboard-json"></a> [dashboard-json](#module\_dashboard-json) | ../dashboard/json | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../dashboard | n/a |
| <a name="module_http"></a> [http](#module\_http) | ../dashboard/sections/http | n/a |
| <a name="module_layout"></a> [layout](#module\_layout) | ../dashboard/sections/layout | n/a |
| <a name="module_logs"></a> [logs](#module\_logs) | ../dashboard/sections/logs | n/a |
Expand All @@ -96,7 +96,6 @@ No requirements.
| Name | Type |
|------|------|
| [google-beta_google_project_service_identity.pubsub](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_project_service_identity) | resource |
| [google_monitoring_dashboard.dashboard](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
| [google_pubsub_subscription.dead-letter-pull-sub](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription) | resource |
| [google_pubsub_subscription.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription) | resource |
| [google_pubsub_subscription_iam_binding.allow-pubsub-to-ack](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription_iam_binding) | resource |
Expand Down
2 changes: 1 addition & 1 deletion modules/bucket-events/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
3 changes: 1 addition & 2 deletions modules/cloudevent-broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ No requirements.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_dashboard-json"></a> [dashboard-json](#module\_dashboard-json) | ../dashboard/json | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../dashboard | n/a |
| <a name="module_http"></a> [http](#module\_http) | ../dashboard/sections/http | n/a |
| <a name="module_layout"></a> [layout](#module\_layout) | ../dashboard/sections/layout | n/a |
| <a name="module_logs"></a> [logs](#module\_logs) | ../dashboard/sections/logs | n/a |
Expand All @@ -98,7 +98,6 @@ No requirements.

| Name | Type |
|------|------|
| [google_monitoring_dashboard.dashboard](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
| [google_pubsub_topic.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic) | resource |
| [google_pubsub_topic_iam_binding.ingress-publishes-events](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic_iam_binding) | resource |
| [google_service_account.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudevent-broker/ingress.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
10 changes: 5 additions & 5 deletions modules/dashboard/alerts/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ SPDX-License-Identifier: Apache-2.0
module "alerts" {
for_each = var.alerts

source = "../widgets/alert"
title = each.key
source = "../widgets/alert"
title = each.key
alert_name = each.value
}

Expand All @@ -20,7 +20,7 @@ locals {
widgets = [for x in keys(var.alerts) : module.alerts[x].widget]

tiles = [for x in range(length(local.widgets)) : {
yPos = floor(x/2) * local.unit,
yPos = floor(x / 2) * local.unit,
xPos = (x % local.columns) * local.unit,
height = local.unit,
width = local.unit,
Expand All @@ -29,7 +29,7 @@ locals {
}

module "dashboard" {
source = ".."
source = "../"

object = {
displayName = var.title
Expand All @@ -45,5 +45,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
17 changes: 7 additions & 10 deletions modules/dashboard/cloudevent-receiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ No requirements.

## Providers

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

## Modules

| Name | Source | Version |
|------|--------|---------|
| <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_errgrp"></a> [errgrp](#module\_errgrp) | ../sections/errgrp | n/a |
| <a name="module_github"></a> [github](#module\_github) | ../sections/github | n/a |
| <a name="module_grpc"></a> [grpc](#module\_grpc) | ../sections/grpc | n/a |
Expand All @@ -92,16 +90,13 @@ No requirements.
| <a name="module_logs"></a> [logs](#module\_logs) | ../sections/logs | n/a |
| <a name="module_resources"></a> [resources](#module\_resources) | ../sections/resources | n/a |
| <a name="module_subscription"></a> [subscription](#module\_subscription) | ../sections/subscription | n/a |
| <a name="module_trigger-dashboard-jsons"></a> [trigger-dashboard-jsons](#module\_trigger-dashboard-jsons) | ../json | n/a |
| <a name="module_trigger-dashboards"></a> [trigger-dashboards](#module\_trigger-dashboards) | ../ | n/a |
| <a name="module_trigger_layout"></a> [trigger\_layout](#module\_trigger\_layout) | ../sections/layout | 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 |
| [google_monitoring_dashboard.trigger_dashboards](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
No resources.

## Inputs

Expand All @@ -119,5 +114,7 @@ No requirements.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_json"></a> [json](#output\_json) | n/a |
<!-- END_TF_DOCS -->
8 changes: 4 additions & 4 deletions modules/dashboard/cloudevent-receiver/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.trigger_dashboard.google_monitoring_dashboard.dashboard
to = module.trigger_dashboard.google_monitoring_dashboard.dashboard
}

output "json" {
value = {
for k,v in module.dashboard : k => v.json
for k, v in module.dashboard : k => v.json
}
}

Expand All @@ -116,7 +116,7 @@ output "json" {
module "trigger_layout" {
for_each = var.split_triggers ? var.triggers : {}

source = "../sections/layout"
source = "../sections/layout"
sections = concat([module.subscription[each.key].section],
[
module.errgrp.section,
Expand Down Expand Up @@ -161,5 +161,5 @@ module "trigger-dashboards" {

moved {
from = google_monitoring_dashboard.trigger_dashboards
to = module.trigger_dashboards.google_monitoring_dashboard.dashboard
to = module.trigger_dashboards.google_monitoring_dashboard.dashboard
}
10 changes: 3 additions & 7 deletions modules/dashboard/job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ No requirements.

## Providers

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

## Modules

| Name | Source | Version |
|------|--------|---------|
| <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_errgrp"></a> [errgrp](#module\_errgrp) | ../sections/errgrp | n/a |
| <a name="module_layout"></a> [layout](#module\_layout) | ../sections/layout | n/a |
| <a name="module_logs"></a> [logs](#module\_logs) | ../sections/logs | n/a |
Expand All @@ -52,9 +50,7 @@ No requirements.

## 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
4 changes: 2 additions & 2 deletions modules/dashboard/job/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module "layout" {
}

module "dashboard" {
source = ".."
source = "../"

object = {
displayName = "Cloud Run Job: ${var.job_name}"
Expand All @@ -59,5 +59,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
10 changes: 3 additions & 7 deletions modules/dashboard/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ 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) | ../sections/alerts | 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_errgrp"></a> [errgrp](#module\_errgrp) | ../sections/errgrp | n/a |
| <a name="module_github"></a> [github](#module\_github) | ../sections/github | n/a |
| <a name="module_gorm"></a> [gorm](#module\_gorm) | ../sections/gorm | n/a |
Expand All @@ -75,9 +73,7 @@ No requirements.

## 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
4 changes: 2 additions & 2 deletions modules/dashboard/service/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module "layout" {
}

module "dashboard" {
source = ".."
source = "../"

object = {
displayName = "Cloud Run Service: ${var.service_name}"
Expand All @@ -96,5 +96,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
2 changes: 1 addition & 1 deletion modules/dashboard/widgets/xy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ output "widget" {
}]
thresholds = [
for threshold in var.thresholds : {
value = threshold
value = threshold
targetAxis = "Y1"
}
],
Expand Down
3 changes: 2 additions & 1 deletion modules/github-bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ No requirements.
| Name | Source | Version |
|------|--------|---------|
| <a name="module_cloudevent-trigger"></a> [cloudevent-trigger](#module\_cloudevent-trigger) | ../cloudevent-trigger | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | chainguard-dev/common/infra//modules/dashboard/cloudevent-receiver | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../dashboard/cloudevent-receiver | n/a |
| <a name="module_service"></a> [service](#module\_service) | ../regional-go-service | n/a |

## Resources
Expand Down Expand Up @@ -126,6 +126,7 @@ No requirements.

| Name | Description |
|------|-------------|
| <a name="output_json"></a> [json](#output\_json) | n/a |
| <a name="output_serviceaccount-email"></a> [serviceaccount-email](#output\_serviceaccount-email) | The email of the service account for the bot. |
| <a name="output_serviceaccount-id"></a> [serviceaccount-id](#output\_serviceaccount-id) | The ID of the service account for the bot. |
<!-- END_TF_DOCS -->
3 changes: 1 addition & 2 deletions modules/github-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ No requirements.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_dashboard-json"></a> [dashboard-json](#module\_dashboard-json) | ../dashboard/json | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../dashboard | n/a |
| <a name="module_http"></a> [http](#module\_http) | ../dashboard/sections/http | n/a |
| <a name="module_layout"></a> [layout](#module\_layout) | ../dashboard/sections/layout | n/a |
| <a name="module_logs"></a> [logs](#module\_logs) | ../dashboard/sections/logs | n/a |
Expand All @@ -148,7 +148,6 @@ No requirements.

| Name | Type |
|------|------|
| [google_monitoring_dashboard.dashboard](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
| [google_service_account.service](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
| [random_string.service-suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
| [google_cloud_run_v2_service.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/cloud_run_v2_service) | data source |
Expand Down
2 changes: 1 addition & 1 deletion modules/github-events/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
3 changes: 1 addition & 2 deletions modules/workqueue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ No requirements.
| <a name="module_change-trigger-calls-dispatcher"></a> [change-trigger-calls-dispatcher](#module\_change-trigger-calls-dispatcher) | ../authorize-private-service | n/a |
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../dashboard/sections/collapsible | n/a |
| <a name="module_cron-trigger-calls-dispatcher"></a> [cron-trigger-calls-dispatcher](#module\_cron-trigger-calls-dispatcher) | ../authorize-private-service | n/a |
| <a name="module_dashboard-json"></a> [dashboard-json](#module\_dashboard-json) | ../dashboard/json | n/a |
| <a name="module_dashboard"></a> [dashboard](#module\_dashboard) | ../dashboard | n/a |
| <a name="module_dispatcher-calls-target"></a> [dispatcher-calls-target](#module\_dispatcher-calls-target) | ../authorize-private-service | n/a |
| <a name="module_dispatcher-logs"></a> [dispatcher-logs](#module\_dispatcher-logs) | ../dashboard/sections/logs | n/a |
| <a name="module_dispatcher-service"></a> [dispatcher-service](#module\_dispatcher-service) | ../regional-go-service | n/a |
Expand All @@ -116,7 +116,6 @@ No requirements.
|------|------|
| [google-beta_google_project_service_identity.pubsub](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_project_service_identity) | resource |
| [google_cloud_scheduler_job.cron](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_scheduler_job) | resource |
| [google_monitoring_dashboard.dashboard](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_dashboard) | resource |
| [google_pubsub_subscription.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription) | resource |
| [google_pubsub_topic.object-change-notifications](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic) | resource |
| [google_pubsub_topic_iam_binding.gcs-publishes-to-topic](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic_iam_binding) | resource |
Expand Down
2 changes: 1 addition & 1 deletion modules/workqueue/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,5 @@ module "dashboard" {

moved {
from = google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
to = module.dashboard.google_monitoring_dashboard.dashboard
}
2 changes: 1 addition & 1 deletion modules/workqueue/testing/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "kubernetes_manifest" "inmem-ksvc" {
},
]
"ports" = [{
"name" = "h2c"
"name" = "h2c"
"containerPort" = 8080
}]
}
Expand Down
4 changes: 2 additions & 2 deletions modules/workqueue/testing/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "receiver" {
depends_on = [ kubernetes_manifest.inmem-ksvc ]
value = "http://${var.name}.${var.namespace}.svc"
depends_on = [kubernetes_manifest.inmem-ksvc]
value = "http://${var.name}.${var.namespace}.svc"
}

0 comments on commit dcb3cee

Please sign in to comment.