Review monitor changes with infrastructure changes
When a deployment creates a new public API endpoint, declare its monitor in the same Terraform project. A reviewer can see the URL, check interval, expected response, and any proposed replacements before the team applies the plan.
The provider’s first version manages HTTP and API monitors through the pagelantern_monitor resource. It supports GET and HEAD requests. Terraform Registry publication is pending. The provider can be built from source and used through a local development override.
Give Terraform a scoped workspace key
Create a workspace API key with monitors:read and monitors:write scopes, and supply it to the runner as PAGELANTERN_API_KEY. Store it in your CI secret manager or set it through your local secret tooling. Keep it out of committed Terraform configuration and shared logs.
Start with one nonproduction endpoint. Define its URL and expected HTTP status, review the plan, then apply it. Open the monitor in PageLantern and check that it records the expected response.
Import existing monitors one at a time
If a monitor already exists, declare its resource address, import the PageLantern monitor ID, and run terraform plan. Match the existing configuration until the plan reflects the changes you intend to make. This keeps the same monitor and its history.
Keep settings outside the resource schema, such as request headers and webhooks, in their current management workflow. Review the plan again after changes made in the workspace so you can decide which settings Terraform should restore.
Review deletions before applying a plan
Removing a managed resource from configuration can plan deletion of the monitor. If the service still relies on it, keep the resource or deliberately remove the state binding as part of a reviewed handoff. Read the plan before applying either change.

