https://kotlinlang.org logo
#kotless
Title
# kotless
v

v79

08/19/2021, 9:32 PM
Hi, using Kotless + Ktor I've just added my first route with a route parameter -
get("/load-markdown/{s3key}")
- this is working fine locally, but when I try to deploy to AWS, terraform blows up with an Invalid resource name message:
Copy code
Error: Invalid resource name

  on <http://KotlessTestBeta.tf|KotlessTestBeta.tf> line 79, in resource "aws_api_gateway_integration" "load_markdown_{s3key}_get":
  79: resource "aws_api_gateway_integration" "load_markdown_{s3key}_get" {

A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
What horrible thing have I done wrong? (Kotless 0.2.0 compiled from source).
Ah, it appears to be unsupported. I'd have to use POST then?
OK, I can use
get
and
call.parameters[]
. It's all getting rather frustrating.
t

TanVD

08/20/2021, 9:07 AM
parameters in path are not supported, you are right 🙂
v

v79

08/20/2021, 9:16 AM
Since you're online... If I delete a route from my source code, kotless/terraform deployment fails. I have to go to AWS, delete the api gateway entry by hand, and then deploy...
t

TanVD

08/20/2021, 9:59 AM
Hm, it is strange...
Could you create an issue?
v

v79

08/20/2021, 10:57 AM
I'll try to reproduce it and raise a issue; it's definitely happened a couple of times.
6 Views