kerry-0.1.1: Manage and abstract your packer configurations.

Safe HaskellSafe




All strings within templates are processed by a common Packer templating engine, where variables and functions can be used to modify the value of a configuration parameter at runtime.



newtype Template Source #




Eq Template Source # 
Instance details

Defined in Kerry.Engine

Ord Template Source # 
Instance details

Defined in Kerry.Engine

Show Template Source # 
Instance details

Defined in Kerry.Engine

User Variable

user :: Text -> RawTemplate Source #

User variables

Template Variable

templateVariable :: Text -> Template Source #

Template variables are special variables automatically set by Packer at build time. Some builders, provisioners and other components have template variables that are available only for that component. Template variables are recognizable because they're prefixed by a period, such as {{ .Name }}.


buildName :: RawTemplate Source #

The name of the build being run.

buildType :: RawTemplate Source #

The type of the builder being used currently.

env :: Text -> RawTemplate Source #

Returns environment variables. See example in using home variable

isotime :: Text -> RawTemplate Source #

UTC time, which can be formatted. See more examples below in the isotime format reference.

lower :: RawTemplate Source #

Lowercases the string.

pwd :: RawTemplate Source #

The working directory while executing Packer.

sed :: Text -> Text -> RawTemplate Source #

Use a golang implementation of sed to parse an input string.

split :: Text -> Text -> Int -> RawTemplate Source #

Split an input string using separator and return the requested substring.

templateDir :: RawTemplate Source #

The directory to the template for the build.

timestamp :: RawTemplate Source #

The current Unix timestamp in UTC.

uuid :: RawTemplate Source #

Returns a random UUID.

upper :: RawTemplate Source #

Uppercases the string.

packerVersion :: RawTemplate Source #

Returns Packer version.

cleanResourceName :: RawTemplate Source #

Image names can only contain certain characters and have a maximum length, eg 63 on GCE & 80 on Azure. clean_resource_name will convert upper cases to lower cases and replace illegal characters with a "-" character.