Hadron / carthage-aws

AWS Plugin for Carthage
Other
2 stars 2 forks source link

Ability to specify primary block device size on instance creation with carthage-aws #11

Closed huntmckay closed 2 years ago

huntmckay commented 2 years ago

When deploying an instance, carthage-aws allows specifying the aws_instance_type as a class attribute. I.E.

class some_machine(AwsVm): 
    aws_instance_type = 't3.medium'

Currently some of the instance types have a default storage size.

We would like to be able to specify the storage size as another class attribute. I.E.

class some_machine(AwsVm): 
    aws_instance_type = 't3.medium'
    aws_volume_size = '300G'

Where capital letter suffixes would denote the denomination of the integer.

hartmans commented 2 years ago

Actually, instance types don't have a default storage size (except for some larger instances with nvme ephemeral devices). Instead, the default storage size of a disk comes from the AMI.

According to the Carthage Model Documentation, you ought to be able to do

class foo(MachineModel):
    disk_sizes = (20,80)

to get a machine with a 20G primary disk and a 80G secondary disk. Carthage_aws should support this.