Coder Social home page Coder Social logo

jorenvh1 / terraform-aws-codepipeline-slack-notifications Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kjagiello/terraform-aws-codepipeline-slack-notifications

0.0 1.0 0.0 25 KB

Slack notifications for your AWS CodePipelines.

Python 61.51% HCL 38.49%

terraform-aws-codepipeline-slack-notifications's Introduction

terraform-aws-codepipeline-slack-notifications

Github Actions

A terraform module to set up Slack notifications for your AWS CodePipelines. Available through the Terraform registry.

image

Usage

resource "aws_codepipeline" "example" {
  // ...
}

module "codepipeline_notifications" {
  source  = "kjagiello/codepipeline-slack-notifications/aws"
  version = "1.0.0"

  name          = "codepipeline-notifications"
  namespace     = "kjagiello"
  stage         = "sandbox"
  slack_url     = "https://hooks.slack.com/services/(...)"
  slack_channel = "#notifications"
  codepipelines = [
    aws_codepipeline.example,
  ]
}

Beware that during the initial apply, it might fail with following error:

Error: error creating codestar notification rule: ConfigurationException: AWS CodeStar Notifications could not create the AWS CloudWatch Events managed rule in your AWS account. If this is your first time creating a notification rule, the service-linked role for AWS CodeStar Notifications might not yet exist. Creation of this role might take up to 15 minutes. Until it exists, notification rule creation will fail. Wait 15 minutes, and then try again. If this is is not the first time you are creating a notification rule, there might be a problem with a network connection, or one or more AWS services might be experiencing issues. Verify your network connection and check to see if there are any issues with AWS services in your AWS Region before trying again.

This is due to this module using AWS CodeStar for subscribing to the CodePipeline state changes. The first use of a CodeStar resource automatically creates the required service-linked role, which typically is nearly instantaneous. Just reapply your Terraform plan and you should be good to go.

Module documentation

Requirements

Name Version
terraform >= 0.12
archive ~> 1.3
aws ~> 2.70

Providers

Name Version
archive ~> 1.3
aws ~> 2.70

Inputs

Name Description Type Default Required
attributes List of attributes to add to label list(any) [] no
codepipelines CodePipeline resources that should trigger Slack notifications list(any) n/a yes
event_type_ids The list of event type to trigger a notification on list(any)
[
"codepipeline-pipeline-pipeline-execution-failed",
"codepipeline-pipeline-pipeline-execution-canceled",
"codepipeline-pipeline-pipeline-execution-started",
"codepipeline-pipeline-pipeline-execution-resumed",
"codepipeline-pipeline-pipeline-execution-succeeded",
"codepipeline-pipeline-pipeline-execution-superseded"
]
no
name Name (unique identifier for app or service) string n/a yes
namespace Namespace (e.g. skynet) string n/a yes
slack_channel A slack channel to send the deployment notifications to string n/a yes
slack_emoji The emoji avatar of the user that sends the notifications string ":rocket:" no
slack_url Slack webhook URL for deploy notifications string n/a yes
slack_username The name of the user that sends the notifications string "Deploy Bot" no
stage Stage (e.g. prod, dev, staging) string n/a yes

Outputs

No output.

terraform-aws-codepipeline-slack-notifications's People

Contributors

dirk39 avatar jorenvh1 avatar kjagiello avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.