Skip to content

Commit

Permalink
Allows variable name for identity provider lookup lambda
Browse files Browse the repository at this point in the history
I added a variable to allow a different name for the lambda used to
lookup user details from the custom identity provider. This is necessary
to have multple instantiations of the "customer identity provider"
  • Loading branch information
jbrechtel committed Dec 1, 2022
1 parent 5b0ec40 commit 159a0b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/custom_identity_provider/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "aws_iam_role_policy_attachment" "policy" {
# Lambda Deployment
#
resource "aws_lambda_function" "this_lambda" {
function_name = "TransferCustomIdentityProviderCredentialLookup"
function_name = var.identity_provider_lookup_lambda_name
handler = "lambda.lambda_handler"
role = coalesce(concat(aws_iam_role.this_lambda.*.arn, [])[0], var.lambda_role_arn)
runtime = "python3.9"
Expand Down
8 changes: 7 additions & 1 deletion modules/custom_identity_provider/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,10 @@ variable "api_gateway_stage_name" {
default = "prod"
description = "Name of the stage"
type = string
}
}

variable "identity_provider_lookup_lambda_name" {
default = "TransferCustomIdentityProviderCredentialLookup"
description = "The name of the AWS Lambda function used to lookup user details from the custom identity provider. Must be unique."
type = string
}

0 comments on commit 159a0b2

Please sign in to comment.