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
# Create and access an environment by using the Azure CLI
14
14
15
-
This article shows you how to create and access an [environment](concept-environments-key-concepts.md#environments) in an existing Azure Deployment Environments project.
15
+
This guide explains how to create and access an [environment](concept-environments-key-concepts.md#environments) in an existing Azure Deployment Environments project by using the Azure CLI.
16
16
17
17
## Prerequisites
18
18
19
-
-[Create and configure a dev center](quickstart-create-and-configure-devcenter.md).
20
-
-[Create and configure a project](quickstart-create-and-configure-projects.md).
21
-
-[Install the Azure CLI](/cli/azure/install-azure-cli).
19
+
-[Install the Azure CLI extension for Azure Deployment Environments](how-to-install-devcenter-cli-extension.md)
20
+
-[Create and configure a dev center by using the Azure CLI](how-to-create-configure-dev-center.md)
21
+
-[Create and configure a project by using the Azure CLI](how-to-create-configure-projects.md)
22
22
23
23
## Create an environment
24
24
25
-
Creating an environment automatically creates the required resources and a resource group to store them. The resource group name follows the pattern {projectName}-{environmentName}. You can view the resource group in the Azure portal.
25
+
Creating an environment automatically creates the required resources and a resource group to store them. The resource group name follows the pattern `{projectName}-{environmentName}`. You can view the resource group in the Azure portal.
26
26
27
27
Complete the following steps in the Azure CLI to create an environment and configure resources. You can view the outputs as defined in the specific Azure Resource Manager template (ARM template).
28
28
@@ -49,42 +49,42 @@ Complete the following steps in the Azure CLI to create an environment and confi
49
49
1. Configure the default subscription as the subscription that contains the project:
50
50
51
51
```azurecli
52
-
az account set --subscription <name>
52
+
az account set --subscription <subscriptionName>
53
53
```
54
54
55
55
1. Configure the default resource group as the resource group that contains the project:
56
56
57
57
```azurecli
58
-
az config set defaults.group=<name>
58
+
az config set defaults.group=<resourceGroupName>
59
59
```
60
60
61
61
1. List the type of environments you can create in a specific project:
62
62
63
63
```azurecli
64
-
az devcenter dev environment-type list --dev-center <name> --project-name <name> -o table
64
+
az devcenter dev environment-type list --dev-center <devcenterName> --project-name <projectName> -o table
65
65
```
66
66
67
67
1. List the [environment definitions](concept-environments-key-concepts.md#environment-definitions) that are available to a specific project:
68
68
69
69
```azurecli
70
-
az devcenter dev environment-definition list --dev-center <name> --project-name <name> -o table
70
+
az devcenter dev environment-definition list --dev-center <devcenterName> --project-name <projectName> -o table
71
71
```
72
72
73
73
1. Create an environment by using an *environment-definition* (an infrastructure as code template defined in the [environment.yaml](configure-environment-definition.md#add-a-new-environment-definition) file) from the list of available environment definitions:
74
74
75
75
```azurecli
76
-
az devcenter dev environment create --dev-center-name <devcenter-name>
If the specific *environment-definition* requires any parameters, use `--parameters` and provide the parameters as a JSON string or a JSON file. For example:
@@ -105,14 +105,14 @@ Message: The environment resource was not found.
105
105
106
106
To resolve the issue, assign the correct permissions: [Give access to the development team](quickstart-create-and-configure-projects.md#give-access-to-the-development-team).
107
107
108
-
###Access an environment
108
+
## Access an environment
109
109
110
110
To access an environment:
111
111
112
112
1. List existing environments that are available in a specific project:
113
113
114
114
```azurecli
115
-
az devcenter dev environment list --dev-center <devcenter-name> --project-name <project-name>
115
+
az devcenter dev environment list --dev-center <devcenterName> --project-name <projectName>
116
116
```
117
117
118
118
1. View the access endpoints to various resources as defined in the ARM template outputs.
@@ -121,17 +121,17 @@ To access an environment:
121
121
### Deploy an environment
122
122
123
123
```azurecli
124
-
az devcenter dev environment deploy-action --action-id "deploy" --dev-center-name <devcenter-name> \
0 commit comments