terraform-aws-couchbase
terraform-aws-couchbase copied to clipboard
error in run-sync-gateway/wait_for_couchbase_clusters when config file has backtics
https://github.com/gruntwork-io/terraform-aws-couchbase/blob/027eb19e57a7bc2522a1287c4adf008d655afc40/modules/run-sync-gateway/run-sync-gateway#L185
This line of code is throwing an error when the config file has backticks in the import_filter or sync json properties as mentioned in the docs
The error:
parse error: Invalid numeric literal at line 42, column 0
Turns out it is jq
that is throwing the error. 😢
Oh man, so the config is no longer valid JSON? That's... Unfortunate. Thanks for reporting though!
The Sync Gateway config has never been 100% valid JSON, it's always used backticks for multi-line sync functions. It's documented here:
https://docs.couchbase.com/sync-gateway/current/refer/config-properties.html#about-the-schema
We're working on a feature in 3.0 that will allow you to reference an external js file instead, so the config file can become fully valid JSON.
For now though, backticks are really the only way to use multiline strings, vs. minifying and escaping stuff in double quotes, which I don't think anybody wants to do.
Huh, TIL, thanks!
This repo is being archived, feel free to use a fork if necessary.