terraform-cdk
terraform-cdk copied to clipboard
hcl2cdk: getExpressionAst fails with regex strings due to escaping
Sentry Issue: CDKTF-REGISTRY-DOCS-7P
Error: getExpressionAst errors on input string '"^myami-\d{3}"': main.tf:0,8-10: Invalid escape sequence; The symbol "d" is not a valid escape sequence selector.
File "/__t/node/18.16.0/x64/lib/node_modules/cdktf-registry-docs/node_modules/@cdktf/hcl2json/lib/bridge.js", line 81, in cb
err ? reject(new Error(err)) : resolve(...msg);
File "/__t/node/18.16.0/x64/lib/node_modules/cdktf-registry-docs/node_modules/@cdktf/hcl2json/wasm/wasm_exec.js", line 366, in syscall/js.valueInvoke
const result = Reflect.apply(v, undefined, args);
File "wasm://wasm/018549f2:wasm-function[1489]", in <anonymous>
File "wasm://wasm/018549f2:wasm-function[1473]", in <anonymous>
File "wasm://wasm/018549f2:wasm-function[3125]", in <anonymous>
...
(5 additional frame(s) were not displayed)
This might be invalid HCL. We need to confirm, and then either cut a ticket to the original provider docs if so.