webhook_url, webhooks, slack_webhooks or emails is required.
Actions are identified internally by a server-assigned
number. The name is used during import to look up the number.Example usage
Triggers
Thetriggers attribute must contain one or more of the following event types:
ON_SCALED_ARTIFACT keeps its historical name for backwards compatibility. Kosli no longer records scaling events, so this trigger fires on artifact changes.Targets
An action notifies one or more targets. Set at least one of the target attributes. One action can combine all of them.
You canât set
webhook_url and webhooks together. To add a second webhook to an action that uses webhook_url, move the URL into webhooks. Terraform updates the action in place.
Webhook URLs must use HTTPS and resolve to a public address. Kosli rejects a URL that points at an internal address.
Importing an action that has exactly one generic webhook stores the URL in
webhook_url. A configuration that declares the same URL in webhooks shows a one-time in-place update on the next plan.Import
Actions can be imported using their name:Schema
Required
environments(List of String) List of environment names this action monitors.name(String) Name of the action. Must be unique within the organization. Changing this will force recreation of the resource.triggers(List of String) List of trigger event types that activate this action. One or more ofON_STARTED_ARTIFACT,ON_EXITED_ARTIFACT,ON_SCALED_ARTIFACT,ON_ALLOWED_ARTIFACT,ON_COMPLIANT_ENV,ON_NON_COMPLIANT_ENV. See Triggers for what each one fires on.
Optional
emails(Set of String) Email addresses the notifications are sent to.slack_webhooks(Set of String, Sensitive) Slack incoming webhook URLs the notifications are posted to. Must use HTTPS.webhook_url(String, Sensitive) A single generic webhook URL to send notifications to. Usewebhooksfor more than one. The two canât be set together.webhooks(Set of String, Sensitive) Generic webhook URLs the notifications are POSTed to as JSON (payload version1.0). Must use HTTPS.
Read-only
created_by(String) User who created the action.last_modified_at(Number) Unix timestamp of when the action was last modified.number(Number) Server-assigned numeric identifier for the action.