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/deployment-environments/configure-environment-definition.md
+28-27Lines changed: 28 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,17 +19,17 @@ In Azure Deployment Environments, you can use a [catalog](concept-environments-k
19
19
20
20
An environment definition is composed of least two files:
21
21
22
-
- An [Azure Resource Manager template (ARM template)](../azure-resource-manager/templates/overview.md) in JSON file format. For example, *azuredeploy.json*.
22
+
- A template from an IaC framework. For example:
23
+
- An Azure Resource Manager (ARM) template might use a file called *azuredeploy.json*.
24
+
- A Bicep template might use a file called *azuredeploy.bicep*.
25
+
- A Terraform template might use a file called *azuredeploy.tf*, or *azuredeploy.tf.json*.
23
26
- A configuration file that provides metadata about the template. This file should be named *environment.yaml*.
24
27
25
-
>[!NOTE]
26
-
> Azure Deployment Environments currently supports only ARM templates.
27
-
28
28
Your development teams use the environment definitions that you provide in the catalog to deploy environments in Azure.
29
29
30
30
Microsoft offers a [sample catalog](https://aka.ms/deployment-environments/SampleCatalog) that you can use as your repository. You can also use your own private repository, or you can fork and customize the environment definitions in the sample catalog.
31
31
32
-
After you [add a catalog](how-to-configure-catalog.md) to your dev center, the service scans the specified folder path to identify folders that contain an ARM template and an associated environment file. The specified folder path should be a folder that contains subfolders that hold the environment definition files.
32
+
After you [add a catalog](how-to-configure-catalog.md) to your dev center, the service scans the specified folder path to identify folders that contain a template and an associated environment file. The specified folder path should be a folder that contains subfolders that hold the environment definition files.
33
33
34
34
In this article, you learn how to:
35
35
@@ -51,20 +51,13 @@ To add an environment definition:
51
51
52
52
1. Add two files to the new repository subfolder:
53
53
54
-
- An ARM template as a JSON file.
55
-
56
-
To implement IaC for your Azure solutions, use ARM templates. [ARM templates](../azure-resource-manager/templates/overview.md) help you define the infrastructure and configuration of your Azure solution and repeatedly deploy it in a consistent state.
57
-
58
-
To learn how to get started with ARM templates, see the following articles:
59
-
60
-
-[Understand the structure and syntax of ARM templates](../azure-resource-manager/templates/syntax.md): Describes the structure of an ARM template and the properties that are available in the different sections of a template.
61
-
-[Use linked templates](../azure-resource-manager/templates/linked-templates.md?tabs=azure-powershell#use-relative-path-for-linked-templates): Describes how to use linked templates with the new ARM template `relativePath` property to easily modularize your templates and share core components between environment definitions.
54
+
- An IaC template file.
62
55
63
56
- An environment as a YAML file.
64
57
65
-
The *environment.yaml* file contains metadata related to the ARM template.
58
+
The *environment.yaml* file contains metadata related to the IaC template.
66
59
67
-
The following script is an example of the contents of an *environment.yaml* file:
60
+
The following script is an example of the contents of an *environment.yaml* file for an ARM template:
68
61
69
62
```yaml
70
63
name: WebApp
@@ -73,10 +66,18 @@ To add an environment definition:
73
66
description: Deploys a web app in Azure without a datastore
74
67
runner: ARM
75
68
templatePath: azuredeploy.json
76
-
```
77
-
78
-
> [!NOTE]
79
-
> The `version` field is optional. Later, the field will be used to support multiple versions of environment definitions.
69
+
```
70
+
71
+
Use the following table to understand the fields in the *environment.yaml* file:
72
+
73
+
| Field | Description |
74
+
|-------|-------------|
75
+
| name | The name of the environment definition. |
76
+
| version | The version of the environment definition. This field is optional. |
77
+
| summary | A brief description of the environment definition. |
78
+
| description | A detailed description of the environment definition. |
79
+
| runner | The IaC framework that the template uses. The value can be `ARM` or `Bicep`. You can also specify a path to a template stored in a a container registry. |
80
+
| templatePath | The path to the IaC template file. |
80
81
81
82
:::image type="content" source="../deployment-environments/media/configure-environment-definition/create-subfolder-path.png" alt-text="Screenshot that shows a folder path with a subfolder that contains an ARM template and an environment file." lightbox="../deployment-environments/media/configure-environment-definition/create-subfolder-path.png":::
82
83
@@ -88,13 +89,13 @@ To add an environment definition:
88
89
89
90
The service scans the repository to find new environment definitions. After you sync the repository, new environment definitions are available to all projects in the dev center.
90
91
91
-
### Specify a runner for a Terraform custom image
92
+
### Specify a Terraform custom image
92
93
93
-
The ADE extensibility model enables you to use your own custom container image. You can create and store custom Terraform images in public registries.
94
+
The ADE's extensibility model enables you to use your own custom container image to deploy your preferred choice of IaC framework. You can even build and leverage your own container image to execute deployments using Terraform. Learn how to [Configure a container image to execute deployments with Terraform](https://aka.ms/deployment-environments/container-image-terraform).
94
95
95
-
When creating environment definitions that use a custom image in their deployment, the runner property provides a link to a container registry where this container image is stored.
96
+
When creating environment definitions that use a custom image in their deployment, the runner property provides a link to a container registry where this container image is stored.
96
97
97
-
The runner property specifies the location of the image you want top use. When you're using a Terraform image and storing it in a public registry, edit the runner property to specify the location that image, as shown in the following example:
98
+
The runner property specifies the location of the image you want to use. When you're using a Terraform image from a container registry, edit the runner property to specify the location that image, as shown in the following example:
@@ -106,7 +107,7 @@ You can specify parameters for your environment definitions to allow developers
106
107
107
108
Parameters are defined in the *environment.yaml* file.
108
109
109
-
The following script is an example of an *environment.yaml* file that includes two parameters; `location` and `name`:
110
+
The following script is an example of an *environment.yaml* file for an ARM template that includes two parameters; `location` and `name`:
110
111
111
112
```YAML
112
113
name: WebApp
@@ -156,13 +157,13 @@ To learn more about the `az devcenter dev environment create` command, see the [
156
157
157
158
## Update an environment definition
158
159
159
-
To modify the configuration of Azure resources in an existing environment definition in Azure Deployment Environments, update the associated ARM template JSON file in the repository. The change is immediately reflected when you create a new environment by using the specific environment definition. The update also is applied when you redeploy an environment associated with that environment definition.
160
+
To modify the configuration of Azure resources in an existing environment definition in Azure Deployment Environments, update the associated template file in the repository. The change is immediately reflected when you create a new environment by using the specific environment definition. The update also is applied when you redeploy an environment associated with that environment definition.
160
161
161
-
To update any metadata related to the ARM template, modify *environment.yaml*, and then [update the catalog](how-to-configure-catalog.md#update-a-catalog).
162
+
To update any metadata related to the template, modify *environment.yaml*, and then [update the catalog](how-to-configure-catalog.md#update-a-catalog).
162
163
163
164
## Delete an environment definition
164
165
165
-
To delete an existing environment definition, in the repository, delete the subfolder that contains the ARM template JSON file and the associated environment YAML file. Then, [update the catalog](how-to-configure-catalog.md#update-a-catalog).
166
+
To delete an existing environment definition, in the repository, delete the subfolder that contains the template file and the associated environment YAML file. Then, [update the catalog](how-to-configure-catalog.md#update-a-catalog).
166
167
167
168
After you delete an environment definition, development teams can no longer use the specific environment definition to deploy a new environment. Update the environment definition reference for any existing environments that use the deleted environment definition. If the reference isn't updated and the environment is redeployed, the deployment fails.
0 commit comments