Skip to content

Feature request: --tag / --tags flag for custom EC2 instance tags #1

Closed

Description

@scttfrdmn

Use case

Programmatic teardown and resource tracking requires custom EC2 tags. Currently spawn launch doesn't support arbitrary --tag flags.

Desired behavior

spawn launch myspore \
  --instance-type c7g.4xlarge \
  --tag Project=my-project \
  --tag Environment=prod \
  --tag CostCenter=research

Should create instances with these tags in addition to spawn's built-in tags.

Current workaround limitations

  • --name sets the Name tag but doesn't support multiple custom tags
  • --team creates spawn:team-id but only one team tag
  • No way to add arbitrary tags like Project, Owner, CostCenter, etc.

Why this matters

Automated teardown scripts need to query instances by custom tags:

aws ec2 describe-instances --filters "Name=tag:Project,Values=my-project"

Without custom tags, programmatic cleanup requires tracking instance IDs externally or risks terminating wrong instances.

Suggested API

Either:

  • --tag key=value (repeatable)
  • --tags key1=value1,key2=value2

Tags should be applied to EC2 instances at launch, similar to aws ec2 run-instances --tag-specifications.

Context

Building an emitted project generator (fieldcraft) that creates self-contained, disposable compute workloads. Teardown safety requires reliable instance tagging for cleanup verification.

Activity

  1. scttfrdmn commented on Oct 19, 2026

    @scttfrdmn
    ContributorAuthor

    Shipped: spawn launch --tag key=value is a repeatable flag (cmd/launch_flags.go:463 on main, added in 4169d9e / #162). Tags apply to the instance and its created volumes; the spawn: prefix is reserved.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions