We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have added basePath in next.config.js as "/my-app". And after when I deploy the app then getting this error-
[31m│[0m [0m [31m│[0m [0m[0m with module.tf_next.aws_iam_role.lambda["my-app/__NEXT_PAGE_LAMBDA_0"], [31m│[0m [0m on ../original_source/iam.tf line 20, in resource "aws_iam_role" "lambda": [31m│[0m [0m 20: name = [4m"${var.deployment_name}_${each.key}"[0m[0m [31m│[0m [0m [31m[0m[0m [31m[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1m"function_name" doesn't comply with restrictions ("^(arn:[\\w-]+:lambda:)?([a-z]{2}-(?:[a-z]+-){1,2}\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\\$LATEST|[a-zA-Z0-9-_]+))?$"): "my-deployment-name_my-app/__NEXT_PAGE_LAMBDA_0"[0m [31m│[0m [0m [31m│[0m [0m[0m with module.tf_next.aws_lambda_permission.current_version_triggers["my-app/__NEXT_PAGE_LAMBDA_0"], [31m│[0m [0m on ../original_source/main.tf line 96, in resource "aws_lambda_permission" "current_version_triggers": [31m│[0m [0m 96: function_name = [4m"${var.deployment_name}_${each.key}"[0m�[0m
It works fine without basePath. I think the problem is with the forward-slash which is appended after my-app. Do you have any suggestions?
The text was updated successfully, but these errors were encountered:
Yes, seems like the basePath setting creates invalid function names since it prefixes the basePath. Need to take a look how this could be solved.
basePath
Sorry, something went wrong.
I am thinking to use replace function in Terraform which will replace the forward slash with an underscore. I will create a PR if this works.
We are seeing this issue as well. @sumantapakira did you end up making a PR?
No branches or pull requests
I have added basePath in next.config.js as "/my-app".
And after when I deploy the app then getting this error-
[31m│[0m [0m [31m│[0m [0m[0m with module.tf_next.aws_iam_role.lambda["my-app/__NEXT_PAGE_LAMBDA_0"], [31m│[0m [0m on ../original_source/iam.tf line 20, in resource "aws_iam_role" "lambda": [31m│[0m [0m 20: name = [4m"${var.deployment_name}_${each.key}"[0m[0m [31m│[0m [0m [31m[0m[0m [31m[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1m"function_name" doesn't comply with restrictions ("^(arn:[\\w-]+:lambda:)?([a-z]{2}-(?:[a-z]+-){1,2}\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\\$LATEST|[a-zA-Z0-9-_]+))?$"): "my-deployment-name_my-app/__NEXT_PAGE_LAMBDA_0"[0m [31m│[0m [0m [31m│[0m [0m[0m with module.tf_next.aws_lambda_permission.current_version_triggers["my-app/__NEXT_PAGE_LAMBDA_0"], [31m│[0m [0m on ../original_source/main.tf line 96, in resource "aws_lambda_permission" "current_version_triggers": [31m│[0m [0m 96: function_name = [4m"${var.deployment_name}_${each.key}"[0m�[0m
It works fine without basePath. I think the problem is with the forward-slash which is appended after my-app. Do you have any suggestions?
The text was updated successfully, but these errors were encountered: