An Application Platform That Patches Itself
AWS Elastic Beanstalk with the defaults turned the right way: managed platform updates are ON (AWS leaves them off, so the platform is never patched), health reporting is enhanced rather than basic, logs stream to CloudWatch and survive termination, IMDSv1 is disabled, deployments go out in batches instead of all at once, and application versions are pruned before they hit the quota.
Verification
Static-verifiedPassed: validated and lint-clean (provider-schema-validated for AWS/Azure/GCP; Terraform-language lint elsewhere).
Conformance
- Static validation (fmt · validate · tflint)
- Security scan clean (Checkov)
- Plan tests (mocked: validation rules · outputs)
Provenance
- SHA-256 checksum
- Signature (pending)
Functional
- Live test pending (no cloud run yet)
Last verified 2026-09-17 · how we verify
Use it from the registry
terraform · opentofumodule "elastic_beanstalk" {
source = "www.iac-bazaar.com/iac-bazaar/aws-elastic-beanstalk/aws"
version = "1.0.0"
}Needs a registry token from /account/tokens. The module itself is free; the account is what identifies you. Full setup: registry docs.
Inputs & outputs
Create a free account to read this module's contract
The declared contract - every input name, type, default and description, plus every output - is shown to signed-in accounts, not to anonymous visitors.
A free account sees the contract of every module in the catalogue. There is no subscription and nothing to buy - the modules are free to download, and they run under Vizier.
Documentation
aws-elastic-beanstalk
An AWS Elastic Beanstalk application and environment. Works with Terraform and
OpenTofu (>= 1.6), aws provider >= 6.0, < 7.0.
It patches itself. Managed platform updates are off by default
(ManagedActionsEnabled defaults to false), so an environment created from
Terraform never gets a platform patch. This module turns them on with a weekly
window and a minor-version level.
Health reporting is enhanced, not basic. AWS's default is basic, which
knows whether an instance answers and nothing about the application. The console
quietly overrides that for you; Terraform does not, so an environment built this
way is usually less observable than the same environment built by clicking.
Health and instance logs stream to CloudWatch Logs (both default to off) and are
kept when the environment is terminated, because an environment is often
terminated precisely when something went wrong.
IMDSv1 is disabled. On Amazon Linux 2 and Windows Server 2019 platforms
DisableIMDSv1 defaults to false, which leaves the credential-stealing path
that SSRF bugs use. Setting it can migrate an existing environment from launch
configurations to launch templates.
Deployments do not take the application down. The default deployment policy
is AllAtOnce. This module deploys in batches and rolls configuration changes
instance by instance, waiting for health.
Versions are pruned. With no lifecycle policy an application keeps every version until it hits its quota, and then no deployment can start at all. This module keeps the most recent versions and deletes their S3 bundles with them.
TLS is a decision. Give certificate_arn and the environment gets an HTTPS
listener on 443 with a TLS 1.2+ policy (the load balancer's own default still
admits TLS 1.0), and the plain HTTP listener is switched off - Elastic Beanstalk
cannot redirect HTTP to HTTPS at the load balancer without a platform
configuration file, so it does not pretend to. A public environment with no
certificate is refused unless you set allow_plain_http.
Secrets stay out of the configuration. environment_variables are stored in
the environment configuration and shown as written. environment_secrets take
the ARN of a Secrets Manager secret or an SSM parameter, which the instance reads
at bootstrap; the module grants its instance role read on exactly those ARNs.
Verification
Static validation runs tofu fmt, init, validate, tflint and checkov.
This module has not yet had a live test, so it is published as statically
validated with its live test pending and does not carry the live-tested mark.
Usage code & full reference need an account
The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.
- Usage
Related modules
aws-image-builder
A pipeline with no schedule builds when somebody clicks, so the golden image ages until a person remembers it; image tests are the switch turned off to save an hour and scanning is off unless enabled; and the build instance's metadata service can hand its credentials to whatever a step downloads. Weekly rebuilds when a dependency changed, tests and scanning on, IMDSv2-only builds.
aws-lightsail-instance
A Lightsail instance is created with 22 and 80 open to every address; its public address changes when it stops unless a static IP is attached, and every DNS record pointing at it is then wrong; and automatic snapshots are off. The port list replaced by your rules with SSH from anywhere accepted by name, a static IP attached, and the daily AutoSnapshot add-on on at the hour you choose.
aws-ssm-patch-manager
A patch baseline that approves security patches after a delay, the patch group that binds instances to it by tag, and a maintenance window that runs AWS-RunPatchBaseline on a schedule with the output in CloudWatch. Install rather than Scan (scan-only by name), RebootIfNeeded, and unapproved security updates counted as non-compliant so the approval delay shows on the dashboard.
aws-batch
Batch does not retry by default, so a reclaimed spot instance or a timed-out image pull ends as FAILED - reported as if the job failed on its merits, which is how somebody ends up debugging working code. Retries infrastructure failures and exits on real ones.
aws-ec2-instance
EC2 instance with IMDSv2, encrypted EBS, instance profile, and EIP - secure defaults out of the box.
aws-autoscaling
EC2 launch template and Auto Scaling group with IMDSv2 enforced, encrypted gp3 root volume, an egress-only security group, and scale-to-zero defaults so it applies cleanly with no compute cost.