Resource: yet_cloud_environment

Where a stage of the company's applications runs — staging, production — on a runtime or a pool, and the domain it answers at.

Note: It moves to another runtime or pool only while nothing is deployed there — or between a pool and one of its members.

Example Usage

resource "yet_cloud_environment" "staging" {
  name       = "staging"
  color      = "amber"
  runtime_id = yet_cloud_runtime.k3s.id
  zone_id    = yet_cloud_dns_zone.acme.id
  prefix     = "staging"
}

resource "yet_cloud_environment" "production" {
  name    = "production"
  color   = "green"
  pool_id = yet_cloud_pool.web.id
  zone_id = yet_cloud_dns_zone.acme.id
}

Schema

Required

  • name (String) Its name, never changed: lowercase letters, digits and dashes, up to 32, starting with a letter. Its namespace is yet-<name>.

Optional

  • color (String) How Cloud draws it: gray, red, orange, amber, green, teal, sky, blue, violet, pink.
  • pool_id (String) The pool it runs on — or runtime_id.
  • prefix (String) What goes before the zone's name: staging makes it staging.<zone>. Its root without one.
  • runtime_id (String) The runtime it runs on — or pool_id. It moves only while nothing is deployed there, or between a pool and one of its members.
  • zone_id (String) The DNS zone it answers in. Without one, its applications get temporary addresses.

Read-Only

  • domain (String) Where its applications answer: <subdomain>.<domain>.
  • id (String) The ID of this resource.

Import

In Terraform v1.5.0 and later, with an import block:

import {
  to = yet_cloud_environment.staging
  id = "01J9Z8K3V7Q2M4N6P8R0S2T4V6"
}

With terraform import:

terraform import yet_cloud_environment.staging 01J9Z8K3V7Q2M4N6P8R0S2T4V6