Resource

dcloud_app_env

The whole environment of an app: this resource owns every variable, so a variable set elsewhere is removed on the next apply. Destroying it empties the environment.

Example Usage

resource "dcloud_app_env" "web" {
  app_id = dcloud_app.web.id
  vars = {
    LOG_LEVEL = "info"
  }
  secret_vars = {
    API_TOKEN = dcloud_secret.api_token.id
  }
  redeploy = true
}

Schema

Required

  • app_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.

Optional

  • redeploy (Boolean) Start a deployment with the new environment when it changes. Never returned by the API: not read back, and empty after an import.
  • secret_vars (Map of String) Variables read from Secrets at deploy time, name → secret id.
  • vars (Map of String) Plain variables, name → value.

Read-Only

  • id (String) The resource's id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_app_env.web <app-id>

Generated from the provider's schema.