You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| filePath | Yes | string | The path to the file to load. The path is relative to the deployed Bicep file. It can't include variables. |
94
+
| pathFilter | No | string | The path filter is a JSONPath expression to specify that only part of the file is loaded. |
95
+
| encoding | No | string | The file encoding. The default value is `utf-8`. The available options are: `iso-8859-1`, `us-ascii`, `utf-16`, `utf-16BE`, or `utf-8`. |
96
+
97
+
### Remarks
98
+
99
+
Use this function when you have YAML content or minified YAML content that is stored in a separate file. Rather than duplicating the YAML content in your Bicep file, load the content with this function. You can load a part of a YAML file by specifying a path filer. The file is loaded when the Bicep file is compiled to the YAML template. You can't include variables in the file path because they haven't been resolved when compiling to the template. During deployment, the YAML template contains the contents of the file as a hard-coded string.
100
+
101
+
In VS Code, the properties of the loaded object are available intellisense. For example, you can create a file with values to share across many Bicep files. An example is shown in this article.
102
+
103
+
This function requires **Bicep version >0.16.2**.
104
+
105
+
The maximum allowed size of the file is **1,048,576 characters**, including line endings.
106
+
107
+
### Return value
108
+
109
+
The contents of the file as an Any object.
110
+
111
+
### Examples
112
+
113
+
The following example creates a YAML file that contains values for a network security group.
0 commit comments