How do you read data from an absolute file path? #15994
-
How do you read external static files? I want to read the SSH public key from the default SSH key location on windows. If I call this: param test string = loadTextContent('C:\<insert home path>\.ssh\id_rsa.pub') I get these errors:
If I change to forward slash, I get this error.
So, it looks like Bicep thinks If I escape the param test string = loadTextContent('C\:/<insert home path>/.ssh/id_rsa.pub')
Does everything need to be hard-coded in Bicep? So, if we want to read static files, we need to write a Bicep parser to inject content into parameter files? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Bicep uses |
Beta Was this translation helpful? Give feedback.
Bicep uses
/
as the path delimiter regardless of platform. Absolute paths are not supported, but you can use../
sequences to navigate wherever is needed.