@@ -34,7 +34,7 @@ resource "null_resource" "download_package" {
34
34
35
35
module "lambda_function1" {
36
36
source = " terraform-aws-modules/lambda/aws"
37
- version = " ~> 1 .0"
37
+ version = " ~> 2 .0"
38
38
39
39
function_name = " ${ random_pet . this . id } -lambda1"
40
40
handler = " index.lambda_handler"
@@ -46,7 +46,7 @@ module "lambda_function1" {
46
46
47
47
module "lambda_function2" {
48
48
source = " terraform-aws-modules/lambda/aws"
49
- version = " ~> 1 .0"
49
+ version = " ~> 2 .0"
50
50
51
51
function_name = " ${ random_pet . this . id } -lambda2"
52
52
handler = " index.lambda_handler"
@@ -57,11 +57,17 @@ module "lambda_function2" {
57
57
}
58
58
59
59
module "sns_topic1" {
60
- source = " terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic"
60
+ source = " terraform-aws-modules/sns/aws"
61
+ version = " ~> 3.0"
62
+
63
+ name_prefix = " ${ random_pet . this . id } -2"
61
64
}
62
65
63
66
module "sns_topic2" {
64
- source = " terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic"
67
+ source = " terraform-aws-modules/sns/aws"
68
+ version = " ~> 3.0"
69
+
70
+ name_prefix = " ${ random_pet . this . id } -2"
65
71
}
66
72
67
73
resource "aws_sqs_queue" "this" {
@@ -98,16 +104,16 @@ module "all_notifications" {
98
104
99
105
lambda_notifications = {
100
106
lambda1 = {
101
- function_arn = module.lambda_function1.this_lambda_function_arn
102
- function_name = module.lambda_function1.this_lambda_function_name
107
+ function_arn = module.lambda_function1.lambda_function_arn
108
+ function_name = module.lambda_function1.lambda_function_name
103
109
events = [" s3:ObjectCreated:Put" ]
104
110
filter_prefix = " prefix/"
105
111
filter_suffix = " .json"
106
112
}
107
113
108
114
lambda2 = {
109
- function_arn = module.lambda_function2.this_lambda_function_arn
110
- function_name = module.lambda_function2.this_lambda_function_name
115
+ function_arn = module.lambda_function2.lambda_function_arn
116
+ function_name = module.lambda_function2.lambda_function_name
111
117
events = [" s3:ObjectCreated:Post" ]
112
118
}
113
119
}
@@ -130,14 +136,14 @@ module "all_notifications" {
130
136
131
137
sns_notifications = {
132
138
sns1 = {
133
- topic_arn = module.sns_topic1.this_sns_topic_arn
139
+ topic_arn = module.sns_topic1.sns_topic_arn
134
140
events = [" s3:ObjectRemoved:Delete" ]
135
141
filter_prefix = " prefix3/"
136
142
filter_suffix = " .csv"
137
143
}
138
144
139
145
sns2 = {
140
- topic_arn = module.sns_topic2.this_sns_topic_arn
146
+ topic_arn = module.sns_topic2.sns_topic_arn
141
147
events = [" s3:ObjectRemoved:DeleteMarkerCreated" ]
142
148
}
143
149
}
0 commit comments