diff --git a/main.tf b/main.tf index 77f757a..35bf24e 100644 --- a/main.tf +++ b/main.tf @@ -15,7 +15,7 @@ module "lambda_role" { source = "github.com/schubergphilis/terraform-aws-mcaf-role?ref=v0.3.3" name = join("-", compact([var.role_prefix, "LambdaRole", var.name])) - create_policy = true + create_policy = var.create_policy permissions_boundary = var.permissions_boundary postfix = false principal_identifiers = ["edgelambda.amazonaws.com", "lambda.amazonaws.com"] diff --git a/variables.tf b/variables.tf index 3ac7c91..25356b2 100644 --- a/variables.tf +++ b/variables.tf @@ -21,6 +21,12 @@ variable "code_signing_config_arn" { description = "ARN for a Code Signing Configuration" } +variable "create_policy" { + type = bool + default = null + description = "Overrule whether the Lambda role policy has to be created" +} + variable "create_s3_dummy_object" { type = bool default = true