File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
examples/notify-slack-simple Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ Doing serverless with Terraform? Check out [serverless.tf framework](https://ser
9
9
10
10
## Terraform versions
11
11
12
- Terraform 0.12. Pin module version to ` ~> v3.0 ` . Submit pull-requests to ` master ` branch.
12
+ Terraform 0.13. Pin module version to ` ~> v4.0 ` . Submit pull-requests to ` master ` branch.
13
+
14
+ Terraform 0.12. Pin module version to ` 3.4.0 ` (or older). Submit pull-requests to ` terraform012 ` branch.
13
15
14
16
Terraform 0.11. Pin module version to ` ~> v1.0 ` .
15
17
@@ -30,7 +32,7 @@ Terraform 0.11. Pin module version to `~> v1.0`.
30
32
``` hcl
31
33
module "notify_slack" {
32
34
source = "terraform-aws-modules/notify-slack/aws"
33
- version = "~> 3 .0"
35
+ version = "~> 4 .0"
34
36
35
37
sns_topic_name = "slack-topic"
36
38
Original file line number Diff line number Diff line change @@ -19,4 +19,6 @@ module "notify_slack" {
19
19
tags = {
20
20
Name = " notify-slack-simple"
21
21
}
22
+
23
+ depends_on = [aws_sns_topic . my_sns ]
22
24
}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ resource "aws_sns_topic_subscription" "sns_notify_slack" {
67
67
68
68
module "lambda" {
69
69
source = " terraform-aws-modules/lambda/aws"
70
- version = " >= 1.18.0"
70
+ version = " 1.18.0"
71
71
72
72
create = var. create
73
73
@@ -104,6 +104,8 @@ module "lambda" {
104
104
attach_policy_json = true
105
105
policy_json = element (concat (data. aws_iam_policy_document . lambda [* ]. json , [" " ]), 0 )
106
106
107
+ use_existing_cloudwatch_log_group = true
108
+
107
109
allowed_triggers = {
108
110
AllowExecutionFromSNS = {
109
111
principal = " sns.amazonaws.com"
@@ -112,4 +114,6 @@ module "lambda" {
112
114
}
113
115
114
116
tags = merge (var. tags , var. lambda_function_tags )
117
+
118
+ depends_on = [aws_cloudwatch_log_group . lambda ]
115
119
}
You can’t perform that action at this time.
0 commit comments