|
1 | 1 | ---
|
2 |
| -title: Schedule an environment for automatic deletion |
3 |
| -description: Learn how to schedule a deletion date and time for an environment. Set an expiration date, when the environment and all its resources are deleted. |
| 2 | +title: Schedule an Environment for Automatic Deletion |
| 3 | +description: Learn how to schedule a deletion date and time for an environment. Set an expiration date to specify when the environment and its resources are deleted. |
4 | 4 | author: RoseHJM
|
5 | 5 | ms.author: rosemalcolm
|
6 | 6 | ms.service: azure-deployment-environments
|
7 | 7 | ms.topic: how-to
|
8 |
| -ms.date: 02/23/2024 |
| 8 | +ms.date: 07/25/2025 |
9 | 9 |
|
10 | 10 | # Customer intent: As a developer, I want automatically delete my environment on a specific date so that I can keep resources current.
|
11 | 11 |
|
12 | 12 | ---
|
13 | 13 |
|
14 | 14 | # Schedule a deletion date for a deployment environment
|
15 | 15 |
|
16 |
| -In this article, you learn how to set an expiration, or end date for a deployment environment. On the expiration date, Azure Deployment Environments automatically deletes the environment and all its resources. If your timeline changes, you can change the expiration date. |
| 16 | +In this article, you learn how to set an expiration date for a deployment environment. On the expiration date, Azure Deployment Environments automatically deletes the environment and all its resources. If your timeline changes, you can change the expiration date. |
17 | 17 |
|
18 |
| -Working with many deployment environments across multiple projects can be challenging. Scheduled deletion helps you manage your environments by automatically deleting them on a specific date at a specific time. Using automatic expiry and deletion helps you keep track of your active and inactive environments and helps you avoid paying for environments that you no longer need. |
| 18 | +Working with many deployment environments across multiple projects can be challenging. Scheduled deletion helps you manage your environments by automatically deleting them on a specific date at a specific time. Using automatic expiration and deletion helps you keep track of your active and inactive environments and helps you avoid paying for environments that you no longer need. |
19 | 19 |
|
20 |
| -As a developer, you can view and schedule the expiration dates for your environment through the developer portal. You can schedule an environment for deletion when you create it, or at a later time. You can also change the expiration date and time for an environment that you created. |
| 20 | +As a developer, you can view and schedule the expiration dates for your environment in the developer portal. You can schedule an environment for deletion when you create it, or at a later time. You can also change the expiration date and time for an environment that you created. |
21 | 21 |
|
22 |
| -Deployment Environments provides platform engineers with a centralized way of viewing and managing deletion schedules for environments in Azure portal. As as user with Project Admin permissions, you can schedule any environment in your project for deletion, regardless of who created it. You can also change the expiration date and time for any environment in your project. |
| 22 | +Deployment Environments provides platform engineers with a centralized way of viewing and managing deletion schedules for environments in Azure portal. As a user with Project Admin permissions, you can schedule any environment in your project for deletion, regardless of who created it. You can also change the expiration date and time for any environment in your project. |
23 | 23 |
|
24 | 24 | ## Prerequisites
|
25 | 25 |
|
26 |
| -- To schedule *your own* environment for automatic deletion, you must have the [Deployment Environments User](how-to-configure-deployment-environments-user.md) role. |
27 |
| -- To schedule *any* environment in your project for automatic deletion, you must have the [DevCenter Project Admin](how-to-configure-project-admin.md) role. |
| 26 | +- To schedule your own environment for automatic deletion, you must have the [Deployment Environments User](how-to-configure-deployment-environments-user.md) role. |
| 27 | +- To schedule any environment in your project for automatic deletion, you must have the [DevCenter Project Admin](how-to-configure-project-admin.md) role. |
28 | 28 |
|
29 | 29 | ## Add an environment
|
30 | 30 |
|
31 |
| -Schedule an expiration date and time as you create an environment through the developer portal. |
| 31 | +You can schedule an expiration date and time when you create an environment via the developer portal. |
32 | 32 |
|
33 | 33 | 1. Sign in to the [developer portal](https://devportal.microsoft.com).
|
34 | 34 | 1. From the **New** menu at the top left, select **New environment**.
|
35 | 35 |
|
36 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/new-environment.png" alt-text="Screenshot of the developer portal showing the new menu with new environment highlighted." lightbox="media/how-to-schedule-environment-deletion/new-environment.png"::: |
| 36 | + :::image type="content" source="media/how-to-schedule-environment-deletion/new-environment.png" alt-text="Screenshot of that shows the New menu. New environment is highlighted."::: |
37 | 37 |
|
38 |
| -1. In the Add an environment pane, select the following information: |
| 38 | +1. In the **Add an environment** pane, enter or select the following values: |
39 | 39 |
|
40 | 40 | |Field |Value |
|
41 | 41 | |---------|---------|
|
42 |
| - |Name | Enter a descriptive name for your environment. | |
43 |
| - |Project | Select the project you want to create the environment in. If you have access to more than one project, you see a list of the available projects. | |
44 |
| - |Type | Select the environment type you want to create. If you have access to more than one environment type, you see a list of the available types. | |
45 |
| - |Definition | Select the environment definition you want to use to create the environment. You see a list of the environment definitions available from the catalogs associated with your dev center. | |
46 |
| - |Expiration | Select **Enable scheduled deletion**. | |
| 42 | + |**Name** | Enter a descriptive name for your environment. | |
| 43 | + |**Project** | Select the project you want to create the environment in. If you have access to more than one project, you see a list of the available projects. | |
| 44 | + |**Type** | Select the environment type you want to create. If you have access to more than one environment type, you see a list of the available types. | |
| 45 | + |**Definition** | Select the environment definition you want to use to create the environment. You see a list of the environment definitions available from the catalogs associated with your dev center. | |
| 46 | + |**Expiration** | Select **Enable scheduled deletion**. | |
47 | 47 |
|
48 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/add-environment-pane.png" alt-text="Screenshot showing the Add environment pane with Enable scheduled deletion highlighted." lightbox="media/how-to-schedule-environment-deletion/add-environment-pane.png"::: |
| 48 | + :::image type="content" source="media/how-to-schedule-environment-deletion/add-environment-pane.png" alt-text="Screenshot showing the Add an environment pane. The Enable scheduled deletion checkbox is highlighted."::: |
49 | 49 |
|
50 |
| - If your environment is configured to accept parameters, you're able to enter them on a separate pane. In this example, you don't need to specify any parameters. |
| 50 | + If your environment is configured to accept parameters, you can enter them on a separate pane. In this example, you don't need to specify any parameters. |
51 | 51 |
|
52 | 52 | 1. Under **Expiration**, select a **deletion date**, and then select a **deletion time**.
|
53 | 53 | The date and time you select is the date and time that the environment and all its resources are deleted. If you want to change the date or time, you can do so later.
|
54 | 54 |
|
55 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/set-expiration-date-time.png" alt-text="Screenshot showing the Add environment pane with expiration date and time highlighted." lightbox="media/how-to-schedule-environment-deletion/set-expiration-date-time.png"::: |
| 55 | + :::image type="content" source="media/how-to-schedule-environment-deletion/set-expiration-date-time.png" alt-text="Screenshot showing the Add an environment pane. The select deletion date and time boxes are highlighted."::: |
56 | 56 |
|
57 |
| - You can also specify a time zone for the expiration date and time. Select **Time zones** to see a list of time zones. |
| 57 | + You can also specify a time zone for the expiration date and time. Select the time zones button to see a list of time zones. |
58 | 58 |
|
59 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/select-time-zones.png" alt-text="Screenshot showing the Add environment pane with time zones link highlighted." lightbox="media/how-to-schedule-environment-deletion/select-time-zones.png"::: |
| 59 | + :::image type="content" source="media/how-to-schedule-environment-deletion/select-time-zones.png" alt-text="Screenshot showing the Add an environment pane. The time zones button is highlighted."::: |
60 | 60 |
|
61 |
| -1. Make sure that the time zone reflects the time zone you want to use for the expiration date and time. Select the time zone you want to use. |
| 61 | +1. Make sure that the time zone reflects the time zone you want to use for the expiration date and time. Select the time zone that you want to use. |
62 | 62 |
|
63 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/set-time-zone.png" alt-text="Screenshot showing the Add environment pane with the selected time zone highlighted." lightbox="media/how-to-schedule-environment-deletion/set-time-zone.png"::: |
| 63 | + :::image type="content" source="media/how-to-schedule-environment-deletion/set-time-zone.png" alt-text="Screenshot showing the Add an environment pane. A selected time zone is highlighted."::: |
64 | 64 |
|
65 |
| -1. Select **Create**. You see your environment in the developer portal immediately, with an indicator that shows creation in progress. |
| 65 | +1. Select **Create**. You see your environment in the developer portal immediately. An indicator shows that the environment is being created. |
66 | 66 |
|
67 | 67 | ## Change an environment expiration date and time
|
68 | 68 |
|
69 | 69 | Plans change, projects change, and timelines change. If you need to change the expiration date and time for an environment, you can do so in the developer portal.
|
70 | 70 |
|
71 | 71 | 1. Sign in to the [developer portal](https://devportal.microsoft.com).
|
72 | 72 |
|
73 |
| -1. On the environment you want to change, select the Actions menu, and then select **Change expiration**. |
| 73 | +1. On the environment you want to change, select the **Actions** menu (**...**), and then select **Change expiration**. |
74 | 74 |
|
75 | 75 | :::image type="content" source="media/how-to-schedule-environment-deletion/environment-tile-actions.png" alt-text="Screenshot of the developer portal, showing an environment tile with the actions menu open, and Change expiration highlighted." lightbox="media/how-to-schedule-environment-deletion/environment-tile-actions.png":::
|
76 | 76 |
|
77 |
| -1. In Change expiration, you can change any of the following options: |
| 77 | +1. In the **Change \<environment> expiration** pane, you can change any of the following options: |
78 | 78 | - Clear **Enable scheduled deletion** to disable scheduled deletion.
|
79 | 79 | - Select a new date for expiration.
|
80 | 80 | - Select a new time for expiration.
|
81 | 81 | - Select a new time zone for expiration.
|
82 | 82 |
|
83 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/change-expiration-date-time.png" alt-text="Screenshot of the developer portal, showing the options for scheduled deletion, which you can change." lightbox="media/how-to-schedule-environment-deletion/change-expiration-date-time.png"::: |
| 83 | + :::image type="content" source="media/how-to-schedule-environment-deletion/change-expiration-date-time.png" alt-text="Screenshot showing the options for scheduled deletion." lightbox="media/how-to-schedule-environment-deletion/change-expiration-date-time.png"::: |
84 | 84 |
|
85 |
| -1. When you've set the new expiration date and time, select **Change**. |
| 85 | +1. After you set the new expiration date and time, select **Change**. |
86 | 86 |
|
87 |
| -## Schedule an environment for deletion as a project admin |
| 87 | +## Schedule an environment deletion as a project admin |
88 | 88 |
|
89 |
| -Developers might not always know when an environment is no longer needed. As a project admin, you can schedule any environment in your project for deletion, regardless of who created it. |
| 89 | +Developers might not always know when an environment is no longer needed. As a project admin, you can schedule the deletion of any environment in your project, regardless of who created it. |
90 | 90 |
|
91 |
| -1. Sign in to the [Azure portal](https://portal.azure.com), and select the project that contains the environment you want to schedule for deletion. |
| 91 | +1. Sign in to the [Azure portal](https://portal.azure.com), and select the project that contains the environment that you want to schedule for deletion. |
92 | 92 |
|
93 |
| -1. In the left-hand menu, select **Environments**. |
| 93 | +1. In the left pane, under **Manage**, select **Environments**. |
94 | 94 |
|
95 | 95 | 1. In the list of environments, for the environment you want to schedule for deletion, scroll right, and then select **...** > **Change expiration**.
|
96 | 96 |
|
97 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/azure-portal-schedule-environment-deletion.png" alt-text="Screenshot of the Azure portal, showing the left-hand menu with Deployment Environments highlighted." lightbox="media/how-to-schedule-environment-deletion/azure-portal-schedule-environment-deletion.png"::: |
| 97 | + :::image type="content" source="media/how-to-schedule-environment-deletion/azure-portal-schedule-environment-deletion.png" alt-text="Screenshot showing the initial steps for changing an expiration." lightbox="media/how-to-schedule-environment-deletion/azure-portal-schedule-environment-deletion.png"::: |
98 | 98 |
|
99 |
| -1. On the **Change expiration date** pane, select **Enable scheduled deletion**. |
| 99 | +1. In the **Change \<environment> expiration date** pane, select **Enable scheduled deletion**. |
100 | 100 |
|
101 | 101 | 1. Select the date and time you want the environment to expire and be deleted, and then select **Save**.
|
102 | 102 |
|
103 |
| - :::image type="content" source="media/how-to-schedule-environment-deletion/azure-portal-change-expiration-date.png" alt-text="Screenshot of the Azure portal, showing the Change expiration date pane." lightbox="media/how-to-schedule-environment-deletion/azure-portal-change-expiration-date.png"::: |
| 103 | + :::image type="content" source="media/how-to-schedule-environment-deletion/azure-portal-change-expiration-date.png" alt-text="Screenshot showing the change expiration date pane."::: |
104 | 104 |
|
105 | 105 | The environment is now scheduled for deletion on the date and time you specified.
|
106 | 106 |
|
|
0 commit comments