terraform-aws-next-js icon indicating copy to clipboard operation
terraform-aws-next-js copied to clipboard

Fix: functions name when basePath is setup

Open framled opened this issue 2 years ago • 5 comments

Terraform failed when basePath is set, this is because lambda functions name can not have a special character.

issues related to this are #288 #310

framled avatar Jul 14 '22 21:07 framled

Hey, thanks for submitting this PR. Unfortunately the target branch you selected (release-v0.x) is managed by our CI system and not meant for opening PRs against it. You need to rebase your changes to the v0.x branch instead. I've already changed the target branch, you need to rebase/cherry-pick and force push your commits to make it work.

If it's too confusing, please allow me to make the necessary changes, by Enabling repository maintainer permissions on existing pull requests.

ofhouse avatar Jul 25 '22 10:07 ofhouse

Hi @ofhouse I've already rebase and cherry pick... reigncl/v0.x branch is already up to date... But I didn´t find the option in the PR... :/

I've just create a new PR #351, that is ok?

framled avatar Jul 25 '22 17:07 framled

Hi @framled I think this is not about only the fixing the Lambda function name, it also requires the change in proxy. Have you got success to test end to end flow only by changing Lambda function name?

sumantapakira avatar Sep 18 '22 08:09 sumantapakira

@sumantapakira Yes it works

framled avatar Sep 26 '22 15:09 framled

ok, but with your change when I tried to create new infra then it fails -

Error: error putting S3 Bucket Notification Configuration: InvalidArgument: Unable to validate the following destination configurations status code: 400, request id: 0Y96VW1JYZT35NNG, host id: 6LM/nRmfUTxNLAMrJAqjHEjkPUhtD0FxIthh5qkFcwWgGTAQ2EJ/6k1oAq2RdKfGWtnGJgq354o=

with module.tf_next.module.statics_deploy.aws_s3_bucket_notification.on_create, on ../original_source/modules/statics-deploy/main.tf line 31, in resource "aws_s3_bucket_notification" "on_create": 31: resource "aws_s3_bucket_notification" "on_create" {

sumantapakira avatar Sep 29 '22 08:09 sumantapakira