Skip to content

Commit

Permalink
feat: Add function_url_auth_type option to aws_lambda_permission (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurilo authored Oct 1, 2024
1 parent 520c845 commit 9f13397
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,14 @@ resource "aws_lambda_permission" "current_version_triggers" {
function_name = aws_lambda_function.this[0].function_name
qualifier = aws_lambda_function.this[0].version

statement_id_prefix = try(each.value.statement_id, each.key)
action = try(each.value.action, "lambda:InvokeFunction")
principal = try(each.value.principal, format("%s.amazonaws.com", try(each.value.service, "")))
principal_org_id = try(each.value.principal_org_id, null)
source_arn = try(each.value.source_arn, null)
source_account = try(each.value.source_account, null)
event_source_token = try(each.value.event_source_token, null)
statement_id_prefix = try(each.value.statement_id, each.key)
action = try(each.value.action, "lambda:InvokeFunction")
principal = try(each.value.principal, format("%s.amazonaws.com", try(each.value.service, "")))
principal_org_id = try(each.value.principal_org_id, null)
source_arn = try(each.value.source_arn, null)
source_account = try(each.value.source_account, null)
event_source_token = try(each.value.event_source_token, null)
function_url_auth_type = try(each.value.function_url_auth_type, null)

lifecycle {
create_before_destroy = true
Expand All @@ -299,13 +300,14 @@ resource "aws_lambda_permission" "unqualified_alias_triggers" {

function_name = aws_lambda_function.this[0].function_name

statement_id_prefix = try(each.value.statement_id, each.key)
action = try(each.value.action, "lambda:InvokeFunction")
principal = try(each.value.principal, format("%s.amazonaws.com", try(each.value.service, "")))
principal_org_id = try(each.value.principal_org_id, null)
source_arn = try(each.value.source_arn, null)
source_account = try(each.value.source_account, null)
event_source_token = try(each.value.event_source_token, null)
statement_id_prefix = try(each.value.statement_id, each.key)
action = try(each.value.action, "lambda:InvokeFunction")
principal = try(each.value.principal, format("%s.amazonaws.com", try(each.value.service, "")))
principal_org_id = try(each.value.principal_org_id, null)
source_arn = try(each.value.source_arn, null)
source_account = try(each.value.source_account, null)
event_source_token = try(each.value.event_source_token, null)
function_url_auth_type = try(each.value.function_url_auth_type, null)

lifecycle {
create_before_destroy = true
Expand Down

0 comments on commit 9f13397

Please sign in to comment.