feat: expose configurable EBS IOPS and throughput, default to gp3 baseline#39
Merged
Conversation
…eline Add block_device_iops and block_device_throughput variables so operators can tune root-volume performance. Defaults are 3000 IOPS and 125 MB/s — the gp3 baseline included at no extra cost. Previously throughput was hardcoded to 250 MB/s, charging operators for capacity NAT instances do not need. Both new variables are added to CONFIG_VERSION so changes trigger automatic NAT replacement: the Lambda detects the version mismatch on its next reconcile and terminates the stale instance, and the new launch template is used when the replacement is created. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
block_device_iops(default3000) andblock_device_throughput(default125) variables, dropping the hardcoded250MB/s throughput down to the gp3 baseline that's included at no extra cost.CONFIG_VERSIONso a change to either triggers automatic replacement of running NAT instances on the next reconcile (same path as AMI / instance-type changes).README.mdanddocs/reference.mdvia terraform-docs.Replacement behavior
When an operator lowers throughput from
250→125(or any other tuning),CONFIG_VERSION(lambda.tf:103) changes. On the next reconcile event,isCurrentConfig()(cmd/lambda/ec2ops.go:309) sees the running NAT'sConfigVersiontag mismatch the Lambda's env var andhandler.go:136terminates the stale instance; the termination event drives creation of a fresh NAT from the updated launch template. Replacement happens on the next event, not the momentterraform applyfinishes.The existing
Phase 4: NATAMIUpgradeintegration test (tests/integration/nat_zero_test.go:365) already exercises this exact replacement mechanism via AMI change — adding a separate IOPS/throughput test would be duplicate coverage.Test plan
terraform fmt/terraform validate/tflintpassterraform-docs-goregeneratedREADME.mdanddocs/reference.md🤖 Generated with Claude Code