Canvas

The canvas in the console lets you draw infrastructure instead of writing it. You place blocks with typed ports on an infinite canvas and join them with arrows. What you draw is saved as a Diagram object, and a controller builds the resources it describes. This page lists the blocks and shows how a diagram turns into objects.

Blocks

BlockInputsOutputsBuilds
string number bool (Text, Number, Boolean)valuevalue
Logic: concat add sub mul div lessthan equals and or not ifstring ifnumber tostring tonumbera, b (or a value)value
vpccidr, ipv6Prefix, gateway, mtu, encapsulation, enabledvpc: ref:VPC, ipv6Prefix, ipv6Address, gatewayAddress, vni, mtu, accountCount, phaseVPC
accountvpc: ref:VPC, ipAddress, publicKey, enabledaccount, ipAddress, ipv6Address, macAddress, underlayAddress, vni, mtu, encapsulation, phaseAccount
dnsvpc: ref:VPC, zone, forwarders, registerAccounts, records, enableddns: ref:DNSService, address, zone, recordCount, phaseDNSService
dhcpvpc: ref:VPC, poolStart, poolEnd, leaseSeconds, routers, dnsServers, domain, reservations, enableddhcp: ref:DHCPService, address, reservationCount, phaseDHCPService
loadbalancervpc: ref:VPC, level, algorithm, hashKey, protocols, listeners, backends, health check fields, nodes, memoryPower, cpuMillicores, enabledloadbalancer: ref:LoadBalancer, address, healthyBackends, plan, phaseLoadBalancer
ingressvpc: ref:VPC, level, target and default target fields, listeners, rules, nodes, memoryPower, cpuMillicores, enabledingress: ref:Ingress, address, plan, phaseIngress
dnsrecord dhcpreservation lbbackend lblistener ingresslistener ingressrulethe fields of one list entryone entry, for the list input of the block it feeds

Set a block's enabled input to false to remove its object but keep the block on the canvas.

Ports have one of these types: string, number, bool, ref:<Kind>, or one of the list-entry types that the record blocks produce. You can only connect an output to an input of the same type. If you leave an input unlinked, you give it a value inline.

Diagram

Drag blocks from the palette onto the canvas, or click one to drop it in the middle. You can collapse the palette's categories to save room. Here is a small diagram as YAML: a VPC and a DNS service whose zone comes from a text block.

apiVersion: flow.etorm.com/v1alpha1
kind: Diagram
metadata: {name: net}
spec:
  blocks:
    - {id: z, type: string,  name: zone,   x: 40,  y: 40,  params: {value: corp.test}}
    - {id: v, type: vpc,     name: lan,    x: 330, y: 120, params: {}}
    - {id: n, type: dns,     name: names,  x: 640, y: 120, params: {}}
  links:
    - {from: {block: v, port: vpc},   to: {block: n, port: vpc}}
    - {from: {block: z, port: value}, to: {block: n, port: zone}}

From this, the controller creates a VPC named lan and a DNSService named names, both labelled with the diagram. If you remove a block, its object is deleted. If you delete the diagram, everything it built goes with it.

The controller never adopts an existing object with the same name that the diagram did not create, so a diagram cannot take over something you made by hand.

Monitor

Switch the console to Monitor mode to watch the saved diagram live. Each block gets a status LED, every output shows its current value, and you can see values travel along the arrows. Issues and block messages are listed below the canvas. Monitor mode reads status.blocks.<id> every 3 seconds.

Status of a diagram

From the command line, read the diagram's phase, and its issues if it is Invalid.

kubectl get diagram net -o jsonpath='{.status.phase}'      # Invalid | Progressing | Ready | Failed | Paused
kubectl get diagram net -o jsonpath='{.status.issues}'     # why it is Invalid