Closed bashtoni closed 6 years ago
Have you considered passing a globally unique function name into the module? (like you would do with a standard aws_lambda_function
resource)
data "aws_region" "current" {
current = true
}
module "lambda" {
source = "claranet/lambda/aws"
version = "0.7.0"
function_name = "my-lambda-function-${data.aws_region.current.name}"
...
}
I hadn't. Maybe I'll just update the README to suggest that..
IAM roles and Lambda function names must be globally unique for an account. Append random a consistent random string to make this happen.