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-developer-cli/azd-init-workflow.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,9 +112,6 @@ For advanced users who want to start with a minimal setup and customize everythi
112
112
```bash
113
113
azd init --minimal
114
114
```
115
-
116
-
> [!TIP]
117
-
> See the [azd init command reference](./azd-init-reference.md) forcomplete details on the `--minimal` flag and all available parameters.
118
115
119
116
2. When prompted, enter a name for your `azd` template and press Enter. Make sure to follow the [project name validation rules](project-name-validation.md) to prevent deployment failures.
120
117
@@ -145,6 +142,32 @@ For advanced users who want to start with a minimal setup and customize everythi
145
142
- Use the `azd add` [compose feature](azd-compose.md) to start adding Azure resources to your app
146
143
- Customize your `azure.yaml` file to define your services and resources
147
144
145
+
## Project name and Azure resource naming
146
+
147
+
When you initialize a new or existing project, the project name is setin`azure.yaml`. The project name serves as a prefix for Azure resource names created during the provisioning process. By adhering to the validation rules, you ensure that generated Azure resource names will also be valid.
148
+
149
+
In Bicep or Terraform templates, the project name is often used as a base for constructing resource names, combined with the environment name and other elements. For example:
150
+
151
+
```bicep
152
+
var resourceToken = '${name}-${environmentName}'
153
+
```
154
+
155
+
Where `name` refers to the project name and `environmentName` is the name of your `azd` environment.
156
+
157
+
## Project name validation rules
158
+
159
+
When using `azd init` to initialize a project or when creating a new project name in the `azure.yaml` file, the following validation rules are applied:
160
+
161
+
| Rule | Description |
162
+
|------|-------------|
163
+
| Allowed characters | Project names can include lowercase letters, numbers, and hyphens only. |
164
+
| Starting character | Project names must start with a letter. |
165
+
| Ending character | Project names must not end with a hyphen. |
166
+
| Length | Project names must be between 1 and 58 characters long. |
These validation rules ensure that your project name will be compatible with the naming requirements of Azure resources and prevent service packaging failures during deployment.
170
+
148
171
## Next steps
149
172
150
173
After initializing your project with `azd init`, you can:
0 commit comments