---
title: "Managing Cloud Platform CD environments"
date: "2024-02-14T06:18:38+00:00"
summary: "Streamline your development process with Cloud Platform CD environments. Create, manage, and remove on-demand environments easily using the UI, Pipelines, or API. Boost deployment speed and efficiency for your team."
image:
type: "page"
url: "/acquia-cloud-platform/managing-cloud-platform-cd-environments"
id: "4a6f86aa-e2a8-4db9-88cb-b946f4ceb07f"
---

Table of contents will be added

To give increased production-ready deployment speed, reliability, and cost efficiency, Cloud Platform CD enables developer teams to create and work in multiple development environments, and remove those on-demand environments when developer teams no longer require them. Created CD environments persist until you [delete](#cd-delete-env-ui) them.

_CD environments_ are built dynamically and are similar to [regular Drupal-based environments](/acquia-cloud-platform/working-environments "Working with environments"). For more information on CD environments, see:

*   [CD environment resources and limitations](/acquia-cloud-platform/features/cd/resource)
*   [Resources for Pipelines jobs](/acquia-cloud-platform/features/pipelines/container)

Cloud Platform CD environment entitlements vary by subscription type. Contact your Acquia account team if you have questions about the Cloud Platform CD environments included with your subscription:

*   [Managing your environments with the Cloud Platform user interface](#cd-manage-envs-ui)
*   [Managing your environments with Pipelines](#cd-manage-environments)
*   [Managing your environments with Cloud Platform API v2](#cd-manage-environment-api)

If you need more CD environments, contact your Account Manager.

Managing your environments with the Cloud Platform user interface
-----------------------------------------------------------------

The Cloud Platform user interface allows users with the _Add an environment_ and _Delete an environment_ [permissions](/acquia-cloud-platform/access/teams/permissions) to add and remove CD environments from your application.

### Adding an environment with the user interface

To add a CD environment to your subscription:

1.  [Sign in to the Cloud Platform user interface](/node/55875) as a user with the _Add an environment_ [permission](/acquia-cloud-platform/access/teams/permissions).
2.  Select the application in which you want to create a CD environment. To find if an application already has a CD environment, examine the application’s card as displayed in the following example:
    
    ![cloud-platform_viewing-number-of-environments.png](https://acquia.widen.net/content/3a602cea-8fd5-4afa-8737-1816dc542799/web/cloud-platform_viewing-number-of-environments.png)
    
3.  Click **Actions** > **Add CD Environment**.
    
    ![cloud-platform_adding-cd-environments.png](https://acquia.widen.net/content/9a1e6cf2-83c4-49cc-95bb-9f5f11de66ee/web/cloud-platform_adding-cd-environments.png)
    
    If your application doesn’t have any environments, Cloud Platform displays an **Add environment** button on the page.
    
4.  In **Enter a label for the new environment**, enter a label for this environment. Acquia strongly recommends you label this environment as a temporary environment.
5.  Click **Continue**.   
    Cloud Platform displays the **Add Environment** dialog box.  
     
    
    ![cloud-platform_filtering-branch.png](https://acquia.widen.net/content/7a4159a7-c382-4f4e-9bff-8fdd83ab531c/web/cloud-platform_filtering-branch.png?w=480&itok=5lZ3izNZ)
    
6.  In the **Select branch** list, click the branch you want to deploy to your Cloud Platform CD environment.
7.  Click **Continue**.   
    If you have more than three databases in your environment, Cloud Platform displays the **Select up to 3 databases** dialog box.
8.  Select the checkboxes next to the database schemas you want to add to the environment, up to a maximum of three schemas.
9.  Click **Continue**.   
    Cloud Platform displays a dialog box to confirm your choices and display the number of remaining CD environments.
10.  Click **Add environment**.

Cloud Platform creates your CD environment. You can review the environment’s creation status in the [activity notifications](/acquia-cloud-platform/manage-apps/notify) section of the interface. You can configure the settings for your new CD environment in the [configuration settings](/acquia-cloud-platform/configuring-php-settings "Configuring PHP settings").

### Deleting an environment with the user interface

When you no longer need a CD environment, use the following steps to delete the environment from Cloud Platform:

1.  [Sign in to the Cloud Platform user interface](/node/55875) as a user with the _Delete an environment_ [permission](/acquia-cloud-platform/access/teams/permissions)
2.  Use one of the following methods for the CD environment you want to remove:
    *   Click the **Trash can** icon for the environment you want to remove, as displayed in the following example:
        
        ![cloud-platform_deleting-a-cd-environment.png](https://acquia.widen.net/content/720637ca-64db-4e90-86dd-76b0dbf0ca60/web/cloud-platform_deleting-a-cd-environment.png?w=480&itok=Kl8SQHOv)
        
    *   From your environment’s action icons, click the **Remove** icon.
3.  In the dialog box, type `CONFIRM`, and then click **Remove**.

After Cloud Platform completes the removal process, the CD environment is no longer available for your use.

Managing your environments with Pipelines
-----------------------------------------

Using [Pipelines](/acquia-cloud-platform/features/pipelines), Cloud Platform CD allows you to create or remove CD environments as instructions in an executed [build definition file](/acquia-cloud-platform/features/pipelines/yaml). To create or remove a CD environment during a pipeline job, use the [pipelines-deploy](/acquia-cloud-platform/features/pipelines/commands#pipelines-deploy) command.

*   [Creating a CD environment with Pipelines](#cd-create-environment-pipelines)
*   [Removing a CD environment with Pipelines](#cd-remove-environment-pipelines)
*   [Copying files to an on-demand environment](/acquia-cloud-platform/features/pipelines/yaml/examples#pipelines-yaml-copy-files)

Important

*   You can’t run the [pipelines-deploy](/acquia-cloud-platform/features/pipelines/cli/commands#pipelines-cli-commands) command inside the `build` event.
*   For more information about building and using build definition files, see [Creating and managing your build definition file](/acquia-cloud-platform/features/pipelines/yaml).

### Creating a CD environment with Pipelines

To create a CD environment, place the [pipelines-deploy](/acquia-cloud-platform/features/pipelines/commands#pipelines-deploy) instruction in the `build` element, similar to the following example:

    build:
      steps:
        - build_site:
              script:
                - echo "Build instructions here"
    post-deploy:
      steps:
        - deploy:
                script:
                - pipelines-deploy

Note

If you receive a failure notice for your deployment, review the [Cloud CD known issues](/acquia-cloud-platform/features/cd/known-issues).

### Removing a CD environment with Pipelines

To remove a CD environment, place the [pipelines-deploy](/acquia-cloud-platform/features/pipelines/commands#pipelines-deploy) instruction in either the [pr-merged](/node/56256#pr-merged) or [pr-closed](/node/56256#pr-closed) elements, similar to the following examples:

    pr-merged:
      steps:
         - deploy:
              script:
                 - pipelines-deploy

    pr-closed:
         steps:
          - deploy:
               script:
                    - pipelines-deploy

Managing your environments with Cloud Platform API v2
-----------------------------------------------------

The [Cloud Platform API](/acquia-cloud-platform/develop-apps/api) provides a REST API you can use to manage your CD environments, and [monitor the progress](/acquia-cloud-platform/scripting-api-tasks-notification-parameter "Scripting API tasks with the notification parameter") of ongoing tasks.

The API includes the following methods you can use with your CD environments:

*   [Create a CD environment](https://cloudapi-docs.acquia.com/#/Applications/postApplicationEnvironments)
*   [Delete a CD environment](https://cloudapi-docs.acquia.com/#/Environments/deleteEnvironment)
*   [Display CD environment size options](https://cloudapi-docs.acquia.com/#/Options/getCdeSizes)

For information about authenticating to the API, including generating an API token, authenticating requests, and available endpoints, visit the [Cloud Platform API documentation](https://cloudapi-docs.acquia.com/).