│ Error: Invalid function argument
│
│ on module/lambda/main.tf line 21, in resource “aws_iam_role” “lambda_role”:
│ 21: assume_role_policy = file(“./policy/lambda_assume_role_policy.json”)
│
│ Invalid value for “path” parameter: no file exists at
│ ./policy/lambda_assume_role_policy.json; this function works only with
│ files that are distributed as part of the configuration source code, so if
│ this file will be created by a resource in this configuration you must
│ instead obtain this result from an attribute of that resource.
resource "aws_iam_role" "lambda_role" { name = "lambda_role" - assume_role_policy = file("./policy/lambda_assume_role_policy.json") + assume_role_policy = file("${path.module}/policy/lambda_assume_role_policy.json") }
相対パスから、pathモジュールで対応する