Skip to content

ec2: two AWS pages disagree on DeleteOnTermination's launch default for a data volume, and substrate does not record which it follows #675

Closed

Description

@scttfrdmn

What

Two current AWS documentation pages disagree about DeleteOnTermination's default for a data
volume created at launch, and substrate has picked one without recording that the conflict
exists.

  • block-device-mapping-concepts states the default is "true for the root volume and
    false for attached volumes".
  • preserving-volumes-on-termination carries a console-vs-CLI table that lists a data volume
    created at launch via the CLI as Delete.

#666 implemented and documented true for every launch-created volume, root and data alike
(emulator/ec2_block_devices.go:147-152, docs/services.md:2993-3000), sourced from the
second page. The code comment argues it well — "its termination table splits on how the volume
was attached, not on what it is … and substrate has no console" — but it presents the answer as
simply AWS's documented behaviour, without noting that another current page says the opposite.

Why it matters

This is a destructive default. A consumer whose IaC attaches a data volume at launch and
expects it to survive termination gets the opposite from substrate, and if
block-device-mapping-concepts is the page they read, substrate looks wrong rather than
opinionated. The house provenance rule exists precisely for this case: where substrate resolves
an ambiguity in AWS's own documentation, the resolution and its reasoning belong in
docs/services.md, not only in a code comment that reads as though there were no ambiguity.

The "no console path" argument is genuinely the strongest one available, and this issue may
well land on keeping today's behaviour. What it must not do is leave the conflict unrecorded.

Acceptance criteria

  • Decide which page governs, and state the decision in docs/services.md naming both
    pages and why one wins — not just the behaviour.
  • If the decision changes the behaviour, emulator/ec2_block_devices.go:147-152 is updated
    and the change carries a CHANGELOG.md compatibility note: a data volume that survived
    termination in v0.103.0 may now be deleted, or vice versa.
  • If the decision keeps today's behaviour, the code comment at
    emulator/ec2_block_devices.go:147-152 is amended to acknowledge the conflicting page
    rather than reading as unambiguous.
  • AttachVolume's false default is confirmed unaffected either way — the two pages agree
    about a volume attached after launch.
  • The tests pinning the current answer are updated or reaffirmed with a comment naming this
    issue: test/e2e/journey_ec2_block_devices_test.go:90-95 and
    emulator/ec2_block_devices_http_test.go:134.
  • CHANGELOG.md under ## [Unreleased] — under Fixed if the behaviour changes, under
    Changed if only the documentation does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions