Skip to content

Commit 363bb03

Browse files
committed
Fix support for Cloud Functions v2
1 parent 75db714 commit 363bb03

File tree

1 file changed

+7
-1
lines changed
  • blueprints/cloud-operations/network-dashboard

1 file changed

+7
-1
lines changed

blueprints/cloud-operations/network-dashboard/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,13 @@ module "cloud-function" {
167167
# Internal only doesn't seem to work with CFv2:
168168
ingress_settings = var.cf_version == "V2" ? "ALLOW_ALL" : "ALLOW_INTERNAL_ONLY"
169169

170-
trigger_config = {
170+
trigger_config = var.cf_version == "V2" ? {
171+
v2 = {
172+
event_type = "google.cloud.pubsub.topic.v1.messagePublished"
173+
pubsub_topic = module.pubsub.topic.id
174+
# TODO: service_account_email
175+
}
176+
} : {
171177
v1 = {
172178
event = "google.pubsub.topic.publish"
173179
resource = module.pubsub.topic.id

0 commit comments

Comments
 (0)