terraform-provider-aws icon indicating copy to clipboard operation
terraform-provider-aws copied to clipboard

Support AWS Chatbot

Open e-moshaya opened this issue 4 years ago • 12 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS Just Released Support for Chatbot in Cloudformation

https://aws.amazon.com/about-aws/whats-new/2020/03/provision-aws-chatbot-configurations-aws-cloudformation/

Would be nice to gain this support in Terraform as well

New or Affected Resource(s)

N/A

Potential Terraform Configuration

resource "aws_chatbot_slack_channel_config" "slack" {
  config_name = ""
  iam_role_arn = ""
  logging_level = ""
  slack_channel_id =   ""
  slack_workspace_id = ""
  sns_topic_arn = "" 
}

References

  • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-chatbot-slackchannelconfiguration.html

e-moshaya avatar Mar 07 '20 13:03 e-moshaya

@e-moshaya Thanks for this. The AWS Chatbot service is currently in beta and there is not yet support in the AWS Go SDK.

ewbankkit avatar Mar 07 '20 21:03 ewbankkit

@e-moshaya Thanks for this. The AWS Chatbot service is currently in beta and there is not yet support in the AWS Go SDK.

This is now GA, but there is not yet support in the AWS Go SDK.

illia-sh avatar Apr 29 '20 09:04 illia-sh

They don't have an API yet either, but they do offer cloudformation support.

I've started work on a public module which wraps Cloudformation to enable configuration of chatbot slack channels in terraform: https://github.com/waveaccounting/terraform-aws-chatbot-slack-configuration

I've published an alpha release (github) which has been tested to work, hoping to release an official 1.0 soon if anyone wants to use it!

mwarkentin avatar Jul 09 '20 16:07 mwarkentin

@mwarkentin Maybe this can serve as inspiration: https://github.com/panos--/terraform-aws-chatbot-slack -- uses the CloudFormation workaround, too.

I've written this module and use it to receive AWS Health alerts and CloudWatch Alarms in Slack.

panos-- avatar Jul 10 '20 09:07 panos--

Hello, there's any update about this???

Lu-dorado avatar Oct 22 '20 14:10 Lu-dorado

AWS Go SDK still does not have support for Chatbot. There is an open issue from Oct 7, 2020 requesting to add Chatbot support to the AWS Go SDK. We as a community could have been better about opening this issue ourselves back in March, but here we are. As soon as this issue is complete, this terraform-provider-aws issue can begin work.

https://github.com/aws/aws-sdk-go/issues/3582

I would suggest going over there and +1 to add visibility.

ItsKarma avatar Oct 22 '20 15:10 ItsKarma

There is limited support for AWS Chatbot via Cloudformation.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-chatbot-slackchannelconfiguration.html

This resource requires some setup to be done in the AWS Chatbot console. To provide the required Slack workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console, then copy and paste the workspace ID from the console.

Edit: Sorry just noticed there's a comment above that already mentions this. Apologies for the noise!

jcf avatar Feb 18 '21 19:02 jcf

The creation of Slack channel configuration is available through Terraform's "AWS Cloud Control" (awscc) provider with this resource: awscc_chatbot_slack_channel_configuration As you can see here: https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/chatbot_slack_channel_configuration

This configuration worked for me:

terraform {
  required_providers {
    awscc = {
      source = "hashicorp/awscc"
      version = "0.27.0"
    }
  }
}

provider "awscc" {
  region = "us-east-1"
}

resource "awscc_chatbot_slack_channel_configuration" "test" {
  configuration_name = "xxx"
  iam_role_arn = "xxx"
  slack_channel_id = "xxx"
  slack_workspace_id = "xxx"
}

DanielTeraSky avatar Jul 12 '22 07:07 DanielTeraSky

When will microsoft teams support be avialable for aws_cc provider? https://aws.amazon.com/blogs/aws/aws-chatbot-now-integrates-with-microsoft-teams/

tim0git avatar Mar 17 '23 08:03 tim0git

I think you are after https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/chatbot_microsoft_teams_channel_configuration? :)

kadrach avatar Apr 26 '23 07:04 kadrach

That works but I think ideally it's supported in the main provider as well?

mwarkentin avatar Apr 26 '23 11:04 mwarkentin

https://github.com/aws/aws-sdk-go-v2/releases/tag/release-2024-02-19

This release adds support for AWS Chatbot. You can now monitor, operate, and troubleshoot your AWS resources with interactive ChatOps using the AWS SDK.

iwamot avatar Feb 21 '24 23:02 iwamot

Would love to see this ticket dispositioned again.. 816 votes and SDK is available.

timharsch avatar Apr 17 '24 18:04 timharsch

I will start working on the Slack Channel Configuration resource.

madhavvishnubhatta avatar Apr 24 '24 11:04 madhavvishnubhatta

FYI, Most used resources in the awscc provider:

  1. awscc_chatbot_slack_channel_configuration
  2. awscc_chatbot_microsoft_teams_channel_configuration

Looks like @madhavvishnubhatta is on the exact right path with #37222

YakDriver avatar Jun 24 '24 19:06 YakDriver

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] avatar Aug 01 '24 17:08 github-actions[bot]

This functionality has been released in v5.61.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] avatar Aug 02 '24 00:08 github-actions[bot]