Resource: yet_cloud_application
Something the company runs, through its stages — one environment each, in order: staging, then production. Built from a GitHub repository, or released from an image.
Example Usage
resource "yet_cloud_application" "api" {
namespace_id = yet_cloud_namespace.shop.id
name = "api"
stages = [yet_cloud_environment.staging.id, yet_cloud_environment.production.id]
auto_promote = [yet_cloud_environment.staging.id]
repository = "acme/api"
branch = "main"
port = 3000
replicas = 2
env = {
LOG_LEVEL = "info"
}
stage_env = {
(yet_cloud_environment.production.id) = {
LOG_LEVEL = "warn"
}
}
}Schema
Required
name(String) Its name.namespace_id(String) The namespace it belongs to.stages(List of String) Its environments' ids, in the order releases go through them. Each on a runtime of its own.
Optional
auto_promote(List of String) The stages that promote to the next by themselves, once running.branch(String) The branch whose pushes are built.build_on(String) What makes a build: pushes tobranch, or tags.env(Map of String) Its variables, in every stage.max_replicas(Number) Up to how many it scales to, when more thanreplicas.port(Number) The port it listens on:8080unless set.replicas(Number) How many run in each stage:1unless set.repository(String) The GitHub repository it is built from,owner/name, through Cloud's GitHub App.stage_env(Map of Map of String) Each stage's own variables, by environment id, overenv.subdomain(String) The name it answers at under its stages' domains; its name's when left out,@for the domain's root.tag_pattern(String) The tags that make a build, when it builds on tags:v*.
Read-Only
id(String) The ID of this resource.
Import
In Terraform v1.5.0 and later, with an import block:
import {
to = yet_cloud_application.api
id = "01J9Z8K3V7Q2M4N6P8R0S2T4V6"
}With terraform import:
terraform import yet_cloud_application.api 01J9Z8K3V7Q2M4N6P8R0S2T4V6