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
@@ -3,16 +3,16 @@ title: Imports in Bicep
3
3
description: Describes how to import shared functionality and namespaces in Bicep.
4
4
ms.topic: conceptual
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 06/03/2024
6
+
ms.date: 08/07/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, as well as namespaces for Bicep extensibility providers.
11
+
This article describes the syntax you use to export and import shared functionality, as well as namespaces for Bicep extensions.
12
12
13
13
## Exporting types, variables and functions
14
14
15
-
The `@export()` decorator is used to indicate that a given statement can be imported by another file. This decorator is only valid on type, variable and function statements. Variable statements marked with `@export()` must be compile-time constants.
15
+
The `@export()` decorator indicates that a given statement can be imported by another file. This decorator is only valid on type, variable, and function 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
@@ -21,7 +21,7 @@ The syntax for exporting functionality for use in other Bicep files is:
21
21
<statement_to_export>
22
22
```
23
23
24
-
## Import types, variables and functions
24
+
## Import types, variables, and functions
25
25
26
26
The syntax for importing functionality from another Bicep file is:
## Import namespaces and extensibility providers (Preview)
83
+
## Import namespaces and extensions (Preview)
84
84
85
85
> [!NOTE]
86
86
> The experimental feature `extensibility` must be enabled from the [Bicep config file](./bicep-config.md#enable-experimental-features) to use this feature.
Both `az` and `sys` are Bicep built-in namespaces. They are imported by default. For more information about the data types and the functions defined in `az` and `sys`, see [Data types](./data-types.md) and [Bicep functions](./bicep-functions.md).
95
+
Both `az` and `sys` are Bicep built-in namespaces. They're imported by default. For more information about the data types and the functions defined in `az` and `sys`, see [Data types](./data-types.md) and [Bicep functions](./bicep-functions.md).
96
96
97
-
The syntax for importing Bicep extensibility providers is:
97
+
The syntax for importing Bicep extensions is:
98
98
99
99
```bicep
100
-
import '<provider-name>@<provider-version>'
100
+
import '<extension-name>@<extension-version>'
101
101
```
102
102
103
-
The syntax for importing Bicep extensibility providers which require configuration is:
103
+
The syntax for importing Bicep extensions, which require configuration is:
104
104
105
105
```bicep
106
-
import '<provider-name>@<provider-version>' with {
107
-
<provider-properties>
106
+
import '<extension-name>@<extension-version>' with {
107
+
<extension-properties>
108
108
}
109
109
```
110
110
111
-
For an example, see [Bicep extensibility Kubernetes provider](./bicep-extensibility-kubernetes-provider.md).
111
+
For an example, see [Bicep Kubernetes extension](./bicep-kubernetes-extension.md).
112
112
113
113
## Next steps
114
114
115
115
- To learn about the Bicep data types, see [Data types](./data-types.md).
116
116
- To learn about the Bicep functions, see [Bicep functions](./bicep-functions.md).
117
-
- To learn about how to use the Kubernetes provider, see [Bicep extensibility Kubernetes provider](./bicep-extensibility-kubernetes-provider.md).
118
-
- To go through a Kubernetes provider tutorial, see [Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep Kubernetes provider.](/azure/aks/learn/quick-kubernetes-deploy-bicep-extensibility-kubernetes-provider).
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).
The Kubernetes provider allows you to create Kubernetes resources directly with Bicep. Bicep can deploy anything that can be deployed with the [Kubernetes command-line client (kubectl)](https://kubernetes.io/docs/reference/kubectl/kubectl/) and a [Kubernetes manifest file](/azure/aks/concepts-clusters-workloads#deployments-and-yaml-manifests).
11
+
The Kubernetes extension allows you to create Kubernetes resources directly with Bicep. Bicep can deploy anything that can be deployed with the [Kubernetes command-line client (kubectl)](https://kubernetes.io/docs/reference/kubectl/kubectl/) and a [Kubernetes manifest file](/azure/aks/concepts-clusters-workloads#deployments-and-yaml-manifests).
12
12
13
13
> [!NOTE]
14
-
> Kubernetes provider is not currently supported for private clusters:
14
+
> The Kubernetes extension is not currently supported for private clusters:
15
15
>
16
16
> ```bicep
17
17
> resource AKS 'Microsoft.ContainerService/managedClusters@2024-02-01' = {
@@ -38,12 +38,12 @@ This preview feature can be enabled by configuring the [bicepconfig.json](./bice
38
38
}
39
39
```
40
40
41
-
## Import Kubernetes provider
41
+
## Import Kubernetes extension
42
42
43
43
To safely pass secrets for the Kubernetes deployment, you must invoke the Kubernetes code with a Bicep module and pass the parameter as a secret.
44
-
To import the Kubernetes provider, use the [import statement](./bicep-import-providers.md). After importing the provider, you can refactor the Bicep module file as usual, such as by using variables, parameters, and output. By contract, the Kubernetes manifest in YML doesn't include any programmability support.
44
+
To import the Kubernetes extension, use the [import statement](./bicep-import.md). After importing the extension, you can refactor the Bicep module file as usual, such as by using variables, parameters, and output. By contract, the Kubernetes manifest in YML doesn't include any programmability support.
45
45
46
-
The following sample imports the Kubernetes provider:
46
+
The following sample imports the Kubernetes extension:
-**namespace**: Specify the namespace of the provider.
58
+
-**namespace**: Specify the namespace of the extension.
59
59
-**KubeConfig**: Specify a base64 encoded value of the [Kubernetes cluster admin credentials](/rest/api/aks/managed-clusters/list-cluster-admin-credentials).
60
60
61
61
The following sample shows how to pass `kubeConfig` value from a parent Bicep file:
@@ -81,4 +81,4 @@ From Visual Studio Code, you can import Kubernetes manifest files to create Bice
81
81
82
82
## Next steps
83
83
84
-
-[Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep extensibility Kubernetes provider](/azure/aks/learn/quick-kubernetes-deploy-bicep-extensibility-kubernetes-provider)
84
+
-[Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep Kubernetes extension](/azure/aks/learn/quick-kubernetes-deploy-bicep-kubernetes-extension)
0 commit comments