Closed sjf3 closed 4 weeks ago
I think something strange happens for $default maybe related to terraform provider or the aws api Indeed if you try to enable ERROR log for $default you do not find any loggroup on cloudwatch If you try to create a stage with different name like "test" it will correctly generate loggroups and logs
Also on $default stage I am unable to disable "access log" after enabiling it.
Is it possible to try to reproduce this problem on websocket? Alternatively is it possible to create a default stage with another name than $default? Or we need to create it by ourself with a new resource? Is it possible ideally to have a variable to create a default stage with a name selected by the user?
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
@atrinchillo-mwb I can confirm that, reason being is that CW log groups can't have $
in the name hence the log group wasn't created. I had to create a separate stage outside of the module to be able to see logs
This issue has been resolved in version 5.0.0 :tada:
https://github.com/terraform-aws-modules/terraform-aws-apigateway-v2/blob/master/main.tf#L55 changing $default to default when protocol != "HTTP" resolved my issue trying to connect. Was getting 429 on the first connection request to brand new websocket api gateways. Wondering if I triggered a loop in the api gateway logic since $default is the default route.
name = var.protocol_type == "HTTP" ? "$default" : "default"
should fix this issue and be backwards compatible