Ignitify.dev
Network access
Guides

Network access

A task has no network until you ask for it. Set execution.network in task.yaml to let it call out, or to serve requests.

1 · Allow outbound hosts

Set type: egress and list the hosts the task may reach; leave the list out to allow all hosts, or write [] to allow none.

task.yaml
execution:
  network:
    type: egress              # none (default) | egress | bidirectional
    egress_allow:
      - api.github.com
      - "*.s3.amazonaws.com"  # a left-most * is the only wildcard

2 · Check it offline

task:validate refuses a network block that does not fit together before you deploy.

terminal
$ ignitify task:validate fetch✓ task config valid

3 · Reach an allowed host

A call to a host on the list works.

terminal
$ ignitify task:run fetch --payload '{"url":"https://api.github.com"}' --wait✓ Run COMPLETED · 9sRun Detailsstatus  COMPLETEDResult:  {    "url": "https://api.github.com",    "status": 200  }

4 · See a blocked host

A call to any other host is cut off, and the task sees a reset connection.

terminal
$ ignitify task:run fetch --payload '{"url":"https://example.com"}' --wait✓ Run COMPLETED · 12sRun Detailsstatus  COMPLETEDResult:  {    "url": "https://example.com",    "error": "Error: read ECONNRESET"  }

5 · Serve requests

Use type: bidirectional with the port the task listens on and the paths you open, because a path you do not list is refused.

task.yaml
execution:
  network:
    type: bidirectional
    inbound_port: 8080          # required; the task calls ctx.ready() once it listens
    inbound_routes:
      - prefix: /webhooks/
      - path: /health

With residency: pinned and state: across-runs, the task keeps serving inbound requests between runs. Start the listener once and leave it open, and still call ctx.ready() in each run. If the listener closes or the process exits between runs, the address fails until the next run. With state: independent, the address does not answer between runs.

6 · Choose what a second run does

A bidirectional task runs one VM at a time, and --on-busy picks whether a second run waits (queue) or fails at once (reject). Without the flag, the deployment's execution.on_busy applies, and queue if it sets none. Queued runs run in turn on that VM, so with state: across-runs they share its memory. Behind a busy pinned VM a run does not wait, also with queue: the run is accepted, then fails with bidirectional-busy.

terminal
$ ignitify task:run listen --on-busy reject✗ Run refused — this bidirectional deployment already has a live VM.  Concurrent VMs for bidirectional-network tasks are not supported  (one VM at a time).  Retry when the live VM finishes, or omit --on-busy=reject to queue instead.server trace id: 019fdec6-5c20-7a14-b8d3-0f7e2c91a4b6