Skip to content

Commit e6e585e

Browse files
committed
fixes
1 parent 92120f2 commit e6e585e

File tree

2 files changed

+26
-95
lines changed

2 files changed

+26
-95
lines changed

articles/azure-developer-cli/azd-init-workflow.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ For advanced users who want to start with a minimal setup and customize everythi
112112
```bash
113113
azd init --minimal
114114
```
115-
116-
> [!TIP]
117-
> See the [azd init command reference](./azd-init-reference.md) for complete details on the `--minimal` flag and all available parameters.
118115

119116
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.
120117

@@ -145,6 +142,32 @@ For advanced users who want to start with a minimal setup and customize everythi
145142
- Use the `azd add` [compose feature](azd-compose.md) to start adding Azure resources to your app
146143
- Customize your `azure.yaml` file to define your services and resources
147144

145+
## Project name and Azure resource naming
146+
147+
When you initialize a new or existing project, the project name is set in `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. |
167+
| No consecutive hyphens | Project names cannot contain consecutive hyphens. |
168+
169+
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+
148171
## Next steps
149172

150173
After initializing your project with `azd init`, you can:

articles/azure-developer-cli/project-name-validation.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)