Skip to content

Commit

Permalink
Updates to ChatOps - Automated commit (#12)
Browse files Browse the repository at this point in the history
## What
* Adds chatops commands
  - '/test all'
  - '/test bats'
  - '/test readme'
  - '/test terratest'
* Drops codefresh
* Drops slash-command-dispatch
* Removes codefresh badge
* Rebuilds README

## Why
* Change over from codefresh to GH Actions
* Facilitate testing of PRs from forks
  • Loading branch information
Gowiem authored Jul 14, 2020
1 parent 4b68869 commit 4f49ac5
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 145 deletions.
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use this file to define individuals or teams that are responsible for code in a repository.
# Read more: <https://help.github.com/articles/about-codeowners/>
#
# Order is important: the last matching pattern takes the most precedence

# These owners will be the default owners for everything
* @cloudposse/engineering @cloudposse/contributors

# Cloud Posse must review any changes to Makefiles
**/Makefile @cloudposse/engineering
**/Makefile.* @cloudposse/engineering

# Cloud Posse must review any changes to GitHub actions
.github/* @cloudposse/engineering
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help.

[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)

## Describe the Bug
A clear and concise description of what the bug is.

## Expected Behavior
A clear and concise description of what you expected to happen.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Run '....'
3. Enter '....'
4. See error

## Screenshots
If applicable, add screenshots or logs to help explain your problem.

## Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:
- OS: [e.g. Linux, OSX, WSL, etc]
- Version [e.g. 10.15]

## Additional Context
Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
blank_issues_enabled: false

contact_links:

- name: Community Slack Team
url: https://cloudposse.com/slack/
about: |-
Please ask and answer questions here.
- name: Office Hours
url: https://cloudposse.com/office-hours/
about: |-
Join us every Wednesday for FREE Office Hours (lunch & learn).
- name: DevOps Accelerator Program
url: https://cloudposse.com/accelerate/
about: |-
Own your infrastructure in record time. We build it. You drive it.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: 'feature request'
assignees: ''

---

Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).

[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)

## Describe the Feature

A clear and concise description of what the bug is.

## Expected Behavior

A clear and concise description of what you expected to happen.

## Use Case

Is your feature request related to a problem/challenge you are trying to solve? Please provide some additional context of why this feature or capability will be valuable.

## Describe Ideal Solution

A clear and concise description of what you want to happen. If you don't know, that's okay.

## Alternatives Considered

Explain what alternative solutions or features you've considered.

## Additional Context

Add any other context or screenshots about the feature request here.
Empty file.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## what
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
* Use bullet points to be concise and to the point.

## why
* Provide the justifications for the changes (e.g. business case).
* Describe why these changes were made (e.g. why do these commits fix the problem?)
* Use bullet points to be concise and to the point.

## references
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
* Use `closes #123`, if this PR closes a GitHub issue `#123`

37 changes: 37 additions & 0 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: chatops
on:
issue_comment:
types: [created]

jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Handle common commands"
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: rebuild-readme, terraform-fmt
permission: none
issue-type: pull-request

test:
runs-on: ubuntu-latest
steps:
- name: "Checkout commit"
uses: actions/checkout@v2
- name: "Run tests"
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: test
permission: none
issue-type: pull-request
reactions: false


72 changes: 46 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

# terraform-aws-sns-lambda-notify-slack

[![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-sns-lambda-notify-slack?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5dd5aebdb9992a6fa0eedc81) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-sns-lambda-notify-slack.svg)](https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
[![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-sns-lambda-notify-slack.svg)](https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)


Terraform module to provision a lambda function that subscribes to SNS and notifies to Slack.
Expand Down Expand Up @@ -105,38 +105,53 @@ module "notify_slack" {



## Requirements

| Name | Version |
|------|---------|
| terraform | ~> 0.12.0 |
| archive | ~> 1.3 |
| aws | ~> 2.0 |
| local | ~> 1.3 |
| null | ~> 2.1 |
| template | ~> 2.0 |

## Providers

No provider.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| attributes | List of attributes to add to label. | list(string) | `<list>` | no |
| create_sns_topic | Whether to create new SNS topic | bool | `true` | no |
| delimiter | The delimiter to be used in labels. | string | `-` | no |
| enabled | Whether to create all resources | bool | `true` | no |
| kms_key_arn | ARN of the KMS key used for decrypting slack webhook url | string | `` | no |
| name | Name (unique identifier for app or service) | string | - | yes |
| namespace | Namespace (e.g. `cp` or `cloudposse`) | string | `` | no |
| slack_channel | The name of the channel in Slack for notifications | string | - | yes |
| slack_emoji | A custom emoji that will appear on Slack messages | string | `:aws:` | no |
| slack_username | The username that will appear on Slack messages | string | - | yes |
| slack_webhook_url | The URL of Slack webhook | string | - | yes |
| sns_topic_name | Name of the SNS topic to subscribe to. | string | `` | no |
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no |
| tags | Map of key-value pairs to use for tags. | map(string) | `<map>` | no |
|------|-------------|------|---------|:--------:|
| attributes | List of attributes to add to label. | `list(string)` | `[]` | no |
| create\_sns\_topic | Whether to create new SNS topic | `bool` | `true` | no |
| delimiter | The delimiter to be used in labels. | `string` | `"-"` | no |
| enabled | Whether to create all resources | `bool` | `true` | no |
| kms\_key\_arn | ARN of the KMS key used for decrypting slack webhook url | `string` | `""` | no |
| name | Name (unique identifier for app or service) | `string` | n/a | yes |
| namespace | Namespace (e.g. `cp` or `cloudposse`) | `string` | `""` | no |
| slack\_channel | The name of the channel in Slack for notifications | `string` | n/a | yes |
| slack\_emoji | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no |
| slack\_username | The username that will appear on Slack messages | `string` | n/a | yes |
| slack\_webhook\_url | The URL of Slack webhook | `string` | n/a | yes |
| sns\_topic\_name | Name of the SNS topic to subscribe to. | `string` | `""` | no |
| stage | Stage (e.g. `prod`, `dev`, `staging`) | `string` | `""` | no |
| tags | Map of key-value pairs to use for tags. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| lambda_cloudwatch_log_group_arn | The Amazon Resource Name (ARN) specifying the log group |
| lambda_iam_role_arn | The ARN of the IAM role used by Lambda function |
| lambda_iam_role_name | The name of the IAM role used by Lambda function |
| notify_slack_lambda_function_arn | The ARN of the Lambda function |
| notify_slack_lambda_function_invoke_arn | The ARN to be used for invoking Lambda function from API Gateway |
| notify_slack_lambda_function_last_modified | The date Lambda function was last modified |
| notify_slack_lambda_function_name | The name of the Lambda function |
| notify_slack_lambda_function_version | Latest published version of your Lambda function |
| slack_topic_arn | The ARN of the SNS topic from which messages will be sent to Slack |
| lambda\_cloudwatch\_log\_group\_arn | The Amazon Resource Name (ARN) specifying the log group |
| lambda\_iam\_role\_arn | The ARN of the IAM role used by Lambda function |
| lambda\_iam\_role\_name | The name of the IAM role used by Lambda function |
| notify\_slack\_lambda\_function\_arn | The ARN of the Lambda function |
| notify\_slack\_lambda\_function\_invoke\_arn | The ARN to be used for invoking Lambda function from API Gateway |
| notify\_slack\_lambda\_function\_last\_modified | The date Lambda function was last modified |
| notify\_slack\_lambda\_function\_name | The name of the Lambda function |
| notify\_slack\_lambda\_function\_version | Latest published version of your Lambda function |
| slack\_topic\_arn | The ARN of the SNS topic from which messages will be sent to Slack |



Expand Down Expand Up @@ -196,6 +211,10 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our

Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.

## Discourse Forums

Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.

## Newsletter

Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
Expand Down Expand Up @@ -229,7 +248,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)



Expand Down Expand Up @@ -311,6 +330,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=testimonial
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=office_hours
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=newsletter
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=discourse
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=email
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=commercial_support
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-sns-lambda-notify-slack&utm_content=we_love_open_source
Expand Down
18 changes: 0 additions & 18 deletions README.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,50 @@
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#

# Name of this project
name: terraform-aws-sns-lambda-notify-slack

# Logo for this project
#logo: docs/logo.png

# License of this project
license: "APACHE2"

# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-sns-lambda-notify-slack

# Badges to display
badges:
- name: "Codefresh Build Status"
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-sns-lambda-notify-slack?type=cf-1"
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5dd5aebdb9992a6fa0eedc81"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-sns-lambda-notify-slack.svg"
url: "https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"

related:
- name: "terraform-aws-cloudwatch-logs"
description: "Terraform Module to Provide a CloudWatch Logs Endpoint"
url: "https://github.com/cloudposse/terraform-aws-cloudwatch-logs"

- name: "terraform-aws-cloudwatch-flow-logs"
description: "Terraform module for enabling flow logs for vpc and subnets."
url: "https://github.com/cloudposse/terraform-aws-cloudwatch-flow-logs"

- name: "terraform-aws-efs-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EFS"
url: "https://github.com/cloudposse/terraform-aws-efs-cloudwatch-sns-alarms"

- name: "terrform-aws-elasticache-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for ElastiCache"
url: "https://github.com/cloudposse/terraform-aws-elasticache-cloudwatch-sns-alarms"

- name: "terraform-aws-lambda-cloudwatch-sns-alarms"
description: "Terraform module for creating a set of Lambda alarms and outputting to an endpoint"
url: "https://github.com/cloudposse/terraform-aws-lambda-cloudwatch-sns-alarms"

- name: "terraform-aws-rds-cloudwatch-sns-alarms"
description: "Terraform module that configures important RDS alerts using CloudWatch and sends them to an SNS topic"
url: "https://github.com/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms"

- name: "terraform-aws-sqs-cloudwatch-sns-alarms"
description: "Terraform module for creating alarms for SQS and notifying endpoints"
url: "https://github.com/cloudposse/terraform-aws-sqs-cloudwatch-sns-alarms"

# Short description of this project
description: |-
Terraform module to provision a lambda function that subscribes to SNS and notifies to Slack.
# How to use this project
usage: |-
```hcl
Expand All @@ -74,7 +58,6 @@ usage: |-
slack_username = "reporter"
}
```
# Example usage
#examples: |-

Expand All @@ -85,7 +68,6 @@ usage: |-
# Other files to include in this README from the project folder
include:
- "docs/terraform.md"

# Contributors to this project
contributors:
- name: "Anton Babenko"
Expand Down
Loading

0 comments on commit 4f49ac5

Please sign in to comment.