[Enhancement]: Add data source aws_sns_topic_subscriptionsΒ #37095
Description
Description
Allow to add a SNS filter policy to a SNS subcription which you didn't create with Terraform.
I only have one use case, although i'd say it would be consistent with other data sources being available. The Chatbot awscc resource creates a SNS subscription on users behalf. I'd like to add a SNS filter policy to that subscription (e.g. filter Securithub events and only allow Critical). This is not possible currently, unless i overlook something. I understand that i could raise this with awscc team, however:
Given that aws terraform provider got the enhancement request for Chatbot, i think they would go along very well. Unless the implementation would be different, allowing for the subscription to be managed by terraform instead of the AWS Chatbot service. Which i cannot imagine, if i see it right.
Affected Resource(s) and/or Data Source(s)
aws_sns_topic_subscriptions data source
Potential Terraform Configuration
data "aws_sns_topic_subscriptions" "arn" {
topic_arn = aws_sns_topic.my_topic.arn
}
and/or
data "aws_sns_topic_subscriptions" "name" {
name = aws_sns_topican_example_topic.name
}
References
Would you like to implement a fix?
No