Skip to content

Commit 6534e5c

Browse files
update module
1 parent f1ebb8d commit 6534e5c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

terraform-aws-sns/example/example.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ provider "aws" {
44

55
module "sns_cloudwatch" {
66
source = "../"
7-
name = "capture-aws-sign-in"
7+
cloudwatch_event_rule_name = "capture-aws-sign-in"
88
description = "Capture each AWS Console Sign In"
9-
target_id = "SendToSNS"
9+
sns_name = "mysns"
10+
sns_display_name = "demosns"
1011
}
1112

terraform-aws-sns/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ provider "aws" {
55
resource "aws_cloudwatch_event_rule" "default" {
66
count = var.enabled == true ? 1 : 0
77

8-
name = var.name
8+
name = var.cloudwatch_event_rule_name
99
description = var.description
1010
event_pattern = <<EOF
1111
{
@@ -30,8 +30,8 @@ resource "aws_cloudwatch_event_target" "default" {
3030
resource "aws_sns_topic" "this" {
3131
count = var.enabled ? 1 : 0
3232

33-
name = var.snsname
34-
display_name = var.display_name
33+
name = var.sns_name
34+
display_name = var.sns_display_name
3535
kms_master_key_id = var.kms_master_key_id
3636
delivery_policy = var.delivery_policy
3737
fifo_topic = var.fifo_topic

terraform-aws-sns/variable.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ variable "sns_topic_policy_enabled" {
1313
default = true
1414
}
1515

16-
variable "display_name" {
16+
variable "sns_display_name" {
1717
type = string
1818
default = ""
1919
}
2020

21-
variable "name" {
21+
variable "cloudwatch_event_rule_name" {
2222
type = string
2323
default = ""
2424
description = "Name (e.g. `app` or `cluster`)."
@@ -44,7 +44,7 @@ variable "is_enabled" {
4444

4545
variable "target_id" {
4646
type = string
47-
default = ""
47+
default = "SendToSNS"
4848
description = "The Amazon Resource Name (ARN) associated with the role that is used for target invocation."
4949
}
5050

@@ -73,7 +73,7 @@ variable "input_paths" {
7373

7474
}
7575

76-
variable "snsname" {
76+
variable "sns_name" {
7777
type = string
7878
default = ""
7979
description = "Name (e.g. `app` or `cluster`)."

0 commit comments

Comments
 (0)