Skip to main content

Static Unit

@klotho::static_unit

The static unit capability hosts files to be used by the general application. Static units can host files as static websites.

Directives

DirectiveTypeDescription
idstring(Required) The name of the execution unit. Files with the same execution unit name are guaranteed to stay together.
index_documentstring(Optional) The index document specifies a root file if hosting a static website. By setting the index document field, klotho understands the static unit, to be a static hosted website.
static_filesstring[](Optional) A list of files which belong solely to the static unit. Glob patterns (* and **) are supported.
shared_filesstring[](Optional) A list of files which belong to both the static unit and other units. Glob patterns (* and **) are supported.
note

The shared_files directive takes precedence over the static_files directive. If a file matches both the static_files and shared_files patterns, it will be considered a shared file.

All paths specified in the static_files and shared_files directive must be an absolute path, from the klotho compilation root, or a relative path from the file where the annotation lives.

Configuration

Static Units can be further configured within the Klotho configuration.

Providers

Supported aws static unit types include: