amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

ec2_instance enable hibernate option for instance_initiated_shutdown_behavior

Open RonneGisun opened this issue 1 year ago • 2 comments

Summary

I am trying to launch new EC2 instances with the 'stop hibernate' option enabled, as per options available in AWS Console. https://aws.amazon.com/about-aws/whats-new/2019/10/amazon-ec2-hibernation-now-available-on-windows/

Issue Type

Feature Idea

Component Name

ec2_instance

Additional Information

- name: start an instance with a hibernate_options
  amazon.aws.ec2_instance:
    name: "public-cpuoption-instance"
    vpc_subnet_id: subnet-5ca1ab1e
    tags:
      Environment: Testing
    instance_type: c4.large
    volumes:
    - device_name: /dev/sda1
      ebs:
        delete_on_termination: true
    cpu_options:
        core_count: 1
        threads_per_core: 1
    instance_initiated_shutdown_behavior: "stop_hibernate"

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

RonneGisun avatar Aug 15 '22 03:08 RonneGisun

Files identified in the description:

  • [plugins/doc_fragments/tags.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/doc_fragments/tags.py)
  • [plugins/modules/ec2_instance.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/ec2_instance.py)
  • [test/](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/test/)

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 avatar Aug 15 '22 03:08 ansibullbot

cc @jillr @ryansb @s-hertel @tremble click here for bot help

ansibullbot avatar Aug 15 '22 03:08 ansibullbot

@RonneGisun Thank you for this feature idea. Would you be willing to work on this functionality and open a pull request?

alinabuzachis avatar Aug 16 '22 14:08 alinabuzachis

@RonneGisun Thank you for this feature idea. Would you be willing to work on this functionality and open a pull request?

@alinabuzachis Sorry, but I couldn't justify spending time on this right now. I'm a team of one, and have a long to do list.

RonneGisun avatar Aug 17 '22 00:08 RonneGisun

@RonneGisun Could you please try this PR https://github.com/ansible-collections/amazon.aws/pull/972 and let us know if it addresses what you requested? Thanks.

alinabuzachis avatar Aug 26 '22 10:08 alinabuzachis

@RonneGisun Could you please try this PR #972 and let us know if it addresses what you requested? Thanks.

@alinabuzachis Sorry I'm on holiday now, it might be sometime before I can get to this.

RonneGisun avatar Aug 26 '22 22:08 RonneGisun