Repository navigation
feat(ebs-volume): add standalone persistent EBS data volume component - #20
Merged
Merged
Conversation
A new AWS component that creates standalone, encrypted EBS data volumes in
their own state, decoupled from the ec2 instance lifecycle — so an environment
can destroy/apply its ec2 compute while the data on these volumes survives.
- volumes map + for_each: per-entry availability_zone (required, AZ-locked),
size_gb (20), type (gp3), optional iops/throughput, final_snapshot (default
false). encrypted hardcoded true. RFC1035 key validation.
- Output volumes -> { volume_id, arn, availability_zone, name }; name is the
Name tag the instance self-attaches by.
- Attachment stays env-owned (self-attach by Name tag in user_data + a scoped
iam-policy grant through ec2's existing iam_role_policy_arns) — no ec2 change.
- Destroy safety is the env's job (Terragrunt prevent_destroy); final_snapshot
is an opt-in recovery net.
Registered in the CI matrix, root README, and CHANGELOG. Closes #17.
The vpc azs output for cleaner consumer AZ wiring is tracked separately in #19.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 Changelog preview (draft)Generated from Conventional Commits. Curate into [Unreleased]Added
Fixed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New AWS
ebs-volumecomponent: standalone, encrypted EBS data volumes in their own state, decoupledfrom the
ec2instance lifecycle so an environment can destroy/apply its compute while the datasurvives. Closes #17.
Component(s)
ebs-volume(new) · ci · docsType
Changes
ebs-volume/terraform—volumesmap +for_each; per-entryavailability_zone(required,AZ-locked),
size_gb(20),type(gp3), optionaliops/throughput,final_snapshot(default
false).encryptedhardcodedtrue. RFC1035 key validation.aws ~> 6.0.volumes→{ volume_id, arn, availability_zone, name };name(<env>-<key>) is theNametag the consuming instance self-attaches by.user_datafinds the volume byNametag andattaches/formats/mounts it, with an
ec2:AttachVolume/… grant composed viaiam-policyand fedthrough
ec2's existingiam_role_policy_arns. Noec2change.prevent_destroyis the hard guard; the module'sfinal_snapshot(defaultfalse) is an opt-in recovery net, baking in no policy.[Unreleased] → Added.Out of scope (deliberate): the
vpcazsoutput for cleaner consumer AZ wiring is split into #19;snapshot_id/kms_key_iddeferred (YAGNI).Validation
terraform fmt/validate/tflintpass on the changed component (the gate)CHANGELOG.md[Unreleased]updated