Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2_instance: Support throughtput parameter for GP3 volume types as part of volumes parameter #395

Closed
gtie opened this issue Jul 7, 2021 · 5 comments · Fixed by #433
Closed
Assignees
Labels
feature This issue/PR relates to a feature request jira module module plugins plugin (any type)

Comments

@gtie
Copy link

gtie commented Jul 7, 2021

SUMMARY

Support throughtput parameter for GP3 volume types as part of the ec2.volumes parameter

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ec2.py

ADDITIONAL INFORMATION

While GP3 EBS volumes can be created together with an EC2 instance using the ec2 module, the feature of setting a custom throughput parameter is still missing. This leads to very ugly workarounds.

Ideally, we should be able to specify it directly as in:

- amazon.aws.ec2:
    key_name: mykey
    group: webserver
    instance_type: c3.medium
    image: ami-123456
    wait: yes
    wait_timeout: 500
    volumes:
      - device_name: /dev/xvda
        volume_type: gp3
        volume_size: 8
        throughput: 250

This type of definition is already supported by the ec2_vol module, but it's not yet present in ec2

@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module needs_triage plugins plugin (any type) labels Jul 7, 2021
@tremble
Copy link
Contributor

tremble commented Jul 7, 2021

Hi @gtie,

While we haven't officially started the deprecation process for the ec2 module, it's based upon the 'old' Amazon SDK (boto) rather than the 'new' SDK (boto3/botocore) and can generally be considered deprecated. The boto module doesn't support most modern features (including various regions and things like GP3 throughput) and as such support will not be added to the ec2 module for the throughput option.

The ec2_instance module largely replaces this functionality and I would recommend you migrate if possible. (ec2_instance doesn't support throughput yet either, however support would be possible)

As a work around support for throughput has been added to the most recent versions of the ec2_vol module.

@gtie
Copy link
Author

gtie commented Jul 9, 2021

The ec2_vol support is not enough unfortunately - it wouldn't update an existing EBS module (at least in Ansible 2.10). @tremble , shall we repurpose this issue for the ec2_instance update?

@tremble
Copy link
Contributor

tremble commented Jul 9, 2021

I believe you need either Ansible 3.4.0 or to explicitly install amazon.aws 1.5.0 and community.aws 1.5.0 for the version of ec2_vol which supports updating the throughput option:

https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vol_module.html#parameter-throughput

re repurposing: yes.

@tremble tremble changed the title Support throughtput parameter for GP3 volume types as part of ec2.volumes ec2_instance: Support throughtput parameter for GP3 volume types as part of volumes parameter Jul 9, 2021
@alinabuzachis alinabuzachis self-assigned this Jul 20, 2021
ansible-zuul bot pushed a commit that referenced this issue Aug 25, 2021
ec2_instance -  Support throughtput parameter for GP3 volume types

SUMMARY

ec2_instance - Support throughput parameter for GP3 volume types
Fixes #395
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_instance

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Jill R <None>
Reviewed-by: None <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
…ons#395)

* added assign_public_ip feature
* fix sanity issues and added changelog

Co-authored-by: Mark Chappell <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
…ons#395)

* added assign_public_ip feature
* fix sanity issues and added changelog

Co-authored-by: Mark Chappell <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
…ons#395)

* added assign_public_ip feature
* fix sanity issues and added changelog

Co-authored-by: Mark Chappell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request jira module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants