Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aws-chatbot] L2 support for SlackChannelConfiguration #9679

Closed
1 of 2 tasks
luckily opened this issue Aug 13, 2020 · 5 comments · Fixed by #9702
Closed
1 of 2 tasks

[aws-chatbot] L2 support for SlackChannelConfiguration #9679

luckily opened this issue Aug 13, 2020 · 5 comments · Fixed by #9702
Assignees
Labels
@aws-cdk/aws-chatbot Related to AWS Chatbot feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p2

Comments

@luckily
Copy link
Contributor

luckily commented Aug 13, 2020

Currently there's only L1 resources in CfnSlackChannelConfiguration of aws-chatbot.
Let's create L2 construct support.

Use Case And Proposed Solution

It's just like we create slack channel configuration via AWS web console.
There is pseudocode as below:

const slackChannel = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {
  slackChannelConfigurationName: 'test-channel',
  slackWorkspaceId: 'YOUR_WORKSPACE_ID',
  slackChannelId: 'YOUR_CHANNEL_ID', 
});

slackChannel.addLambdaInvokeCommandPermissions();
slackChannel.addNotificationPermissions();
slackChannel.addSupportCommandPermissions();
slackChannel.addReadOnlyCommandPermissions();

slackChannel.addToPrincipalPolicy(new iam.PolicyStatement({
  effect: iam.Effect.ALLOW,
  actions: [
    's3:GetObject',
  ],
  resources: ['arn:aws:s3:::abc/xyz/123.txt'],
}));

Other

Associate with #5020

cc @skinny85

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@humanzz
Copy link
Contributor

humanzz commented Aug 14, 2020

Hey @luckily, it's great that you're looking into this because between @Stacy-D and myself, we too were keen to get an L2 construct very similar to what you proposed above in #8636 (comment).

Just to avoid duplication of efforts, I wanted to connect to know if you're planning to progress this soon with a contribution? Our initial plan was to try to do that sometime over next week but if you're going to be doing that we'd happily step back and await for your contribution :)

@luckily
Copy link
Contributor Author

luckily commented Aug 14, 2020

Hi @humanzz, I'm so happy that you have similar problem.

I have some plans to resolve this issue and this is my proposed.

These include:

  1. L2 construct for CfnSlackChannelConfiguration of chatbot package.
  2. L2 construct for CfnNotificationRule of codestarnotification package.
  3. addNotification({...}) method of codebuild and codepipeline depend on above implements.

See also: #9680 #9682

@humanzz
Copy link
Contributor

humanzz commented Aug 14, 2020

@luckily Thanks for acting super quickly on this... we can't wait till this gets merged/released :)

@skinny85
Copy link
Contributor

@humanzz if you want to add your review to #9702 (is it similar to your own solution?).

@humanzz
Copy link
Contributor

humanzz commented Aug 14, 2020

It’s quite similar; I added a couple of comments. Pinging @Stacy-D as she was the one actually working on our version if she has any additional comments

@SomayaB SomayaB added in-progress This issue is being actively worked on. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 14, 2020
@mergify mergify bot closed this as completed in #9702 Sep 1, 2020
mergify bot pushed a commit that referenced this issue Sep 1, 2020
… of chatbot. (#9702)

I am ready for the first run.

Support L2 construct for SlackChannelConfiguration of chatbot.
1. add L2 construct
2. add unit tests
3. add integration test
4. update package.json


Resolves: #9679 

cc @skinny85 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-chatbot Related to AWS Chatbot feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants