File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ resource "aws_cloudwatch_event_target" "main" {
1515}
1616
1717resource "aws_lambda_permission" "main" {
18- statement_id = " concourse-${ var . name } -github-lambda-permission"
19- action = " lambda:InvokeFunction"
20- function_name = var. lambda_arn
21- principal = " events.amazonaws.com"
22- source_arn = aws_cloudwatch_event_rule. main . arn
18+ statement_id = var. use_statement_id_prefix ? null : " concourse-${ var . name } -github-lambda-permission"
19+ statement_id_prefix = var. use_statement_id_prefix ? " concourse-${ var . name } -github-lambda-permission-" : null
20+ action = " lambda:InvokeFunction"
21+ function_name = var. lambda_arn
22+ principal = " events.amazonaws.com"
23+ source_arn = aws_cloudwatch_event_rule. main . arn
2324}
2425
2526locals {
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ variable "name" {
66 type = string
77}
88
9+ variable "use_statement_id_prefix" {
10+ description = " If the name is used as a prefix to a randomised name or not"
11+ type = bool
12+ default = false
13+ }
14+
915variable "lambda_arn" {
1016 description = " ARN of the Github Lambda."
1117 type = string
You can’t perform that action at this time.
0 commit comments