Pulumi Preview Policy Gate with Human Approval
Policy ratchet around pulumi preview that issues, alerts, and holds for approval before applying violating plans.
Monitor an Elastic Beanstalk environment's own health color and alert Slack with the exact causes before an incident.
Elastic Beanstalk's enhanced health agent already classifies every environment Green, Yellow, Red, or Grey and explains why in plain English - but it has no built-in way to say "notify this Slack channel the moment this specific environment stops being Green" without wiring CloudWatch alarms and SNS per environment. This blueprint reads that same health classification directly and alerts Slack with the exact causes the moment the color changes.
periodic_health_check (io.kestra.plugin.core.trigger.Schedule) runs every 10 minutes, explicitly passing aws_region and environment_name through its own inputs: block so the flow is self-contained when the trigger fires. Shipped disabled so a manual run can be verified first.probe_environment_health (io.kestra.plugin.aws.cli.AwsCLI) runs aws elasticbeanstalk describe-environment-health --attribute-names All, capturing Color, Causes, HealthStatus, and more as named task outputs.evaluate_red (io.kestra.plugin.core.flow.If) branches on Color == 'Red'.then (UNHEALTHY): alert_unhealthy reports the environment's own Causes to Slack.else: nested evaluate_yellow branches on Color == 'Yellow'.then (DEGRADED): alert_degraded reports the causes to Slack at a lower severity than Red.else: nested evaluate_grey branches on Color == 'Grey'.then (UNKNOWN): log_unknown_health records that health data is not yet definitive (common during a deploy or launch).else (HEALTHY): log_healthy records a clean Green check.log_audit_complete always runs last, printing the color regardless of which branch fired.errors block alerts Slack separately if the flow itself fails outright - Enhanced Health Reporting not being enabled, or bad credentials, must not read as HEALTHY.Causes array in the Slack alert itself, instead of requiring someone to open the Elastic Beanstalk console to see why it degraded.io.kestra.plugin.aws.cli.AwsCLI driving a read-only Elastic Beanstalk health check, reusing the same corrected output-capture convention (newlines only, not spaces, stripped before the marker) as this repository's other AWS CLI-based sentinel blueprints.AwsCLI reading Elastic Beanstalk's own enhanced health classification directly.Elastic Beanstalk's own health agent computes the classification, but surfacing it to a team requires either staring at the console or wiring a separate CloudWatch-alarm-to-SNS pipeline per environment, configuration that then has to be kept in sync as environments are created and retired. Kestra supplies the schedule, the HEALTHY/DEGRADED/UNHEALTHY/UNKNOWN classification as a first-class branch, and an execution history that shows exactly when an environment's color changed and what it said about why.
aws_region, environment_name) - this is a free, standard Beanstalk feature toggle, not a paid support tier.elasticbeanstalk:DescribeEnvironmentHealth permission - entirely read-only, cannot modify, restart, or terminate the environment.This blueprint has no local, account-free testing path. DescribeEnvironmentHealth is documented as not implemented in LocalStack, on top of LocalStack now requiring its own account and auth token as of March 2026 regardless. A real AWS account with an Elastic Beanstalk environment is the only way to exercise this blueprint meaningfully.
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY: credentials for io.kestra.plugin.aws.cli.AwsCLI.SLACK_WEBHOOK_URL: Slack incoming webhook used by alert_unhealthy, alert_degraded, and the errors block.SECRET_, base64-encoded - for example SECRET_AWS_SECRET_ACCESS_KEY=$(echo -n '<your-secret-key>' | base64) - and read back in flows with {{ secret('NAME') }}.aws_region (STRING, default us-east-1): region whose environment is audited.environment_name (STRING, default <your-beanstalk-environment-name>, must be replaced): environment to audit.outputs.probe_environment_health.vars.Color: Green, Yellow, Red, or Grey (verified enum from Elastic Beanstalk's own API reference).outputs.probe_environment_health.vars.Causes: array of plain-English strings explaining the current color, only meaningful when not Green.outputs.probe_environment_health.vars.HealthStatus, Status, ApplicationMetrics, InstancesHealth: also captured by --attribute-names All, available for further extension even though this blueprint only branches on Color.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK_URL secrets.log_healthy fires.alert_degraded or alert_unhealthy fires with the real Causes.periodic_health_check once you trust the check against your real environment.environment_name values with io.kestra.plugin.core.flow.Loop to audit every environment in an application (or across applications) in one run.InstancesHealth (counts of Ok, Warning, Degraded, Severe instances) to distinguish "one bad instance out of ten" from "the whole fleet is down," rather than only reacting to the aggregate Color.aws elasticbeanstalk restart-app-server on the UNHEALTHY branch behind an explicit approval gate - deliberately kept out of this sentinel so the monitoring path never restarts anything on its own.describe-environment-health requires Enhanced Health Reporting enabled on the environment. Without it, the call fails outright rather than returning a meaningful (even if stale) Color - this surfaces through the errors block, not as a false HEALTHY.tr -d '\n' | xargs -0 -I {} echo '::{"outputs":{}}::') deliberately does not strip spaces, the same corrected pattern used throughout this repository's AWS CLI-based sentinel blueprints, since the Causes array entries are human-readable sentences.--attribute-names valid values, and the Color / Causes / HealthStatus output fields are taken verbatim from AWS's own CLI reference documentation - but no Kestra engine was run to execute this flow end to end.