Togomak Block


Introduced in Togomak v1.0.0

The togomak {} block is used by togomak to detect if the .hcl file is a togomak pipeline, or a generic HCL file. It is required to have atleast one togomak { ... } specification in a directory where togomak is executed.

Here is a sample togomak block:

togomak {
  version = 2


  • version - A number indicating the version of the configuration file. This version can determine, and enable feature flags set within togomak, to execute running specific block types. Supports versions 1, 2 on v1.x.y, and 2 on v2.x.y


In addition to the function of just being able to determine if HCL files are togomak build configurations, togomak block also exports a set of attributes, which can be used in the pipeline, as listed below:

  • version: string, togomak's version
  • boot_time - string, time at time.RFC3339
  • boot_time_unix - string, time when the command was executed in UNIX Timestamp
  • pipeline_id - string, A unique UUID generated per execution of a togomak pipeline. This is a UUIDv4 string.
  • ci - boolean, determines if Togomak is running on CI
  • unattended - boolean, determines if Togomak is run in interactive mode, if the user passed --unattended flag, or if stdin is attached.

Each of the above may be accessed using togomak.<attribute>, as in togomak.version, and so on.