runway.module.staticsite package

Runway Static Site Module.

class runway.module.staticsite.StaticSite[source]

Bases: runway.module.base.RunwayModule

Static website Runway Module.

__init__(context: RunwayContext, *, explicitly_enabled: Optional[bool] = False, logger: RunwayLogger = <RunwayLogger runway.module.staticsite.handler (WARNING)>, module_root: Path, name: Optional[str] = None, options: Optional[Union[Dict[str, Any], ModuleOptions]] = None, parameters: Optional[Dict[str, Any]] = None, **_: Any) None[source]

Instantiate class.

  • context – Runway context object for the current session.

  • explicitly_enabled – Whether or not the module is explicitly enabled. This is can be set in the event that the current environment being deployed to matches the defined environments of the module/deployment.

  • logger – Used to write logs.

  • module_root – Root path of the module.

  • name – Name of the module.

  • options – Options passed to the module class from the config as options or module_options if coming from the deployment level.

  • parameters – Values to pass to the underlying infrastructure as code tool that will alter the resulting infrastructure being deployed. Used to templatize IaC.

property sanitized_name: str

Sanitized name safe to use in a CloudFormation Stack name.

Errors are usually caused here by a . in the name. This unintelligently replaces . with -.

If issues are still encountered, we can check against the regex of (?=^.{1,128}$)^[a-zA-Z][-a-zA-Z0-9_]+$.

deploy() None[source]

Create website CFN module and run CFNgin.deploy.

destroy() None[source]

Create website CFN module and run CFNgin.destroy.

init() None[source]

Run init.

plan() None[source]

Create website CFN module and run CFNgin.diff.

__getitem__(key: str) Any

Make the object subscriptable.


key – Attribute to get.