Skip to main content

Built-in Variables

Acorn provides built in variables to help you configure your application when deploying on Acorn.

Acorn Variables

These variables are useful in tagging resources in cloud providers and other systems. When creating resources the externalID is a good choice for a unique name that ties back to the Acorn deployment.

VariableDescription
@{acorn.account}The Acorn account name
@{acorn.project}The Acorn project name
@{acorn.name}The name of the Acorn deployment
@{acorn.namespace}The name of the of the running Acorn namespace
@{acorn.image}The image ID of the Acorn image
@{acorn.imagename}The name of the Acorn image
@{acorn.commitsha}The Git commit SHA the Acorn image was built from
@{acorn.externalID}A unique identifier for the Acorn deployment that can be used with external systems.

Service Variables

VariableDescription
@{services.[container name].endpoint}This provides the generated endpoint name for a container with a published port. The value is generated by Acorn.
@{services.[service name].address}Address to connect to the service. It is defined as part of the service.
@{services.[service name].port.[port number]}Port to connect to the service. The port number is the common port for the service. For instance a db service providing MySQL would have @{services.db.port.3306}
@{services.[service name].data.[service author defined keys]}The data for a service is defined by the author of the service. This is a way for the author to pass information about the service, like a database name, or AWS ARN.
@{services.[service name].secrets.[secret name].[secret key]}The secrets that are exposed for a service. The names and keys are defined by the author of the service.

To learn more about creating services check out the docs.