mattermost-community / mattermost-plugin-aws-SNS

Plugin that receives SNS notification from Alerts created by AWS CloudWatch and sent via AWS SNS
Apache License 2.0
21 stars 22 forks source link

Cloudformation events #65

Closed ioandim closed 12 months ago

ioandim commented 3 years ago

This pull request adds support for Cloudformation events. The form of a cloudformation event message is the following:

StackId= Timestamp= EventId= LogicalResourceId= Namespace= PhysicalResourceId= PrincipalId= ResourceProperties= ResourceStatus= ResourceStatusReason= ResourceType=

The message is firstly converted to JSON format. Then it is processed in a similar way to the rest of the supported events.

mattermod commented 3 years ago

Hello @ioandim,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement? Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

hanzei commented 3 years ago

Thank you very much for the contribution @ioandim :tada:

Could you please take a look at the CI failures? You can find them here here.

hanzei commented 3 years ago

@stylianosrigas I'm wondering if you would be open on giving this PR a review as a SME on AWS.

ioandim commented 3 years ago

@mickmister I have added a new implementation that includes the errors discussed above. Let me know about your thoughts and ideas on the implemented changes.

ioandim commented 3 years ago

@mickmister We can determine weather the message refers to a Cloudformation event notification by checking if the StackId field is included. Then, we can safely check weather the format of the Cloudformation event message is valid. I have edited the messageToJSON function in order to include these checks.

mickmister commented 3 years ago

@stylianosrigas This should be a short review when you have a chance. No rush on this

mickmister commented 3 years ago

@ioandim Can you please provide basic test steps to test this PR's functionality? We'll be able to merge this sooner if we have steps readily available.

Thanks for this contribution @ioandim!

mattermod commented 3 years ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

mickmister commented 2 years ago

@ioandim Are you able to provide test steps for this PR?

ioandim commented 2 years ago

@mickmister I apologize for not coming back to you sooner. Unfortunately, I was not able to do so during the past months. The functionality for this PR can be tested by following these steps:

  1. Deploy the plugin on a Mattermost server.
  2. Create a new sns topic and add a new HTTPS subscription to the url /plugins/com.mattermost.aws-sns?token=
  3. Create a new cloudformation stack. I have added an example cloudformation template inside the attached zip file that can be used for the purpose of this test.
  4. On the Configure Stack Options step, go to Advanced Options -> Notification Options and add the arn of the sns topic that was created on the second step.
  5. Once you complete the steps for creating a new stack, choose Create Stack. New Cloudformation Events should appear to the channel the plugin is configured to send notifications to. An example cloudformation event message has also been included inside the attached file.

CloudformationEventsTest.zip

mattermod commented 2 years ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

DHaussermann commented 2 years ago

/update-branch

mattermod commented 2 years ago

We don't have permissions to update this PR, please contact the submitter to apply the update.

ioandim commented 2 years ago

@DHaussermann I have updated the branch with all of the current changes.

danilvalov commented 1 year ago

Any updates?

cc @DHaussermann

hanzei commented 1 year ago

@ioandim Can you please merge master into this PR?

avas27JTG commented 1 year ago

@hanzei I've merged the changes from master to this branch in a separate PR https://github.com/mattermost/mattermost-plugin-aws-SNS/pull/79.