Skip to content

create-template: support --user-data and --volumes #86

Description

@ivyleavedtoadflax

Feature request

remote ami create-template currently only supports --ami, --instance-type, and --key-name. Two common launch template fields are missing:

--user-data

Allow passing a cloud-init script when creating or versioning a template:

remote ami create-template my-template \
  --ami ami-xxx --instance-type t3.micro --key-name my-key \
  --user-data ./cloud-init.sh

The CLI should base64-encode the file and include it in the template data.

--volumes

Allow specifying additional EBS volumes beyond the root:

remote ami create-template my-template \
  --ami ami-xxx --instance-type t3.micro --key-name my-key \
  --volume /dev/sdf:20:gp3:encrypted

Format could be device:size_gb:type:encrypted or similar.

Current workaround

Build the launch template JSON manually and use aws ec2 create-launch-template-version directly, which bypasses remote entirely.

Context

Setting up an EC2 Syncthing node required both user-data (for OS hardening + app install) and an extra encrypted EBS volume (for data). Had to drop down to raw AWS CLI for the template creation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions