File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module "nhs-oauth-token-generator-lambda" {
22 source = " ./modules/lambda"
33 name = " NhsOauthTokenGeneratorLambda"
44 handler = " handlers.nhs_oauth_token_generator_handler.lambda_handler"
5- lambda_timeout = 60
5+ lambda_timeout = 120
66 iam_role_policy_documents = [
77 aws_iam_policy . ssm_access_policy . policy ,
88 module . ndr-app-config . app_config_policy
@@ -26,7 +26,6 @@ module "nhs-oauth-token-generator-alarm" {
2626 namespace = " AWS/Lambda"
2727 alarm_actions = [module . nhs-oauth-token-generator-alarm-topic . arn ]
2828 ok_actions = [module . nhs-oauth-token-generator-alarm-topic . arn ]
29- depends_on = [module . nhs-oauth-token-generator-lambda , module . nhs-oauth-token-generator-alarm-topic ]
3029}
3130
3231module "nhs-oauth-token-generator-alarm-topic" {
@@ -56,6 +55,4 @@ module "nhs-oauth-token-generator-alarm-topic" {
5655 }
5756 ]
5857 })
59-
60- depends_on = [module . nhs-oauth-token-generator-lambda , module . sns_encryption_key ]
6158}
Original file line number Diff line number Diff line change @@ -172,25 +172,16 @@ resource "aws_cloudwatch_event_rule" "nhs_oauth_token_generator_schedule" {
172172 schedule_expression = " rate(9 minutes)"
173173}
174174
175- resource "aws_cloudwatch_event_target" "nhs_oauth_token_generator_schedule_event " {
175+ resource "aws_cloudwatch_event_target" "nhs_oauth_token_generator_schedule " {
176176 rule = aws_cloudwatch_event_rule. nhs_oauth_token_generator_schedule . name
177177 target_id = " nhs_oauth_token_generator_schedule"
178-
179178 arn = module. nhs-oauth-token-generator-lambda . lambda_arn
180- depends_on = [
181- module . nhs-oauth-token-generator-lambda ,
182- aws_cloudwatch_event_rule . nhs_oauth_token_generator_schedule
183- ]
184179}
185180
186- resource "aws_lambda_permission" "nhs_oauth_token_generator_schedule_permission " {
181+ resource "aws_lambda_permission" "nhs_oauth_token_generator_schedule " {
187182 statement_id = " AllowExecutionFromCloudWatch"
188183 action = " lambda:InvokeFunction"
189184 function_name = module. nhs-oauth-token-generator-lambda . function_name
190185 principal = " events.amazonaws.com"
191186 source_arn = aws_cloudwatch_event_rule. nhs_oauth_token_generator_schedule . arn
192- depends_on = [
193- module . nhs-oauth-token-generator-lambda ,
194- aws_cloudwatch_event_rule . nhs_oauth_token_generator_schedule
195- ]
196187}
You can’t perform that action at this time.
0 commit comments