Skip to main content

IO Configuration Reference

426 words·2 mins
Agent IO
Author
Agent IO
Table of Contents

HCL configuration basics
#

The IO configuration format is based on the Hashicorp Configuration Language. This provides a level of readability that far surpasses Envoy’s YAML configuration, of course at the cost of significantly reduced detail. Still, IO’s HCL configuration seems right for the high-level tasks at hand, which you can see in the reference below.

IO configuration file structure
#

IO’s configuration can be divided among any number of files, and these can be read into IO in any order. When it is convenient to include elements in the same file, that’s great, and when it’s helpful to split files into pieces for readability or reuse, that’s also great.

IO configuration elements
#

Here’s a list of IO’s top-level configuration elements. Examples and more details will be added soon.

The license value
#

Specify an IO license key with the license block.

The calling block
#

This provides general configuration affecting all called APIs.

call blocks
#

These blocks describe individual APIs to be called.

serve blocks
#

These blocks describe individual APIs to be served.

The ingress block
#

This provides general configuration affecting all ingresses.

host blocks
#

These blocks describe individual ingress hosts.

secret blocks
#

These blocks specify secrets that can be used when APIs are called.

credential blocks
#

These blocks contain TLS credentials.

The service_account_key block
#

This block specifies a Google Cloud service account key.

user blocks
#

These blocks specify users that can make SSH and SFTP connections to an IO instance.

Reading and writing IO configuration
#

The -c option reads configuration on startup
#

IO can read configuration files on startup when they are specified with the -c flag. Any number of -c flags can be provided. If -x is also specified, IO will immediately exit after configurations are read, leaving an initialized io.db, which retains configuration for subsequent runs of IO.

The terminal UI can read and write local files
#

In the TUI, the r and w keys can trigger IO to read and write local configuration files.

SFTP allows reading and writing to remote IOs
#

Remote IOs can be configured with SFTP. Any file with the .hcl extension is treated as IO configuration when it is copied to IO with SFTP or SCP. For example, this applies a new calling configuration to an IO running at REMOTE:

scp -P 8022 calling.hcl REMOTE:

Configuration can also be read with SFTP and SCP. For example, this copies all of the configuration from an IO running at REMOTE:

scp -r -P 8022 REMOTE:config .