https://github.com/maroux/terraform-aws-hedwig-lambda-subscription
https://github.com/maroux/terraform-aws-hedwig-lambda-subscription
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maroux/terraform-aws-hedwig-lambda-subscription
- Owner: maroux
- License: apache-2.0
- Created: 2018-05-15T21:17:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T21:17:50.000Z (about 8 years ago)
- Last Synced: 2025-06-14T11:06:58.923Z (about 1 year ago)
- Language: HCL
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hedwig Lambda Subscription Terraform module
===========================================
[Hedwig](https://github.com/Automatic/hedwig) is a inter-service communication bus that works on AWS SQS/SNS, while keeping things pretty simple and
straight forward. It uses [json schema](http://json-schema.org/) draft v4 for schema validation so all incoming
and outgoing messages are validated against pre-defined schema.
This module provides a custom [Terraform](https://www.terraform.io/) modules for deploying Hedwig infrastructure that
creates Hedwig subscriptions for Hedwig consumer apps hosted on AWS Lambda.
## Usage
```hcl
module "topic-dev-user-updated-v1" {
source = "Automatic/hedwig-topic/aws"
topic = "dev-user-updated-v1"
}
resource "aws_lambda_function" "dev-myFunction" {
...
}
module "sub-dev-myapp-dev-user-updated" {
source = "Automatic/hedwig-lambda-subscription/aws"
function = "${aws_lambda_function.dev-myFunction.arn}"
function_name = "${aws_lambda_function.dev-myFunction.function_name}"
function_qualifier = "deployed"
topic = "${module.topic-dev-user-updated-v1.arn}"
}
```
## Lambda Function Config
Following things are required in your Lambda function config for publishing:
Role policy should include:
```hcl
statement {
actions = [
"SNS:Publish"
]
resources = [
"arn:aws:sns:::hedwig-*"
]
}
```
## Release Notes
[Github Releases](https://github.com/Automatic/terraform-aws-hedwig-lambda-subscription/releases)
## How to publish
Go to [Terraform Registry](https://registry.terraform.io/modules/Automatic/hedwig-lambda-subscription/aws), and Resync
module.