Extension

The extension block adds functionalities to terrabuild. Extensions defined in WORKSPACE are global to the workspace. Extensions can be used in PROJECT to initialize or execute actions.

An extension can run in a container to provide isolation and repeatability. See Docker for more technical information.

Example Usage

extension @dotnet {
  container = "mcr.microsoft.com/dotnet/sdk:8.0"
  variables = [ "SECRET_VAR" ]
  defaults = {
    configuration: $configuration
  }
}

Argument Reference

The following arguments are supported:

  • identifier- (Mandatory) Identifier of the extension.
  • container - (Optional) Docker image in which an action will be executed.
  • variables - (Optional) A list of environment variable names to pass from host to container.
  • defaults - (Optional) Defaults values used as action arguments. defaults is initialized with a mapping of expressions.
  • script - (Optional) F# script used to implement the extension. Argument is of type string and is a relative path to the file.
⚠️
file must have .fsx file extension. See script for more information.
Last updated on