Skip to content

Commit f827caa

Browse files
Eduardo Lopezczimergebot
Eduardo Lopez
authored andcommitted
[fix] Added more information to the github webhooks collector Readme (#113)
[fix] Added more information to the github webhooks collector Readme
1 parent 22e21f1 commit f827caa

File tree

4 files changed

+35
-9
lines changed

4 files changed

+35
-9
lines changed

aws-aurora-postgres/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module "db" {
4141
| database\_subnet\_group | The name of an existing database subnet group to use. | string | n/a | yes |
4242
| database\_username | Default user to be created. | string | n/a | yes |
4343
| db\_parameters | Instance params you can set. [Doc](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.html#AuroraPostgreSQL.Reference.Parameters.Instance) | list | `<list>` | no |
44-
| engine\_version | The version of Postgres to use. | string | `"9.6"` | no |
44+
| engine\_version | The version of Postgres to use. | string | `"10"` | no |
4545
| env | Env for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
4646
| iam\_database\_authentication\_enabled | | string | `"false"` | no |
4747
| ingress\_cidr\_blocks | A list of CIDR blocks that should be allowed to communicate with this Aurora cluster. | list | n/a | yes |

github-webhooks-to-s3/README.md

+27-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
<!-- START -->
2-
Accept GitHub webhooks to S3. Keeps track of events such as pushing code to a repository.
1+
# GitHub Webhooks to S3
2+
3+
This module will configure an aggregator for GitHub webhooks. It sets up an API Gateway with a Lambda that will authenticate incomming webhooks from GitHub and then use Firehose to store these events into S3. This module will configure the necessary IAM Roles, S3 bucket, API Gateway, and Firehose resources.
4+
5+
## Usage
6+
- Create a Webhook you would like to capture in GitHub and point it at your `var.fqdn`.
7+
- API Gateway relies on ACM Certificates in us-east-1
8+
- This module reads secrets from the AWS ParamStore using [chamber](https://github.com/segmentio/chamber).You can write the GitHub validation secret `AWS_PROFILE=<your profile> chamber write <var.project>-<var.env>-<var.service> github_secret <the secret>`
9+
10+
```hcl
11+
module "archiver" {
12+
// Replace with latest cztack stable release https://github.com/chanzuckerberg/cztack/releases
13+
source = "github.com/chanzuckerberg/cztack//github-webhooks-to-s3?ref=master"
14+
15+
env = "${var.env}"
16+
project = "${var.project}"
17+
owner = "${var.owner}"
18+
service = "${var.component}"
319
20+
fqdn = "github.foo.bar.com"
21+
certificate_arn = "..." // This MUST be in us-east-1 region
22+
route53_zone_id = "..." // Route53 zone to write records to
23+
}
24+
25+
```
26+
27+
<!-- START -->
428
## Inputs
529

630
| Name | Description | Type | Default | Required |
@@ -14,11 +38,7 @@ Accept GitHub webhooks to S3. Keeps track of events such as pushing code to a re
1438
| owner | Owner for tagging and naming. | string | n/a | yes |
1539
| project | Project for tagging and naming. | string | n/a | yes |
1640
| route53\_zone\_id | The route53 zone id for fqdn's domain | string | n/a | yes |
41+
| s3\_prefix | Firehose will add this prefix to files it writes to the s3 bucket | string | `""` | no |
1742
| service | Service for tagging and naming. | string | n/a | yes |
1843

19-
## Outputs
20-
21-
| Name | Description |
22-
|------|-------------|
23-
2444
<!-- END -->

github-webhooks-to-s3/firehose.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ resource "aws_kinesis_firehose_delivery_stream" "firehose" {
7878
s3_configuration {
7979
role_arn = "${aws_iam_role.firehose.arn}"
8080
bucket_arn = "${module.bucket.arn}"
81-
prefix = ""
81+
prefix = "${var.s3_prefix}"
8282
compression_format = "GZIP"
8383

8484
cloudwatch_logging_options {

github-webhooks-to-s3/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ variable "iam_path" {
4949
type = "string"
5050
default = "/"
5151
}
52+
53+
variable "s3_prefix" {
54+
type = "string"
55+
default = ""
56+
description = "Firehose will add this prefix to files it writes to the s3 bucket"
57+
}

0 commit comments

Comments
 (0)