Skip to content

[New Data Source]: aws_chatbot_slack_channel_configuration #42756

Open
@tamakiii

Description

@tamakiii

What new functionality are you requesting?

Description

I'd like to request a new data source for the existing aws_chatbot_slack_channel_configuration resource.

When managing infrastructure with Terraform, it’s common to separate resources with different lifecycles into separate Terraform projects.

In my case, I’ve separated resources into two projects:

  • One that creates AWS Chatbot Slack channel configurations.
  • One that references these configurations (e.g., for notification rules).

Currently, there's no data source available to reference existing Chatbot Slack channel configurations.

Adding this data source would improve modularity and separation of concerns in Terraform configurations that work with AWS Chatbot resources.

Potential Terraform Configuration

Lookup by configuration name:

data "aws_chatbot_slack_channel_configuration" "example" {
  configuration_name = "my-slack-channel"
}

Lookup by Slack channel and team IDs:

data "aws_chatbot_slack_channel_configuration" "example" {
  slack_channel_id = "C07EZ1ABC23"
  slack_team_id    = "T07EA123LEP"
}

Usage example:

resource "aws_codestarnotifications_notification_rule" "codebuild" {
  name = "build-notification"
  // ...

  target {
    type    = "AWSChatbotSlack"
    address = data.aws_chatbot_slack_channel_configuration.example.configuration_arn
  }
}

References

Would you like to implement the enhancement?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-data-sourceIntroduces a new data source.service/chatbotIssues and PRs that pertain to the chatbot service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions