File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ module "es_alarms" {
8484
8585| Name | Description |
8686| ------| -------------|
87- | ` sns_topic_arn ` | The ARN of the SNS topic |
87+ | ` sns_topic_arn ` | The ARN of the SNS topic |
88+ | ` sns_topic_name ` | The SNS topic name |
8889
8990## Share the Love
9091
Original file line number Diff line number Diff line change 1- # resource "aws_cloudwatch_event_target" "sns" {
2- # rule = "${aws_cloudwatch_event_rule.default.name}"
3- # target_id = "SendToSNS"
4- # arn = "${var.sns_topic_arn}"
5- # depends_on = ["aws_cloudwatch_event_rule.default"]
6- # input = "${var.sns_message_override}"
7- # }
81terraform {
92 backend "s3" {}
103}
@@ -26,6 +19,10 @@ locals {
2619 aws_sns_topic_arn = " ${ var . sns_topic == " " ?
2720 element (concat (aws_sns_topic. default_prefix . * . arn , list (" " )), 0 ) :
2821 element (concat (aws_sns_topic. default . * . arn , list (" " )), 0 )} "
22+
23+ aws_sns_topic_name = " ${ var . sns_topic == " " ?
24+ element (concat (aws_sns_topic. default_prefix . * . name , list (" " )), 0 ) :
25+ var . sns_topic } "
2926}
3027
3128resource "aws_sns_topic_policy" "default" {
Original file line number Diff line number Diff line change @@ -2,3 +2,8 @@ output "sns_topic_arn" {
22 description = " The ARN of the SNS topic"
33 value = " ${ local . aws_sns_topic_arn } "
44}
5+
6+ output "sns_topic_name" {
7+ description = " The SNS topic name"
8+ value = " ${ local . aws_sns_topic_name } "
9+ }
You can’t perform that action at this time.
0 commit comments