You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have tried various options placing the file at differrent folders it always return
Failure1
│ Error: Invalid function argument
│
│ on cdk.tf.json line 94, in resource.aws_launch_template.MyService-LTConstruct-test (MyService-LTConstruct-test):
│ 94: "user_data": "${filebase64(\"scripts/myscript.sh\")}",
│ ├────────────────
│ │ while calling filebase64(path)
Failue2:
│ Error: Invalid function argument
│
│ on cdk.tf.json line 94, in resource.aws_launch_template.ResumeParsingService-LTConstruct-test (ResumeParsingService-LTConstruct-test):
│ 94: "user_data": "${filebase64(\"$${path.module}/resumeparsingservice.sh\")}",
│ ├────────────────
│ │ while calling filebase64(path)
│
│ Invalid value for "path" parameter: no file exists at
│ "${path.module}/resumeparsingservice.sh"; 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.
the example have userData: Token.asString(Fn.filebase64("${path.module}/example.sh")), which didn't worked. i simplified and moved all the content to root directory and still it was not finding the scripts.
Versions
language : typescript
cdktf --version
0.20.9
node --version
v20.16.0
Providers
No response
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
I'm interested in contributing a fix myself
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
rpatidar
changed the title
COMPONENT: user data path examples does not work in aws launch template
CDKTF userdata path: examples does not work in aws launch template
Nov 5, 2024
Expected Behavior
cdk synth should work and should not fail.
Actual Behavior
i have tried various options placing the file at differrent folders it always return
Failure1
Failue2:
Steps to Reproduce
create cloudformation following the terraform from https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template ( typescript version)
the example have
userData: Token.asString(Fn.filebase64("${path.module}/example.sh")),
which didn't worked. i simplified and moved all the content to root directory and still it was not finding the scripts.Versions
language : typescript
cdktf --version
0.20.9
node --version
v20.16.0
Providers
No response
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: