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
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/bicep-import.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
2
title: Imports in Bicep
3
-
description: Describes how to import shared functionality and namespaces in Bicep.
3
+
description: This article describes how to import shared functionality and namespaces in Bicep.
4
4
ms.topic: conceptual
5
5
ms.custom: devx-track-bicep
6
6
ms.date: 08/20/2024
7
7
---
8
8
9
9
# Imports in Bicep
10
10
11
-
This article describes the syntax you use to export and import shared functionality, and namespaces for Bicep extensions.
11
+
This article describes the syntax you use to export and import shared functionality and namespaces for Bicep extensions.
12
12
13
13
## Export variables, types, and functions
14
14
15
-
The `@export()` decorator indicates that a given statement can be imported by another file. This decorator is only valid on [`type`](./user-defined-data-types.md), [`var`](./variables.md), and [`func`](./user-defined-functions.md) statements. Variable statements marked with `@export()` must be compile-time constants.
15
+
The `@export()` decorator indicates that another file can import a specific statement. This decorator is only valid on [`type`](./user-defined-data-types.md), [`var`](./variables.md), and [`func`](./user-defined-functions.md) statements. Variable statements marked with `@export()` must be compile-time constants.
16
16
17
17
The syntax for exporting functionality for use in other Bicep files is:
18
18
@@ -41,15 +41,15 @@ Using the wildcard import syntax:
41
41
import * as <alias_name> from '<bicep_file_name>'
42
42
```
43
43
44
-
You can mix and match the preceding syntaxes. To access imported symbols using the wildcard syntax, you must use the `.` operator: `<alias_name>.<exported_symbol>`.
44
+
You can mix and match the preceding syntaxes. To access imported symbols by using the wildcard syntax, you must use the `.` operator: `<alias_name>.<exported_symbol>`.
45
45
46
-
Only statements that have been [exported](#export-variables-types-and-functions) in the file being referenced are available to be imported.
46
+
Only statements that were [exported](#export-variables-types-and-functions) in the file being referenced are available for import.
47
47
48
-
Functionality that has been imported from another file can be used without restrictions. For example, imported variables can be used anywhere a variable declared in-file would normally be valid.
48
+
You can use functionality that was imported from another file without restrictions. For example, you can use imported variables anywhere that a variable declared in-file would normally be valid.
49
49
50
50
### Example
51
51
52
-
exports.bicep
52
+
*exports.bicep*
53
53
54
54
```bicep
55
55
@export()
@@ -65,7 +65,7 @@ var myConstant = 'This is a constant value'
> The experimental feature `extensibility` must be enabled from the [Bicep config file](./bicep-config.md#enable-experimental-features) to use this feature.
@@ -110,9 +110,9 @@ import '<extension-name>@<extension-version>' with {
110
110
111
111
For an example, see [Bicep Kubernetes extension](./bicep-kubernetes-extension.md).
112
112
113
-
## Next steps
113
+
## Related content
114
114
115
-
- To learn about the Bicep data types, see [Data types](./data-types.md).
116
-
- To learn about the Bicep functions, see [Bicep functions](./bicep-functions.md).
117
-
- To learn about how to use the Bicep Kubernetes extension, see [Bicep Kubernetes extension](./bicep-kubernetes-extension.md).
118
-
- To go through a Kubernetes extension tutorial, see [Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep Kubernetes extension.](/azure/aks/learn/quick-kubernetes-deploy-bicep-kubernetes-extension).
115
+
- To learn about Bicep data types, see [Data types](./data-types.md).
116
+
- To learn about Bicep functions, see [Bicep functions](./bicep-functions.md).
117
+
- To learn how to use the Bicep Kubernetes extension, see [Bicep Kubernetes extension](./bicep-kubernetes-extension.md).
118
+
- To go through a Kubernetes extension tutorial, see [Quickstart: Deploy Azure applications to Azure Kubernetes Services by using the Bicep Kubernetes extension](/azure/aks/learn/quick-kubernetes-deploy-bicep-kubernetes-extension).
0 commit comments