@@ -304,6 +304,33 @@ hooks:
304
304
> [!TIP]
305
305
> Visit the [Customize workflows using hooks](azd-extensibility.md) article for more information about using hooks.
306
306
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
+
307
334
## Common environment variables
308
335
309
336
` azd ` sets and uses several common environment variables across all environments:
@@ -411,33 +438,6 @@ When working with `.env` files and source control:
411
438
- Regularly rotate sensitive credentials
412
439
- Consider using tools like pre-commit hooks to prevent secret leaks
413
440
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
-
441
441
## Next steps
442
442
443
443
> [ !div class="nextstepaction"]
0 commit comments