Hedwig is a inter-service communication bus that works on AWS and GCP, while keeping things pretty simple and straight forward. It allows validation of the message payloads before they are sent, helping to catch cross-component incompatibilities early.
This module provides a custom Terraform modules for deploying Hedwig infrastructure that creates infra for Hedwig consumer app.
module "hedwig" {
source = "cloudchacho/hedwig/google"
pull_consumers = {
myapp : {
subscriptions : {
user-created-v1 : {}
}
labels : {
"app" = "myapp"
"env" = "dev"
}
service_account: "[email protected]"
high_message_count_threshold : 100000
}
other-app : {
subscriptions : {
project-id-user-updated-v1 : {
# cross-project subscription
project : "project-id"
topic : "user-updated-v1"
enable_ordering : true
},
},
labels : {
cost-center : "foo"
},
# override
queue_alert_notification_channels = ["projects/<projectid>/notificationChannels/<other-channelid>"],
# override
dlq_alert_notification_channels = ["projects/<projectid>/notificationChannels/<other-channelid>"],
}
}
topics = {
user-created-v1 : {
service_accounts: ["[email protected]"]
},
user-updated-v1 : {
enable_firehose : true
},
}
queue_alert_notification_channels = ["projects/<projectid>/notificationChannels/<channelid>"]
dlq_alert_notification_channels = ["projects/<projectid>/notificationChannels/<channelid>"]
}
If using a single Google project for multiple environments (e.g. dev/staging/prod), ensure that queue
includes
your environment name.
Naming convention - lowercase alphanumeric and dashes only.
Please note Google's restrictions (if not followed, errors may be confusing and often totally wrong):
The Google queue and subscription names will be prefixed by hedwig-
.
Go to Terraform Registry, and Resync module.