Skip to content

Commit 792b281

Browse files
authored
Merge pull request #260773 from cdpark/refresh-access-environments
Freshness pass 167585: Azure Deployment Environments -- CLI access environments
2 parents 4599ee9 + 93971da commit 792b281

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

articles/deployment-environments/how-to-create-access-environments.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ ms.author: rosemalcolm
77
ms.service: deployment-environments
88
ms.custom: ignite-2022, devx-track-azurecli, build-2023
99
ms.topic: how-to
10-
ms.date: 10/06/2023
10+
ms.date: 12/07/2023
1111
---
1212

1313
# Create and access an environment by using the Azure CLI
1414

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.
1616

1717
## Prerequisites
1818

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)
2222

2323
## Create an environment
2424

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.
2626

2727
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).
2828

@@ -49,42 +49,42 @@ Complete the following steps in the Azure CLI to create an environment and confi
4949
1. Configure the default subscription as the subscription that contains the project:
5050

5151
```azurecli
52-
az account set --subscription <name>
52+
az account set --subscription <subscriptionName>
5353
```
5454

5555
1. Configure the default resource group as the resource group that contains the project:
5656

5757
```azurecli
58-
az config set defaults.group=<name>
58+
az config set defaults.group=<resourceGroupName>
5959
```
6060

6161
1. List the type of environments you can create in a specific project:
6262

6363
```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
6565
```
6666

6767
1. List the [environment definitions](concept-environments-key-concepts.md#environment-definitions) that are available to a specific project:
6868

6969
```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
7171
```
7272

7373
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:
7474

7575
```azurecli
76-
az devcenter dev environment create --dev-center-name <devcenter-name>
77-
--project-name <project-name> --environment-name <name> --environment-type <environment-type-name>
78-
--environment-definition-name <environment-definition-name> --catalog-name <catalog-name>
76+
az devcenter dev environment create --dev-center-name <devcenterName>
77+
--project-name <projectName> --environment-name <environmentName> --environment-type <environmentType>
78+
--environment-definition-name <environmentDefinitionName> --catalog-name <catalogName>
7979
```
8080

8181
If the specific *environment-definition* requires any parameters, use `--parameters` and provide the parameters as a JSON string or a JSON file. For example:
8282

8383
```json
8484
$params = "{ 'name': 'firstMsi', 'location': 'northeurope' }"
85-
az devcenter dev environment create --dev-center-name <devcenter-name>
86-
--project-name <project-name> --environment-name <name> --environment-type <environment-type-name>
87-
--environment-definition-name <environment-definition-name> --catalog-name <catalog-name>
85+
az devcenter dev environment create --dev-center-name <devcenterName>
86+
--project-name <projectName> --environment-name <environmentName> --environment-type <environmentType>
87+
--environment-definition-name <environmentDefinitionName> --catalog-name <catalogName>
8888
--parameters $params
8989
```
9090

@@ -105,14 +105,14 @@ Message: The environment resource was not found.
105105

106106
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).
107107

108-
### Access an environment
108+
## Access an environment
109109

110110
To access an environment:
111111

112112
1. List existing environments that are available in a specific project:
113113

114114
```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>
116116
```
117117

118118
1. View the access endpoints to various resources as defined in the ARM template outputs.
@@ -121,17 +121,17 @@ To access an environment:
121121
### Deploy an environment
122122

123123
```azurecli
124-
az devcenter dev environment deploy-action --action-id "deploy" --dev-center-name <devcenter-name> \
125-
-g <resource-group-name> --project-name <project-name> --environment-name <environment-name> --parameters <parameters-json-string>
124+
az devcenter dev environment deploy-action --action-id "deploy" --dev-center-name <devcenterName> \
125+
-g <resourceGroupName> --project-name <projectName> --environment-name <environmentName> --parameters <parametersJsonString>
126126
```
127127

128128
### Delete an environment
129129

130130
```azurecli
131-
az devcenter dev environment delete --dev-center-name <devcenter-name> --project-name <project-name> --environment-name <environment-name> --user-id "me"
131+
az devcenter dev environment delete --dev-center-name <devcenterName> --project-name <projectName> --environment-name <environmentName> --user-id "me"
132132
```
133133

134-
## Next steps
134+
## Related content
135135

136-
- Learn how to [add and configure a catalog](how-to-configure-catalog.md).
137-
- Learn how to [add and configure an environment definition](configure-environment-definition.md).
136+
- [Add and configure a catalog from GitHub or Azure DevOps](how-to-configure-catalog.md)
137+
- [Add and configure an environment definition](configure-environment-definition.md)

0 commit comments

Comments
 (0)