Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <[email protected]>
  • Loading branch information
k4leung4 committed Oct 3, 2024
1 parent 5f1e83b commit ef22815
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion modules/audit-serviceaccount/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "google_monitoring_alert_policy" "generate-access-token" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
2 changes: 1 addition & 1 deletion modules/bucket-events/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource "google_service_account_iam_binding" "allow-pubsub-to-mint-tokens" {
}

module "audit-delivery-serviceaccount" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down
2 changes: 1 addition & 1 deletion modules/cloudevent-recorder/bigquery.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "google_service_account_iam_binding" "provisioner-acts-as-import-identi
}

module "audit-import-serviceaccount" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down
2 changes: 1 addition & 1 deletion modules/cloudevent-recorder/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "google_storage_bucket" "recorder" {
data "google_client_openid_userinfo" "me" {}

resource "google_monitoring_alert_policy" "bucket-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudevent-trigger/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "google_service_account_iam_binding" "allow-pubsub-to-mint-tokens" {
}

module "audit-trigger-serviceaccount" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down
2 changes: 1 addition & 1 deletion modules/configmap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data "google_client_openid_userinfo" "me" {}

// Create an alert policy to notify if the secret is accessed by an unauthorized entity.
resource "google_monitoring_alert_policy" "anomalous-secret-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
4 changes: 2 additions & 2 deletions modules/cron/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ resource "google_service_account" "delivery" {
}

module "audit-delivery-serviceaccount" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down Expand Up @@ -284,7 +284,7 @@ data "google_client_openid_userinfo" "me" {}

// Create an alert policy to notify if the job is accessed by an unauthorized entity.
resource "google_monitoring_alert_policy" "anomalous-job-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
2 changes: 1 addition & 1 deletion modules/github-gsa/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ resource "google_service_account_iam_binding" "allow-impersonation" {
// Create an auditing policy to ensure that tokens are only issued for identities
// matching our expectations.
module "audit-usage" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down
4 changes: 2 additions & 2 deletions modules/regional-service/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "audit-serviceaccount" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

source = "../audit-serviceaccount"

Expand Down Expand Up @@ -284,7 +284,7 @@ data "google_client_openid_userinfo" "me" {}

// Create an alert policy to notify if the service is accessed by an unauthorized entity.
resource "google_monitoring_alert_policy" "anomalous-service-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
2 changes: 1 addition & 1 deletion modules/secret/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data "google_project" "project" { project_id = var.project_id }

// Create an alert policy to notify if the secret is accessed by an unauthorized entity.
resource "google_monitoring_alert_policy" "anomalous-secret-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
2 changes: 1 addition & 1 deletion modules/serverless-gclb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ locals {
}

resource "google_monitoring_alert_policy" "abnormal-gclb-access" {
count = len(var.notification_channels) > 0 ? 1 : 0
count = length(var.notification_channels) > 0 ? 1 : 0

# In the absence of data, incident will auto-close after an hour
alert_strategy {
Expand Down
6 changes: 3 additions & 3 deletions modules/workqueue/dispatcher.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Compute a suffix that satisfies the regex:
// ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
resource "random_string" "dispatcher" {
length = 30 - length(local.sa_prefix)
length = 30 = length(local.sa_prefix)
special = false
upper = false
}
Expand Down Expand Up @@ -79,7 +79,7 @@ module "dispatcher-service" {
// Compute a suffix that satisfies the regex:
// ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
resource "random_string" "cron-trigger" {
length = 30 - length(local.sa_prefix)
length = 30 = length(local.sa_prefix)
special = false
upper = false
}
Expand Down Expand Up @@ -133,7 +133,7 @@ resource "google_cloud_scheduler_job" "cron" {
// Compute a suffix that satisfies the regex:
// ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
resource "random_string" "change-trigger" {
length = 30 - length(local.sa_prefix)
length = 30 = length(local.sa_prefix)
special = false
upper = false
}
Expand Down
2 changes: 1 addition & 1 deletion modules/workqueue/receiver.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Compute a suffix that satisfies the regex:
// ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
resource "random_string" "receiver" {
length = 30 - length(local.sa_prefix)
length = 30 = length(local.sa_prefix)
special = false
upper = false
}
Expand Down

0 comments on commit ef22815

Please sign in to comment.