Skip to main content

Module hooks

Module hooks 

Source
Expand description

What crosses between Alien and an extension’s hooks module: the hooks the module declares, and the input and output of each kind of hook.

Every value crosses as JSON in the serde forms below. The extension SDK writes them inside the module and the hosts that call hooks read them, so both sides compile against these types. Where a hook returns a type a format crate owns (a CloudFormation template, a resource or an expression), HookKind names it and it crosses in that type’s own serde form.

Structs§

EmitInput
What an emitter gets: the parts of Alien’s EmitContext that serialize.
HelmFragmentOutput
What a Helm emitter returns.
HelmInfrastructureValue
One entry under infrastructure: in a chart’s values.yaml.
HelmModifierOutput
What a Helm modifier returns.
HookEntry
One hook the module declares.
HookError
A hook’s error as it crosses back to the host: the hook’s code and message, and whether another try may pass. The host keeps the code when it is a short [A-Z0-9_] token and the retry flag, and cuts the message short. Only an error that sets retryable itself is retried; one converted from an AlienError is final, since a hook gives the same answer to the same input.
HooksManifest
The hooks a module declares, as its alien_hooks_manifest export returns them.
ImportInput
What an importer gets: the parts of Alien’s ImportContext that serialize, and the data the setup template returned.
ImportOutput
What an importer returns. The controller state carries no type tag or state version, which only Alien writes.
InterceptedRequest
A request as an interceptor sees it: no credential headers, and a text body or none.
InterceptedResponse
A response as an interceptor sees it.
LinkOutput
What a link returns for a workload that links the resource.
TemplateFiles
A Terraform module or a Helm chart, file by file.
TerraformFragment
The blocks a Terraform emitter returns, each list as HCL text.
TerraformModifierOutput
What a Terraform modifier returns.

Enums§

EmitMethod
Which method of an emitter a call runs.
HookKind
The kinds of hook a module can declare. A module that declares any other kind is refused at load, since no host could call that hook.
InterceptedCloud
The API a call goes to.
InterceptorInput
A call to an interceptor, by what it asks.
InterceptorOutput
An interceptor’s answer.