ackee
Docs/Ackee Script

node

Any resource in the catalogue, declared exactly.

node declares one resource from Ackee's catalogue exactly: you pick the type, and every field the type offers is yours to set. It is how a file reaches anything the portable declarations do not cover — a load balancer, a queue, a bucket, a scheduled job — and it is what the canvas writes for every card you draw.

a node
node "uploads" type "aws/s3-bucket@1" {
name = "uploads"
versioning = true
}

Shape

node, the node's id in quotes, type and the type in quotes, then the fields. Both are required (AK206).

  • The id is how connections refer to the node and how Ackee recognises it from one deploy to the next. Renaming it replaces the resource.
  • The type is cloud/kind@version, such as aws/s3-bucket@1 or gcp/pubsub@1. It must belong to the project's cloud.
  • The fields are the type's own, with the names and value kinds its reference lists. Most types take a name, which becomes part of the resource's name in the cloud — so changing it replaces the resource too.

The catalogue

Every type, with every field, its default and what it creates, is in the resource reference: AWS, Google Cloud and Azure. Field names there are exactly the names you write here. A field the type does not have is refused when the file is checked rather than ignored, so a typo cannot silently deploy a default.

Type versions

The @1 in a type is a promise: what aws/s3-bucket@1 builds from a given set of fields does not change. When a resource type needs to behave differently, it arrives as @2 beside the old one, and your file moves to it when you change the line — never because Ackee was updated.

Mixing with portable declarations

node and the portable declarations live side by side, and connect to each other by name. The network that service and database share is called net, so a node joins it with connect network "net" -> "...":

ackee.ack
ackee 1
​
project "shop" {
cloud = "aws"
region = "us-east-1"
}
​
service "web" {
image = "public.ecr.aws/nginx/nginx:latest"
port = 80
​
# Reached through the load balancer below, which carries the domain
# and certificate, rather than through one of its own.
public = false
}
​
node "lb" type "aws/alb@1" {
name = "public"
healthCheckPath = "/"
}
​
node "site" type "aws/domain@1" {
hostedZoneId = "Z0123456789EXAMPLE"
recordName = "shop.example.com"
}
​
node "cert" type "aws/acm-certificate@1" {
domainName = "shop.example.com"
hostedZoneId = "Z0123456789EXAMPLE"
}
​
# `service` and `database` share a network called net; other
# declarations can join it by name.
connect network "net" -> "lb"
connect traffic "lb" -> "web"
connect traffic "lb" -> "site"
connect traffic "lb" -> "cert"

Raw resources

Each cloud has one more type, aws/raw@1, gcp/raw@1 and azure/raw@1, for a cloud resource no catalogue type covers yet. It takes the provider's own resource kind and its settings, and none of the catalogue's defaults: you decide everything, including what it hands to the declarations connected to it. Prefer a catalogue type when one exists. The raw resource reference lists every kind each cloud supports.