Skip to content

Commit 21da357

Browse files
committed
progress
1 parent ed0b600 commit 21da357

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

articles/azure-developer-cli/manage-environment-variables.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,33 @@ hooks:
304304
> [!TIP]
305305
> Visit the [Customize workflows using hooks](azd-extensibility.md) article for more information about using hooks.
306306
307+
## Remove or update variables
308+
309+
To remove a variable from your environment:
310+
311+
```azdeveloper
312+
azd env unset VARIABLE_NAME
313+
```
314+
315+
To update an existing variable:
316+
317+
```azdeveloper
318+
azd env set VARIABLE_NAME "new-value"
319+
```
320+
321+
To refresh your local environment variables from the current state of your Azure resources:
322+
323+
```azdeveloper
324+
azd env refresh
325+
```
326+
327+
The `azd env refresh` command is particularly useful when:
328+
329+
- Resources have been modified outside of `azd` (through the Azure portal or other tools)
330+
- Team members have updated the environment
331+
- You've switched to a different machine or workspace
332+
- You need to ensure your local configuration matches the deployed state
333+
307334
## Common environment variables
308335

309336
`azd` sets and uses several common environment variables across all environments:
@@ -411,33 +438,6 @@ When working with `.env` files and source control:
411438
- Regularly rotate sensitive credentials
412439
- Consider using tools like pre-commit hooks to prevent secret leaks
413440

414-
## Remove or update variables
415-
416-
To remove a variable from your environment:
417-
418-
```azdeveloper
419-
azd env unset VARIABLE_NAME
420-
```
421-
422-
To update an existing variable:
423-
424-
```azdeveloper
425-
azd env set VARIABLE_NAME "new-value"
426-
```
427-
428-
To refresh your local environment variables from the current state of your Azure resources:
429-
430-
```azdeveloper
431-
azd env refresh
432-
```
433-
434-
The `azd env refresh` command is particularly useful when:
435-
436-
- Resources have been modified outside of `azd` (through the Azure portal or other tools)
437-
- Team members have updated the environment
438-
- You've switched to a different machine or workspace
439-
- You need to ensure your local configuration matches the deployed state
440-
441441
## Next steps
442442

443443
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)