Install AWS alarm forwarding with Terraform
After selecting alarm forwarding on the AWS connection, use the Terraform files for the approved account, region and intake. Keep the account-wide reader in one owning root.
Apply the regional forwarding configuration#
For Terraform, save proofline.tf and proofline-alarms.tf.json in the same root and apply them together. The root needs AWS provider 5.27 or later; neither file declares a provider version, so a root that already pins one keeps it. Supply proofline_intake_key through your deployment process; the other inputs have defaults. Keep the credential out of committed files and command history. Terraform state contains it, so restrict state access.
An intake in another region, or any intake once the role exists, instead comes as a Terraform file of its own, proofline-alarms-<intake>.tf.json, named for the intake. It creates no read role. It declares its own provider for that region and names its key variable proofline_intake_key_<intake>, so save it beside proofline.tf or in another root that uses AWS provider 5.27 or later.
Use one stack or root to own the account-wide read role. Import an existing role before adopting the generated files. Install forwarding in each approved alarm region: choose each region's intake in turn and deploy its forwarding file there. The rule forwards only the listed alarms' transitions to ALARM and back to OK and leaves existing alarm actions and paging destinations unchanged; a rule generated before it forwarded OK records no alarm closes until you generate the files again and update the stack or root.