Skip to content

Commit

Permalink
[fix] Added more information to the github webhooks collector Readme (#…
Browse files Browse the repository at this point in the history
…113)

[fix] Added more information to the github webhooks collector Readme
  • Loading branch information
Eduardo Lopez authored and czimergebot committed Aug 20, 2019
1 parent 22e21f1 commit f827caa
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aws-aurora-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module "db" {
| database\_subnet\_group | The name of an existing database subnet group to use. | string | n/a | yes |
| database\_username | Default user to be created. | string | n/a | yes |
| 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 |
| engine\_version | The version of Postgres to use. | string | `"9.6"` | no |
| engine\_version | The version of Postgres to use. | string | `"10"` | no |
| env | Env for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
| iam\_database\_authentication\_enabled | | string | `"false"` | no |
| ingress\_cidr\_blocks | A list of CIDR blocks that should be allowed to communicate with this Aurora cluster. | list | n/a | yes |
Expand Down
34 changes: 27 additions & 7 deletions github-webhooks-to-s3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
<!-- START -->
Accept GitHub webhooks to S3. Keeps track of events such as pushing code to a repository.
# GitHub Webhooks to S3

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.

## Usage
- Create a Webhook you would like to capture in GitHub and point it at your `var.fqdn`.
- API Gateway relies on ACM Certificates in us-east-1
- 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>`

```hcl
module "archiver" {
// Replace with latest cztack stable release https://github.com/chanzuckerberg/cztack/releases
source = "github.com/chanzuckerberg/cztack//github-webhooks-to-s3?ref=master"
env = "${var.env}"
project = "${var.project}"
owner = "${var.owner}"
service = "${var.component}"
fqdn = "github.foo.bar.com"
certificate_arn = "..." // This MUST be in us-east-1 region
route53_zone_id = "..." // Route53 zone to write records to
}
```

<!-- START -->
## Inputs

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

## Outputs

| Name | Description |
|------|-------------|

<!-- END -->
2 changes: 1 addition & 1 deletion github-webhooks-to-s3/firehose.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "aws_kinesis_firehose_delivery_stream" "firehose" {
s3_configuration {
role_arn = "${aws_iam_role.firehose.arn}"
bucket_arn = "${module.bucket.arn}"
prefix = ""
prefix = "${var.s3_prefix}"
compression_format = "GZIP"

cloudwatch_logging_options {
Expand Down
6 changes: 6 additions & 0 deletions github-webhooks-to-s3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ variable "iam_path" {
type = "string"
default = "/"
}

variable "s3_prefix" {
type = "string"
default = ""
description = "Firehose will add this prefix to files it writes to the s3 bucket"
}

0 comments on commit f827caa

Please sign in to comment.