New to Kestra?
Use blueprints to kickstart your first workflows.
Provision a Lets Encrypt certificate for a VM, discover the attached IP asset dynamically from the Kestra catalog, and register the cert with issuer metadata.
Certificates expire silently when nobody records where they live. This blueprint provisions a TLS certificate for a virtual machine and registers it as a typed io.kestra.plugin.ee.assets.VM.Certificate asset, with lineage back to both the VM and the IP address it protects. Its standout feature is asset-driven input resolution: the ip_asset_id input queries the catalog at execution time to find the IP asset attached to the chosen VM, so operators never paste raw asset ids.
target_vm and target_ip inputs identify the machine and address to certify.ip_asset_id input is a dynamic SELECT with dependsOn: [target_vm]. Its expression calls assets(type='io.kestra.plugin.ee.assets.VM.IP'), pipes the result through jq to select the entry whose metadata.attached_to equals the chosen VM, and takes the first match. With autoSelectFirst: true the right IP asset is preselected as soon as the VM name is typed.certbot_provision task (io.kestra.plugin.scripts.shell.Script) simulates the ACME issuance. It declares two assets.inputs, the slugified VM and the resolved IP asset, wiring the certificate into the lineage graph.assets.outputs entry keyed cert-{{ execution.id }}, with issuer, valid_until, and vm metadata.VM.Certificate asset per issuance, with issuer and expiry metadata you can query.SELECT inputs using assets(), jq, and dependsOn.valid_until.Certbot issues certificates but keeps no inventory, no link to the machine or address, and no expiry governance. Kestra Assets give every certificate a typed catalog entry with metadata and lineage, while the assets() expression function turns the catalog into live form data for execution inputs. Add schedules, retries, and full audit history, and certificate management becomes observable end to end.
VM.IP asset already registered, for example by running asset-create-vm then asset-assign-external-ip, otherwise the ip_asset_id dropdown is empty.asset-create-vm and asset-assign-external-ip for the same VM name.VM.Certificate asset and its lineage in the Assets view.valid_until metadata to match your real certificate lifetime.certbot certonly command or an ACME client container.valid_until from the actual certificate instead of hardcoding it.assets(type='io.kestra.plugin.ee.assets.VM.Certificate') and alerts when expiry is near.