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
Directive | Type | Description |
---|---|---|
id | string | (Required) The name of the execution unit. Files with the same execution unit name are guaranteed to stay together. |
index_document | string | (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_files | string[] | (Optional) A list of files which belong solely to the static unit. Glob patterns (* and ** ) are supported. |
shared_files | string[] | (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
- AWS
- GCP
Supported aws static unit types include:
- s3 (default)
caution
GCP hasn't been updated to v1 yet, so this is just a projection of what it may be.