Lifecycle hooks / scripts on instance creation and deletion

Hi,

I’d like to ask whether AMP currently supports running custom scripts or firing webhooks on instance lifecycle events (specifically creation and deletion), and if not, whether this is something that could be considered for a future release.

Use case: I run a small AMP setup for friends and I’d like to automate DNS provisioning. When a new instance is created, I want to generate a hostname based on the instance’s name and module type and create a corresponding record in Cloudflare via their API. Currently there’s no way to trigger this from AMP itself, so my options are either to wrap instance creation in my own service that calls ADSModule/DeployInstance (which works but takes the AMP UI out of the loop), or to poll GetInstances and diff against a local cache (which works but feels fragile).

What would solve this nicely:

  • A webhook fired on instance create/delete/rename events with the instance metadata in the payload, or

  • A configurable shell command / script path that AMP runs after these events with the relevant fields as arguments or env vars.

Either would let me keep AMP as the source of truth for instance management while letting me hang external automation off it cleanly. DNS is just my immediate use case — the same hook would be useful for things like reverse proxy config, monitoring setup, or pushing instance info into a status page.

I noticed issue #1319 on GitHub asks for webhook triggers on schedule events, which is related but not quite the same — that’s per-instance schedule events, whereas what I’m describing is controller-level lifecycle.

Is anything like this on the roadmap, or would you be open to a feature request for it? Happy to provide more detail on the use case if useful.

Thanks!

It does but it’s tier locked to Enterprise Edition, so in your case you’d have to periodically poll the instance list.

Thank you for the response, I’ll get right to doing that immediately. Since I don’t expect the usage to be as heavy, I feel like polling is an absolute reasonable thing to do.