Skip to content

Commit 98d9766

Browse files
committed
fix
Signed-off-by: Kenny Leung <[email protected]>
1 parent 5f1e83b commit 98d9766

File tree

16 files changed

+22
-22
lines changed

16 files changed

+22
-22
lines changed

modules/audit-serviceaccount/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "google_monitoring_alert_policy" "generate-access-token" {
2-
count = len(var.notification_channels) > 0 ? 1 : 0
2+
count = length(var.notification_channels) > 0 ? 1 : 0
33

44
# In the absence of data, incident will auto-close after an hour
55
alert_strategy {

modules/bucket-events/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ resource "google_service_account_iam_binding" "allow-pubsub-to-mint-tokens" {
5656
}
5757

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

6161
source = "../audit-serviceaccount"
6262

modules/cloudevent-recorder/bigquery.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ resource "google_service_account_iam_binding" "provisioner-acts-as-import-identi
7575
}
7676

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

8080
source = "../audit-serviceaccount"
8181

modules/cloudevent-recorder/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ resource "google_storage_bucket" "recorder" {
5151
data "google_client_openid_userinfo" "me" {}
5252

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

5656
# In the absence of data, incident will auto-close after an hour
5757
alert_strategy {

modules/cloudevent-trigger/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resource "google_service_account_iam_binding" "allow-pubsub-to-mint-tokens" {
3131
}
3232

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

3636
source = "../audit-serviceaccount"
3737

modules/configmap/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module "my-configmap" {
2222
EOT
2323
2424
# Optionally: channels to notify if this configuration is manipulated.
25-
notification-channels = [ ... ]
25+
notification_channels = [ ... ]
2626
}
2727
2828
module "foo-service" {
@@ -90,7 +90,7 @@ No modules.
9090
|------|-------------|------|---------|:--------:|
9191
| <a name="input_data"></a> [data](#input\_data) | The data to place in the secret. | `string` | n/a | yes |
9292
| <a name="input_name"></a> [name](#input\_name) | The name to give the secret. | `string` | n/a | yes |
93-
| <a name="input_notification-channels"></a> [notification-channels](#input\_notification-channels) | The channels to notify if the configuration data is improperly accessed. | `list(string)` | n/a | yes |
93+
| <a name="input_notification_channels"></a> [notification\_channels](#input\_notification\_channels) | The channels to notify if the configuration data is improperly accessed. | `list(string)` | n/a | yes |
9494
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | n/a | `string` | n/a | yes |
9595
| <a name="input_service-account"></a> [service-account](#input\_service-account) | The email of the service account that will access the secret. | `string` | n/a | yes |
9696

modules/configmap/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data "google_client_openid_userinfo" "me" {}
3030

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

3535
# In the absence of data, incident will auto-close after an hour
3636
alert_strategy {
@@ -77,7 +77,7 @@ resource "google_monitoring_alert_policy" "anomalous-secret-access" {
7777
}
7878
}
7979

80-
notification_channels = var.notification-channels
80+
notification_channels = var.notification_channels
8181

8282
enabled = "true"
8383
project = var.project_id

modules/configmap/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ variable "service-account" {
1717
type = string
1818
}
1919

20-
variable "notification-channels" {
20+
variable "notification_channels" {
2121
description = "The channels to notify if the configuration data is improperly accessed."
2222
type = list(string)
2323
}

modules/cron/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ resource "google_service_account" "delivery" {
218218
}
219219

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

223223
source = "../audit-serviceaccount"
224224

@@ -284,7 +284,7 @@ data "google_client_openid_userinfo" "me" {}
284284

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

289289
# In the absence of data, incident will auto-close after an hour
290290
alert_strategy {

modules/github-events/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module "webhook-secret" {
2121
service-account = google_service_account.service.email
2222
authorized-adder = var.secret_version_adder
2323

24-
notification-channels = var.notification_channels
24+
notification_channels = var.notification_channels
2525
}
2626

2727
module "this" {

modules/github-gsa/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ resource "google_service_account_iam_binding" "allow-impersonation" {
136136
// Create an auditing policy to ensure that tokens are only issued for identities
137137
// matching our expectations.
138138
module "audit-usage" {
139-
count = len(var.notification_channels) > 0 ? 1 : 0
139+
count = length(var.notification_channels) > 0 ? 1 : 0
140140

141141
source = "../audit-serviceaccount"
142142

modules/regional-service/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "audit-serviceaccount" {
2-
count = len(var.notification_channels) > 0 ? 1 : 0
2+
count = length(var.notification_channels) > 0 ? 1 : 0
33

44
source = "../audit-serviceaccount"
55

@@ -284,7 +284,7 @@ data "google_client_openid_userinfo" "me" {}
284284

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

289289
# In the absence of data, incident will auto-close after an hour
290290
alert_strategy {

modules/secret/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module "my-secret" {
2121
authorized-adder = "group:[email protected]"
2222
2323
# Optionally: channels to notify if this secret is manipulated.
24-
notification-channels = [ ... ]
24+
notification_channels = [ ... ]
2525
}
2626
2727
module "foo-service" {
@@ -90,7 +90,7 @@ No modules.
9090
| <a name="input_authorized-adder"></a> [authorized-adder](#input\_authorized-adder) | A member-style representation of the identity authorized to add new secret values (e.g. group:oncall@my-corp.dev). | `string` | n/a | yes |
9191
| <a name="input_create_placeholder_version"></a> [create\_placeholder\_version](#input\_create\_placeholder\_version) | Whether to create a placeholder secret version to avoid bad reference on first deploy. | `bool` | `false` | no |
9292
| <a name="input_name"></a> [name](#input\_name) | The name to give the secret. | `string` | n/a | yes |
93-
| <a name="input_notification-channels"></a> [notification-channels](#input\_notification-channels) | The channels to notify if the configuration data is improperly accessed. | `list(string)` | n/a | yes |
93+
| <a name="input_notification_channels"></a> [notification\_channels](#input\_notification\_channels) | The channels to notify if the configuration data is improperly accessed. | `list(string)` | n/a | yes |
9494
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | n/a | `string` | n/a | yes |
9595
| <a name="input_service-account"></a> [service-account](#input\_service-account) | The email of the service account that will access the secret. | `string` | n/a | yes |
9696

modules/secret/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data "google_project" "project" { project_id = var.project_id }
4141

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

4646
# In the absence of data, incident will auto-close after an hour
4747
alert_strategy {
@@ -82,7 +82,7 @@ resource "google_monitoring_alert_policy" "anomalous-secret-access" {
8282
}
8383
}
8484

85-
notification_channels = var.notification-channels
85+
notification_channels = var.notification_channels
8686

8787
enabled = "true"
8888
project = var.project_id

modules/secret/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ variable "service-account" {
1717
type = string
1818
}
1919

20-
variable "notification-channels" {
20+
variable "notification_channels" {
2121
description = "The channels to notify if the configuration data is improperly accessed."
2222
type = list(string)
2323
}

modules/serverless-gclb/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ locals {
166166
}
167167

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

171171
# In the absence of data, incident will auto-close after an hour
172172
alert_strategy {

0 commit comments

Comments
 (0)