Resource

dcloud_app_autoscaling

Replica autoscaling of an app: between min_replicas and max_replicas machines on one metric (cpu, memory, requests per machine, or a queue's backlog per machine) and its target, with scale-out and scale-in cooldowns and a drain before a machine is removed. While it exists the platform sets the app's replicas: leave replicas out of dcloud_app (or ignore its changes). Destroying it turns autoscaling off; the app keeps its current machines.

Schema

Required

  • app_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.
  • max_replicas (Number) Most machines; above 1 puts the app behind its load balancer at every size. From 1 to 10.
  • min_replicas (Number) Fewest machines. From 1 to 10.
  • policies (String) The policy, as a JSON list of one: [{ metric = "cpu" | "memory" | "requests" | "queue", target = 60, queueId = null }]; use jsonencode.

Optional

  • drain_seconds (Number) Most seconds a machine out of the load balancer may finish its requests before it is deleted. Default 30. From 0 to 600.
  • scale_in_cooldown_seconds (Number) Seconds after any change before a scale-in. Default 300. From 0 to 3600.
  • scale_out_cooldown_seconds (Number) Seconds after a scale-out before the next one. Default 60. From 0 to 3600.

Read-Only

  • id (String) The resource's id.
  • replicas (Number) Machines the app runs on now.

Generated from the provider's schema.